From 3537d68dacbf794be0119cf5ee7e7f2aabb757c2 Mon Sep 17 00:00:00 2001 From: Mike Eltsufin Date: Wed, 3 Aug 2022 16:50:59 +0000 Subject: [PATCH] feat: initial generation --- .github/.OwlBot.lock.yaml | 16 + .github/.OwlBot.yaml | 32 + .github/CODEOWNERS | 10 + .github/ISSUE_TEMPLATE/bug_report.md | 51 + .github/ISSUE_TEMPLATE/feature_request.md | 21 + .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/release-please.yml | 3 + .github/release-trigger.yml | 1 + .github/snippet-bot.yml | 0 .github/sync-repo-settings.yaml | 63 + .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 | 46 + .kokoro/trampoline.sh | 26 + .repo-metadata.json | 16 + CODE_OF_CONDUCT.md | 94 + CONTRIBUTING.md | 92 + LICENSE | 201 + README.md | 201 + SECURITY.md | 7 + .../pom.xml | 94 + .../pom.xml | 139 + .../ClientConnectorServicesServiceClient.java | 1528 ++++ ...lientConnectorServicesServiceSettings.java | 372 + .../v1/gapic_metadata.json | 48 + .../v1/package-info.java | 54 + .../ClientConnectorServicesServiceStub.java | 148 + ...tConnectorServicesServiceStubSettings.java | 859 ++ ...nnectorServicesServiceCallableFactory.java | 113 + ...rpcClientConnectorServicesServiceStub.java | 568 ++ ...entConnectorServicesServiceClientTest.java | 847 ++ .../MockClientConnectorServicesService.java | 59 + ...ockClientConnectorServicesServiceImpl.java | 168 + .../v1/MockIAMPolicy.java | 59 + .../v1/MockIAMPolicyImpl.java | 127 + .../v1/MockLocations.java | 59 + .../v1/MockLocationsImpl.java | 105 + .../pom.xml | 69 + .../ClientConnectorServicesServiceGrpc.java | 995 +++ java.header | 15 + license-checks.xml | 10 + owlbot.py | 24 + pom.xml | 188 + .../clirr-ignored-differences.xml | 19 + .../pom.xml | 46 + .../v1/ClientConnectorService.java | 7904 +++++++++++++++++ .../v1/ClientConnectorServiceName.java | 240 + ...ientConnectorServiceOperationMetadata.java | 1927 ++++ ...ctorServiceOperationMetadataOrBuilder.java | 219 + .../v1/ClientConnectorServiceOrBuilder.java | 274 + .../ClientConnectorServicesServiceProto.java | 390 + .../CreateClientConnectorServiceRequest.java | 1608 ++++ ...lientConnectorServiceRequestOrBuilder.java | 192 + .../DeleteClientConnectorServiceRequest.java | 1066 +++ ...lientConnectorServiceRequestOrBuilder.java | 114 + .../v1/GetClientConnectorServiceRequest.java | 715 ++ ...lientConnectorServiceRequestOrBuilder.java | 55 + .../ListClientConnectorServicesRequest.java | 1350 +++ ...ientConnectorServicesRequestOrBuilder.java | 144 + .../ListClientConnectorServicesResponse.java | 1580 ++++ ...entConnectorServicesResponseOrBuilder.java | 170 + .../v1/LocationName.java | 192 + .../UpdateClientConnectorServiceRequest.java | 1629 ++++ ...lientConnectorServiceRequestOrBuilder.java | 194 + .../client_connector_services_service.proto | 421 + renovate.json | 74 + samples/install-without-bom/pom.xml | 84 + samples/pom.xml | 56 + samples/snapshot/pom.xml | 83 + samples/snippets/pom.xml | 47 + versions.txt | 6 + 126 files changed, 30060 insertions(+) create mode 100644 .github/.OwlBot.lock.yaml create mode 100644 .github/.OwlBot.yaml create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/support_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/auto-label.yaml create mode 100644 .github/blunderbuss.yml create mode 100644 .github/generated-files-bot.yml create mode 100644 .github/release-please.yml create mode 100644 .github/release-trigger.yml create mode 100644 .github/snippet-bot.yml create mode 100644 .github/sync-repo-settings.yaml create mode 100644 .github/trusted-contribution.yml create mode 100644 .github/workflows/approve-readme.yaml create mode 100644 .github/workflows/auto-release.yaml create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/samples.yaml create mode 100644 .gitignore create mode 100644 .kokoro/build.bat create mode 100755 .kokoro/build.sh create mode 100755 .kokoro/coerce_logs.sh create mode 100644 .kokoro/common.cfg create mode 100644 .kokoro/common.sh create mode 100644 .kokoro/continuous/common.cfg create mode 100644 .kokoro/continuous/java8.cfg create mode 100755 .kokoro/dependencies.sh create mode 100644 .kokoro/nightly/common.cfg create mode 100644 .kokoro/nightly/integration.cfg create mode 100644 .kokoro/nightly/java11-integration.cfg create mode 100644 .kokoro/nightly/java11.cfg create mode 100644 .kokoro/nightly/java7.cfg create mode 100644 .kokoro/nightly/java8-osx.cfg create mode 100644 .kokoro/nightly/java8-win.cfg create mode 100644 .kokoro/nightly/java8.cfg create mode 100644 .kokoro/nightly/samples.cfg create mode 100755 .kokoro/populate-secrets.sh create mode 100644 .kokoro/presubmit/clirr.cfg create mode 100644 .kokoro/presubmit/common.cfg create mode 100644 .kokoro/presubmit/dependencies.cfg create mode 100644 .kokoro/presubmit/graalvm-native-17.cfg create mode 100644 .kokoro/presubmit/graalvm-native.cfg create mode 100644 .kokoro/presubmit/integration.cfg create mode 100644 .kokoro/presubmit/java11.cfg create mode 100644 .kokoro/presubmit/java7.cfg create mode 100644 .kokoro/presubmit/java8-osx.cfg create mode 100644 .kokoro/presubmit/java8-win.cfg create mode 100644 .kokoro/presubmit/java8.cfg create mode 100644 .kokoro/presubmit/linkage-monitor.cfg create mode 100644 .kokoro/presubmit/lint.cfg create mode 100644 .kokoro/presubmit/samples.cfg create mode 100755 .kokoro/readme.sh create mode 100644 .kokoro/release/bump_snapshot.cfg create mode 100644 .kokoro/release/common.cfg create mode 100755 .kokoro/release/common.sh create mode 100644 .kokoro/release/drop.cfg create mode 100755 .kokoro/release/drop.sh create mode 100644 .kokoro/release/promote.cfg create mode 100755 .kokoro/release/promote.sh create mode 100644 .kokoro/release/publish_javadoc.cfg create mode 100755 .kokoro/release/publish_javadoc.sh create mode 100644 .kokoro/release/publish_javadoc11.cfg create mode 100755 .kokoro/release/publish_javadoc11.sh create mode 100644 .kokoro/release/snapshot.cfg create mode 100755 .kokoro/release/snapshot.sh create mode 100644 .kokoro/release/stage.cfg create mode 100755 .kokoro/release/stage.sh create mode 100644 .kokoro/trampoline.sh create mode 100644 .repo-metadata.json create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 SECURITY.md create mode 100644 google-cloud-beyondcorp-clientconnectorservices-bom/pom.xml create mode 100644 google-cloud-beyondcorp-clientconnectorservices/pom.xml create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceClient.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceSettings.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/gapic_metadata.json create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/package-info.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/ClientConnectorServicesServiceStub.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/ClientConnectorServicesServiceStubSettings.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/GrpcClientConnectorServicesServiceCallableFactory.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/GrpcClientConnectorServicesServiceStub.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceClientTest.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockClientConnectorServicesService.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockClientConnectorServicesServiceImpl.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockIAMPolicy.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockIAMPolicyImpl.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockLocations.java create mode 100644 google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockLocationsImpl.java create mode 100644 grpc-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml create mode 100644 grpc-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceGrpc.java create mode 100644 java.header create mode 100644 license-checks.xml create mode 100644 owlbot.py create mode 100644 pom.xml create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorService.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceName.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOperationMetadata.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOperationMetadataOrBuilder.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOrBuilder.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceProto.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/CreateClientConnectorServiceRequest.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/CreateClientConnectorServiceRequestOrBuilder.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/DeleteClientConnectorServiceRequest.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/DeleteClientConnectorServiceRequestOrBuilder.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/GetClientConnectorServiceRequest.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/GetClientConnectorServiceRequestOrBuilder.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesRequest.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesRequestOrBuilder.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesResponse.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesResponseOrBuilder.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/LocationName.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/UpdateClientConnectorServiceRequest.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/UpdateClientConnectorServiceRequestOrBuilder.java create mode 100644 proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/proto/google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto create mode 100644 renovate.json create mode 100644 samples/install-without-bom/pom.xml create mode 100644 samples/pom.xml create mode 100644 samples/snapshot/pom.xml create mode 100644 samples/snippets/pom.xml create mode 100644 versions.txt diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml new file mode 100644 index 0000000..8218fd8 --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +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: + digest: sha256:7a9a7eb50ca2af5bfffab3abd2f38d408735c990a74bacf9b7fde2af0a086a0b + image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest \ No newline at end of file diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml new file mode 100644 index 0000000..89b28b1 --- /dev/null +++ b/.github/.OwlBot.yaml @@ -0,0 +1,32 @@ +# 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: +- "/grpc-google-.*/src" +- "/proto-google-.*/src" +- "/google-.*/src" + +deep-preserve-regex: +- "/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/beyondcorp/clientconnectorservices/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/$1/proto-google-cloud-beyondcorp-clientconnectorservices-$1/src" +- source: "/google/cloud/beyondcorp/clientconnectorservices/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/$1/grpc-google-cloud-beyondcorp-clientconnectorservices-$1/src" +- source: "/google/cloud/beyondcorp/clientconnectorservices/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/$1/google-cloud-beyondcorp-clientconnectorservices/src" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..30fdb7b --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,10 @@ +# Code owners file. +# This file controls who is tagged for review for any given pull request. + +# For syntax help see: +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax + +* @googleapis/yoshi-java + +# The java-samples-reviewers team is the default owner for samples changes +samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..4cf17e6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,51 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +Please run down the following list and make sure you've tried the usual "quick fixes": + + - Search the issues already opened: https://github.com/googleapis/java-beyondcorp-clientconnectorservices/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 new file mode 100644 index 0000000..754e30c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +**Is your feature request related to a problem? Please describe.** +What the problem is. Example: I'm always frustrated when [...] + +**Describe the solution you'd like** +What you want to happen. + +**Describe alternatives you've considered** +Any alternative solutions or features you've considered. + +**Additional context** +Any other context or screenshots about the feature request. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 0000000..9958690 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..7a34f35 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +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-beyondcorp-clientconnectorservices/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 new file mode 100644 index 0000000..4caef68 --- /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 diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 0000000..2176b05 --- /dev/null +++ b/.github/blunderbuss.yml @@ -0,0 +1,7 @@ +# Configuration for the Blunderbuss GitHub app. For more info see +# https://github.com/googleapis/repo-automation-bots/tree/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 new file mode 100644 index 0000000..c644a24 --- /dev/null +++ b/.github/generated-files-bot.yml @@ -0,0 +1,12 @@ +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/release-please.yml b/.github/release-please.yml new file mode 100644 index 0000000..8ca7f9c --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,3 @@ +bumpMinorPreMajor: true +handleGHRelease: true +releaseType: java-yoshi diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml new file mode 100644 index 0000000..d4ca941 --- /dev/null +++ b/.github/release-trigger.yml @@ -0,0 +1 @@ +enabled: true diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 0000000..e69de29 diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 0000000..72acb9d --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,63 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# Whether or not rebase-merging is enabled on this repository. +# Defaults to `true` +rebaseMergeAllowed: false + +# Whether or not squash-merging is enabled on this repository. +# Defaults to `true` +squashMergeAllowed: true + +# Whether or not PRs are merged with a merge commit on this repository. +# Defaults to `false` +mergeCommitAllowed: false + +# Rules for main branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `main` +- pattern: main + # Can admins overwrite branch protection. + # Defaults to `true` + isAdminEnforced: true + # Number of approving reviews required to update matching branches. + # Defaults to `1` + requiredApprovingReviewCount: 1 + # Are reviews from code owners required to update matching branches. + # Defaults to `false` + requiresCodeOwnerReviews: true + # Require up to date branches + requiresStrictStatusChecks: false + # List of required status check contexts that must pass for commits to be accepted to matching branches. + requiredStatusCheckContexts: + - "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" +# List of explicit permissions to add (additive only) +permissionRules: +- team: yoshi-admins + permission: admin +- team: yoshi-java-admins + permission: admin +- team: yoshi-java + permission: push +- team: java-samples-reviewers + permission: push + diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml new file mode 100644 index 0000000..a0ba1f7 --- /dev/null +++ b/.github/trusted-contribution.yml @@ -0,0 +1,3 @@ +trustedContributors: +- renovate-bot +- gcf-owl-bot[bot] diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 0000000..f5fc7d5 --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,69 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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 new file mode 100644 index 0000000..7a106d0 --- /dev/null +++ b/.github/workflows/auto-release.yaml @@ -0,0 +1,103 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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 new file mode 100644 index 0000000..e3bb26e --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,89 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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 new file mode 100644 index 0000000..912ed8b --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,30 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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 new file mode 100644 index 0000000..069d08f --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# 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 new file mode 100644 index 0000000..067cf4a --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +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 + +"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 0000000..2a15a14 --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,134 @@ +#!/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-beyondcorp-clientconnectorservices +fi + +echo "exiting with ${RETURN_CODE}" +exit ${RETURN_CODE} diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh new file mode 100755 index 0000000..46edbf7 --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,37 @@ +#!/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 new file mode 100644 index 0000000..01ee305 --- /dev/null +++ b/.kokoro/common.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR} +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# All builds use the trampoline script to run in docker. +build_file: "java-beyondcorp-clientconnectorservices/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-beyondcorp-clientconnectorservices/.kokoro/build.sh" +} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 0000000..f8f957a --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,60 @@ +#!/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 new file mode 100644 index 0000000..1baa281 --- /dev/null +++ b/.kokoro/continuous/common.cfg @@ -0,0 +1,25 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-beyondcorp-clientconnectorservices/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-beyondcorp-clientconnectorservices/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg new file mode 100644 index 0000000..495cc7b --- /dev/null +++ b/.kokoro/continuous/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 0000000..d7476cf --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,110 @@ +#!/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 -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 + + # 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 new file mode 100644 index 0000000..1baa281 --- /dev/null +++ b/.kokoro/nightly/common.cfg @@ -0,0 +1,25 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-beyondcorp-clientconnectorservices/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-beyondcorp-clientconnectorservices/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg new file mode 100644 index 0000000..a2907a2 --- /dev/null +++ b/.kokoro/nightly/integration.cfg @@ -0,0 +1,37 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +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" +} diff --git a/.kokoro/nightly/java11-integration.cfg b/.kokoro/nightly/java11-integration.cfg new file mode 100644 index 0000000..58049cc --- /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" +} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg new file mode 100644 index 0000000..709f2b4 --- /dev/null +++ b/.kokoro/nightly/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg new file mode 100644 index 0000000..cb24f44 --- /dev/null +++ b/.kokoro/nightly/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg new file mode 100644 index 0000000..2ebdf53 --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-beyondcorp-clientconnectorservices/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 0000000..45bdd8c --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-beyondcorp-clientconnectorservices/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg new file mode 100644 index 0000000..495cc7b --- /dev/null +++ b/.kokoro/nightly/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg new file mode 100644 index 0000000..9761fd8 --- /dev/null +++ b/.kokoro/nightly/samples.cfg @@ -0,0 +1,38 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-docs-samples-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} + +env_vars: { + key: "ENABLE_FLAKYBOT" + value: "true" +} diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh new file mode 100755 index 0000000..f525142 --- /dev/null +++ b/.kokoro/populate-secrets.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2020 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + + +# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: +# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com +SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" +mkdir -p ${SECRET_LOCATION} +for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") +do + msg "Retrieving secret ${key}" + docker run --entrypoint=gcloud \ + --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ + gcr.io/google.com/cloudsdktool/cloud-sdk \ + secrets versions access latest \ + --project cloud-devrel-kokoro-resources \ + --secret ${key} > \ + "${SECRET_LOCATION}/${key}" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + fi +done diff --git a/.kokoro/presubmit/clirr.cfg b/.kokoro/presubmit/clirr.cfg new file mode 100644 index 0000000..ec57244 --- /dev/null +++ b/.kokoro/presubmit/clirr.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "clirr" +} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg new file mode 100644 index 0000000..654779f --- /dev/null +++ b/.kokoro/presubmit/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-beyondcorp-clientconnectorservices/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-beyondcorp-clientconnectorservices/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg new file mode 100644 index 0000000..ad151cc --- /dev/null +++ b/.kokoro/presubmit/dependencies.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-beyondcorp-clientconnectorservices/.kokoro/dependencies.sh" +} diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg new file mode 100644 index 0000000..a3f7fb9 --- /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 diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg new file mode 100644 index 0000000..4c7225e --- /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" +} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 0000000..dded67a --- /dev/null +++ b/.kokoro/presubmit/integration.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg new file mode 100644 index 0000000..709f2b4 --- /dev/null +++ b/.kokoro/presubmit/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg new file mode 100644 index 0000000..cb24f44 --- /dev/null +++ b/.kokoro/presubmit/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg new file mode 100644 index 0000000..2ebdf53 --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-beyondcorp-clientconnectorservices/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 0000000..45bdd8c --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-beyondcorp-clientconnectorservices/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg new file mode 100644 index 0000000..495cc7b --- /dev/null +++ b/.kokoro/presubmit/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg new file mode 100644 index 0000000..e158c40 --- /dev/null +++ b/.kokoro/presubmit/linkage-monitor.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-beyondcorp-clientconnectorservices/.kokoro/linkage-monitor.sh" +} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg new file mode 100644 index 0000000..6d323c8 --- /dev/null +++ b/.kokoro/presubmit/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg new file mode 100644 index 0000000..01e0960 --- /dev/null +++ b/.kokoro/presubmit/samples.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-docs-samples-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} \ No newline at end of file diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh new file mode 100755 index 0000000..81e58f2 --- /dev/null +++ b/.kokoro/readme.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +cd ${KOKORO_ARTIFACTS_DIR}/github/java-beyondcorp-clientconnectorservices + +# 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-beyondcorp-clientconnectorservices \ + --synth-file-name=.github/readme/synth.py \ + --metadata-path=.github/readme/synth.metadata \ + --pr-title="chore: regenerate README" \ + --branch-suffix="readme" + +# autosynth returns 28 to signal there are no changes +RETURN_CODE=$? +if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]] +then + exit ${RETURN_CODE} +fi diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 0000000..1156e60 --- /dev/null +++ b/.kokoro/release/bump_snapshot.cfg @@ -0,0 +1,53 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-beyondcorp-clientconnectorservices/.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-beyondcorp-clientconnectorservices/.kokoro/release/bump_snapshot.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +} diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 0000000..1cb2907 --- /dev/null +++ b/.kokoro/release/common.cfg @@ -0,0 +1,49 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-beyondcorp-clientconnectorservices/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-keyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-passphrase" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-pubkeyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "sonatype-credentials" + } + } +} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh new file mode 100755 index 0000000..7f78ee4 --- /dev/null +++ b/.kokoro/release/common.sh @@ -0,0 +1,50 @@ +#!/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 new file mode 100644 index 0000000..98d5234 --- /dev/null +++ b/.kokoro/release/drop.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-beyondcorp-clientconnectorservices/.kokoro/release/drop.sh" +} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 0000000..742ec1a --- /dev/null +++ b/.kokoro/release/drop.sh @@ -0,0 +1,32 @@ +#!/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 new file mode 100644 index 0000000..5fb1c8f --- /dev/null +++ b/.kokoro/release/promote.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-beyondcorp-clientconnectorservices/.kokoro/release/promote.sh" +} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 0000000..3cac3d8 --- /dev/null +++ b/.kokoro/release/promote.sh @@ -0,0 +1,34 @@ +#!/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 new file mode 100644 index 0000000..c64602f --- /dev/null +++ b/.kokoro/release/publish_javadoc.cfg @@ -0,0 +1,23 @@ +# 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-beyondcorp-clientconnectorservices/.kokoro/release/publish_javadoc.sh" +} + + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh new file mode 100755 index 0000000..a0c7a6e --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,53 @@ +#!/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 gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-cloud-beyondcorp-clientconnectorservices +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 new file mode 100644 index 0000000..7c9ecdb --- /dev/null +++ b/.kokoro/release/publish_javadoc11.cfg @@ -0,0 +1,30 @@ +# 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-beyondcorp-clientconnectorservices/.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 new file mode 100755 index 0000000..454b16e --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,63 @@ +#!/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 gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-cloud-beyondcorp-clientconnectorservices +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 new file mode 100644 index 0000000..8525c67 --- /dev/null +++ b/.kokoro/release/snapshot.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-beyondcorp-clientconnectorservices/.kokoro/release/snapshot.sh" +} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh new file mode 100755 index 0000000..1f55b77 --- /dev/null +++ b/.kokoro/release/snapshot.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +# ensure we're trying to push a snapshot (no-result returns non-zero exit code) +grep SNAPSHOT versions.txt + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg new file mode 100644 index 0000000..b728ad5 --- /dev/null +++ b/.kokoro/release/stage.cfg @@ -0,0 +1,19 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-beyondcorp-clientconnectorservices/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-beyondcorp-clientconnectorservices/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-beyondcorp-clientconnectorservices" + } +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" +} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh new file mode 100755 index 0000000..1dba8de --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,46 @@ +#!/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 +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +source $(dirname "$0")/common.sh +source $(dirname "$0")/../common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +# attempt to stage 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn clean 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/trampoline.sh b/.kokoro/trampoline.sh new file mode 100644 index 0000000..8b69b79 --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,26 @@ +#!/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 new file mode 100644 index 0000000..ddf10f0 --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "beyondcorp-clientconnectorservices", + "name_pretty": "BeyondCorp ClientConnectorServices", + "product_documentation": "https://cloud.google.com/beyondcorp-enterprise/", + "api_description": "A zero trust solution that enables secure access to applications and resources, and offers integrated threat and data protection.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-beyondcorp-clientconnectorservices/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-beyondcorp-clientconnectorservices", + "repo_short": "java-beyondcorp-clientconnectorservices", + "distribution_name": "com.google.cloud:google-cloud-beyondcorp-clientconnectorservices", + "api_id": "beyondcorp-clientconnectorservices.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..2add254 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b65dd27 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,92 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). + +## Building the project + +To build, package, and run all unit tests run the command + +``` +mvn clean verify +``` + +### Running Integration tests + +To include integration tests when building the project, you need access to +a GCP Project with a valid service account. + +For instructions on how to generate a service account and corresponding +credentials JSON see: [Creating a Service Account][1]. + +Then run the following to build, package, run all unit tests and run all +integration tests. + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-integration-tests clean verify +``` + +## Code Samples + +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 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. +3. Code samples are not released as Maven artifacts and must be excluded from + release builds. + +### Building + +```bash +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 clean verify +``` + +### Code Formatting + +Code in this repo is formatted with +[google-java-format](https://github.com/google/google-java-format). +To run formatting on your project, you can run: +``` +mvn com.coveo:fmt-maven-plugin:format +``` + +[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account +[2]: https://maven.apache.org/settings.html#Active_Profiles +[3]: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3538a5e --- /dev/null +++ b/README.md @@ -0,0 +1,201 @@ +# Google BeyondCorp ClientConnectorServices Client for Java + +Java idiomatic client for [BeyondCorp ClientConnectorServices][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven, add this to your pom.xml file: + + +```xml + + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-beyondcorp-clientconnectorservices:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-beyondcorp-clientconnectorservices" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired BeyondCorp ClientConnectorServices APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the BeyondCorp ClientConnectorServices API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the BeyondCorp ClientConnectorServices [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google BeyondCorp ClientConnectorServices. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-beyondcorp-clientconnectorservices` library. See the [Quickstart](#quickstart) section +to add `google-cloud-beyondcorp-clientconnectorservices` as a dependency in your code. + +## About BeyondCorp ClientConnectorServices + + +[BeyondCorp ClientConnectorServices][product-docs] A zero trust solution that enables secure access to applications and resources, and offers integrated threat and data protection. + +See the [BeyondCorp ClientConnectorServices client library docs][javadocs] to learn how to +use this BeyondCorp ClientConnectorServices Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +BeyondCorp ClientConnectorServices uses gRPC for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/beyondcorp-enterprise/ +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-beyondcorp-clientconnectorservices/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-beyondcorp-clientconnectorservices/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-beyondcorp-clientconnectorservices/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-beyondcorp-clientconnectorservices/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-beyondcorp-clientconnectorservices/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-beyondcorp-clientconnectorservices/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-beyondcorp-clientconnectorservices/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-beyondcorp-clientconnectorservices/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-beyondcorp-clientconnectorservices/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-beyondcorp-clientconnectorservices/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-beyondcorp-clientconnectorservices/java11.html +[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-beyondcorp-clientconnectorservices.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-beyondcorp-clientconnectorservices&core=gav +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-sdk]: https://cloud.google.com/sdk/ +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-beyondcorp-clientconnectorservices/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-beyondcorp-clientconnectorservices/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-beyondcorp-clientconnectorservices/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=beyondcorp-clientconnectorservices.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..8b58ae9 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). + +The Google Security Team will respond within 5 working days of your report on g.co/vulnz. + +We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. diff --git a/google-cloud-beyondcorp-clientconnectorservices-bom/pom.xml b/google-cloud-beyondcorp-clientconnectorservices-bom/pom.xml new file mode 100644 index 0000000..aa1535e --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices-bom/pom.xml @@ -0,0 +1,94 @@ + + + 4.0.0 + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 1.2.7 + + + Google BeyondCorp ClientConnectorServices BOM + https://github.com/googleapis/java-beyondcorp-clientconnectorservices + + BOM for BeyondCorp ClientConnectorServices + + + + Google LLC + + + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + neenushaji + Neenu Shaji + neenushaji@google.com + Google LLC + + Developer + + + + + + scm:git:https://github.com/googleapis/java-beyondcorp-clientconnectorservices.git + scm:git:git@github.com:googleapis/java-beyondcorp-clientconnectorservices.git + https://github.com/googleapis/java-beyondcorp-clientconnectorservices + + + + true + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-beyondcorp-clientconnectorservices-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-beyondcorp-clientconnectorservices-v1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + diff --git a/google-cloud-beyondcorp-clientconnectorservices/pom.xml b/google-cloud-beyondcorp-clientconnectorservices/pom.xml new file mode 100644 index 0000000..9b441f4 --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/pom.xml @@ -0,0 +1,139 @@ + + + 4.0.0 + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices + 0.0.1-SNAPSHOT + jar + Google BeyondCorp ClientConnectorServices + https://github.com/googleapis/java-beyondcorp-clientconnectorservices + BeyondCorp ClientConnectorServices A zero trust solution that enables secure access to applications and resources, and offers integrated threat and data protection. + + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices-parent + 0.0.1-SNAPSHOT + + + google-cloud-beyondcorp-clientconnectorservices + + + + 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-beyondcorp-clientconnectorservices-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + grpc-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api.grpc + grpc-google-iam-v1 + + + org.threeten + threetenbp + + + + + junit + junit + test + 4.13.2 + + + + com.google.api.grpc + grpc-google-cloud-beyondcorp-clientconnectorservices-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 + + + + \ No newline at end of file diff --git a/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceClient.java b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceClient.java new file mode 100644 index 0000000..3495b6a --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceClient.java @@ -0,0 +1,1528 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.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.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.stub.ClientConnectorServicesServiceStub; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.stub.ClientConnectorServicesServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: ## API Overview + * + *

The `beyondcorp.googleapis.com` service implements the Google Cloud BeyondCorp API. + * + *

## Data Model + * + *

The ClientConnectorServicesService exposes the following resources: + * + *

    + *
  • Client Connector Services, named as follows: + * `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. + *
+ * + *

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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+ *     ClientConnectorServicesServiceClient.create()) {
+ *   ClientConnectorServiceName name =
+ *       ClientConnectorServiceName.of("[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]");
+ *   ClientConnectorService response =
+ *       clientConnectorServicesServiceClient.getClientConnectorService(name);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ClientConnectorServicesServiceSettings clientConnectorServicesServiceSettings =
+ *     ClientConnectorServicesServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+ *     ClientConnectorServicesServiceClient.create(clientConnectorServicesServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ClientConnectorServicesServiceSettings clientConnectorServicesServiceSettings =
+ *     ClientConnectorServicesServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+ *     ClientConnectorServicesServiceClient.create(clientConnectorServicesServiceSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (ClientConnectorService element :
+   *       clientConnectorServicesServiceClient.listClientConnectorServices(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListClientConnectorServicesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClientConnectorServicesPagedResponse listClientConnectorServices( + LocationName parent) { + ListClientConnectorServicesRequest request = + ListClientConnectorServicesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listClientConnectorServices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ClientConnectorServices in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (ClientConnectorService element :
+   *       clientConnectorServicesServiceClient.listClientConnectorServices(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListClientConnectorServicesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClientConnectorServicesPagedResponse listClientConnectorServices(String parent) { + ListClientConnectorServicesRequest request = + ListClientConnectorServicesRequest.newBuilder().setParent(parent).build(); + return listClientConnectorServices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ClientConnectorServices in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   ListClientConnectorServicesRequest request =
+   *       ListClientConnectorServicesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (ClientConnectorService element :
+   *       clientConnectorServicesServiceClient.listClientConnectorServices(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 ListClientConnectorServicesPagedResponse listClientConnectorServices( + ListClientConnectorServicesRequest request) { + return listClientConnectorServicesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ClientConnectorServices in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   ListClientConnectorServicesRequest request =
+   *       ListClientConnectorServicesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       clientConnectorServicesServiceClient
+   *           .listClientConnectorServicesPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (ClientConnectorService element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListClientConnectorServicesRequest, ListClientConnectorServicesPagedResponse> + listClientConnectorServicesPagedCallable() { + return stub.listClientConnectorServicesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ClientConnectorServices in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   ListClientConnectorServicesRequest request =
+   *       ListClientConnectorServicesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListClientConnectorServicesResponse response =
+   *         clientConnectorServicesServiceClient
+   *             .listClientConnectorServicesCallable()
+   *             .call(request);
+   *     for (ClientConnectorService element : response.getClientConnectorServicesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListClientConnectorServicesRequest, ListClientConnectorServicesResponse> + listClientConnectorServicesCallable() { + return stub.listClientConnectorServicesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   ClientConnectorServiceName name =
+   *       ClientConnectorServiceName.of("[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]");
+   *   ClientConnectorService response =
+   *       clientConnectorServicesServiceClient.getClientConnectorService(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ClientConnectorService getClientConnectorService(ClientConnectorServiceName name) { + GetClientConnectorServiceRequest request = + GetClientConnectorServiceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getClientConnectorService(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   String name =
+   *       ClientConnectorServiceName.of("[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *           .toString();
+   *   ClientConnectorService response =
+   *       clientConnectorServicesServiceClient.getClientConnectorService(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ClientConnectorService getClientConnectorService(String name) { + GetClientConnectorServiceRequest request = + GetClientConnectorServiceRequest.newBuilder().setName(name).build(); + return getClientConnectorService(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   GetClientConnectorServiceRequest request =
+   *       GetClientConnectorServiceRequest.newBuilder()
+   *           .setName(
+   *               ClientConnectorServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *                   .toString())
+   *           .build();
+   *   ClientConnectorService response =
+   *       clientConnectorServicesServiceClient.getClientConnectorService(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 ClientConnectorService getClientConnectorService( + GetClientConnectorServiceRequest request) { + return getClientConnectorServiceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   GetClientConnectorServiceRequest request =
+   *       GetClientConnectorServiceRequest.newBuilder()
+   *           .setName(
+   *               ClientConnectorServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       clientConnectorServicesServiceClient
+   *           .getClientConnectorServiceCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   ClientConnectorService response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getClientConnectorServiceCallable() { + return stub.getClientConnectorServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new ClientConnectorService in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ClientConnectorService clientConnectorService = ClientConnectorService.newBuilder().build();
+   *   String clientConnectorServiceId = "clientConnectorServiceId766123022";
+   *   ClientConnectorService response =
+   *       clientConnectorServicesServiceClient
+   *           .createClientConnectorServiceAsync(
+   *               parent, clientConnectorService, clientConnectorServiceId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param clientConnectorService Required. The resource being created. + * @param clientConnectorServiceId Optional. User-settable client connector service resource ID. + * * Must start with a letter. * Must contain between 4-63 characters from + * `/[a-z][0-9]-/`. * Must end with a number or a letter. + *

A random system generated name will be assigned if not specified by the user. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createClientConnectorServiceAsync( + LocationName parent, + ClientConnectorService clientConnectorService, + String clientConnectorServiceId) { + CreateClientConnectorServiceRequest request = + CreateClientConnectorServiceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setClientConnectorService(clientConnectorService) + .setClientConnectorServiceId(clientConnectorServiceId) + .build(); + return createClientConnectorServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new ClientConnectorService in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ClientConnectorService clientConnectorService = ClientConnectorService.newBuilder().build();
+   *   String clientConnectorServiceId = "clientConnectorServiceId766123022";
+   *   ClientConnectorService response =
+   *       clientConnectorServicesServiceClient
+   *           .createClientConnectorServiceAsync(
+   *               parent, clientConnectorService, clientConnectorServiceId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param clientConnectorService Required. The resource being created. + * @param clientConnectorServiceId Optional. User-settable client connector service resource ID. + * * Must start with a letter. * Must contain between 4-63 characters from + * `/[a-z][0-9]-/`. * Must end with a number or a letter. + *

A random system generated name will be assigned if not specified by the user. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createClientConnectorServiceAsync( + String parent, + ClientConnectorService clientConnectorService, + String clientConnectorServiceId) { + CreateClientConnectorServiceRequest request = + CreateClientConnectorServiceRequest.newBuilder() + .setParent(parent) + .setClientConnectorService(clientConnectorService) + .setClientConnectorServiceId(clientConnectorServiceId) + .build(); + return createClientConnectorServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new ClientConnectorService in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   CreateClientConnectorServiceRequest request =
+   *       CreateClientConnectorServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClientConnectorServiceId("clientConnectorServiceId766123022")
+   *           .setClientConnectorService(ClientConnectorService.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ClientConnectorService response =
+   *       clientConnectorServicesServiceClient.createClientConnectorServiceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createClientConnectorServiceAsync(CreateClientConnectorServiceRequest request) { + return createClientConnectorServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new ClientConnectorService in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   CreateClientConnectorServiceRequest request =
+   *       CreateClientConnectorServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClientConnectorServiceId("clientConnectorServiceId766123022")
+   *           .setClientConnectorService(ClientConnectorService.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       clientConnectorServicesServiceClient
+   *           .createClientConnectorServiceOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   ClientConnectorService response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + createClientConnectorServiceOperationCallable() { + return stub.createClientConnectorServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new ClientConnectorService in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   CreateClientConnectorServiceRequest request =
+   *       CreateClientConnectorServiceRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClientConnectorServiceId("clientConnectorServiceId766123022")
+   *           .setClientConnectorService(ClientConnectorService.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       clientConnectorServicesServiceClient
+   *           .createClientConnectorServiceCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createClientConnectorServiceCallable() { + return stub.createClientConnectorServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   ClientConnectorService clientConnectorService = ClientConnectorService.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ClientConnectorService response =
+   *       clientConnectorServicesServiceClient
+   *           .updateClientConnectorServiceAsync(clientConnectorService, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param clientConnectorService Required. The resource being updated. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * ClientConnectorService resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be overwritten. + *

Mutable fields: display_name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateClientConnectorServiceAsync( + ClientConnectorService clientConnectorService, FieldMask updateMask) { + UpdateClientConnectorServiceRequest request = + UpdateClientConnectorServiceRequest.newBuilder() + .setClientConnectorService(clientConnectorService) + .setUpdateMask(updateMask) + .build(); + return updateClientConnectorServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   UpdateClientConnectorServiceRequest request =
+   *       UpdateClientConnectorServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setClientConnectorService(ClientConnectorService.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ClientConnectorService response =
+   *       clientConnectorServicesServiceClient.updateClientConnectorServiceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateClientConnectorServiceAsync(UpdateClientConnectorServiceRequest request) { + return updateClientConnectorServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   UpdateClientConnectorServiceRequest request =
+   *       UpdateClientConnectorServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setClientConnectorService(ClientConnectorService.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .build();
+   *   OperationFuture future =
+   *       clientConnectorServicesServiceClient
+   *           .updateClientConnectorServiceOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   ClientConnectorService response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + updateClientConnectorServiceOperationCallable() { + return stub.updateClientConnectorServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   UpdateClientConnectorServiceRequest request =
+   *       UpdateClientConnectorServiceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setClientConnectorService(ClientConnectorService.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future =
+   *       clientConnectorServicesServiceClient
+   *           .updateClientConnectorServiceCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateClientConnectorServiceCallable() { + return stub.updateClientConnectorServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   ClientConnectorServiceName name =
+   *       ClientConnectorServiceName.of("[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]");
+   *   clientConnectorServicesServiceClient.deleteClientConnectorServiceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + deleteClientConnectorServiceAsync(ClientConnectorServiceName name) { + DeleteClientConnectorServiceRequest request = + DeleteClientConnectorServiceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteClientConnectorServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   String name =
+   *       ClientConnectorServiceName.of("[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *           .toString();
+   *   clientConnectorServicesServiceClient.deleteClientConnectorServiceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + deleteClientConnectorServiceAsync(String name) { + DeleteClientConnectorServiceRequest request = + DeleteClientConnectorServiceRequest.newBuilder().setName(name).build(); + return deleteClientConnectorServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   DeleteClientConnectorServiceRequest request =
+   *       DeleteClientConnectorServiceRequest.newBuilder()
+   *           .setName(
+   *               ClientConnectorServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   clientConnectorServicesServiceClient.deleteClientConnectorServiceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + deleteClientConnectorServiceAsync(DeleteClientConnectorServiceRequest request) { + return deleteClientConnectorServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   DeleteClientConnectorServiceRequest request =
+   *       DeleteClientConnectorServiceRequest.newBuilder()
+   *           .setName(
+   *               ClientConnectorServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       clientConnectorServicesServiceClient
+   *           .deleteClientConnectorServiceOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + DeleteClientConnectorServiceRequest, Empty, ClientConnectorServiceOperationMetadata> + deleteClientConnectorServiceOperationCallable() { + return stub.deleteClientConnectorServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single ClientConnectorService. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   DeleteClientConnectorServiceRequest request =
+   *       DeleteClientConnectorServiceRequest.newBuilder()
+   *           .setName(
+   *               ClientConnectorServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       clientConnectorServicesServiceClient
+   *           .deleteClientConnectorServiceCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteClientConnectorServiceCallable() { + return stub.deleteClientConnectorServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element :
+   *       clientConnectorServicesServiceClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       clientConnectorServicesServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         clientConnectorServicesServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = clientConnectorServicesServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       clientConnectorServicesServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ClientConnectorServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = clientConnectorServicesServiceClient.setIamPolicy(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 setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ClientConnectorServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       clientConnectorServicesServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ClientConnectorServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = clientConnectorServicesServiceClient.getIamPolicy(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 getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ClientConnectorServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       clientConnectorServicesServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               ClientConnectorServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       clientConnectorServicesServiceClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+   *     ClientConnectorServicesServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               ClientConnectorServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       clientConnectorServicesServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @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 ListClientConnectorServicesPagedResponse + extends AbstractPagedListResponse< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ClientConnectorService, + ListClientConnectorServicesPage, + ListClientConnectorServicesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ClientConnectorService> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListClientConnectorServicesPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListClientConnectorServicesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListClientConnectorServicesPagedResponse(ListClientConnectorServicesPage page) { + super(page, ListClientConnectorServicesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListClientConnectorServicesPage + extends AbstractPage< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ClientConnectorService, + ListClientConnectorServicesPage> { + + private ListClientConnectorServicesPage( + PageContext< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ClientConnectorService> + context, + ListClientConnectorServicesResponse response) { + super(context, response); + } + + private static ListClientConnectorServicesPage createEmptyPage() { + return new ListClientConnectorServicesPage(null, null); + } + + @Override + protected ListClientConnectorServicesPage createPage( + PageContext< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ClientConnectorService> + context, + ListClientConnectorServicesResponse response) { + return new ListClientConnectorServicesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ClientConnectorService> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListClientConnectorServicesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ClientConnectorService, + ListClientConnectorServicesPage, + ListClientConnectorServicesFixedSizeCollection> { + + private ListClientConnectorServicesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListClientConnectorServicesFixedSizeCollection createEmptyCollection() { + return new ListClientConnectorServicesFixedSizeCollection(null, 0); + } + + @Override + protected ListClientConnectorServicesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListClientConnectorServicesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceSettings.java b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceSettings.java new file mode 100644 index 0000000..1fd272f --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceSettings.java @@ -0,0 +1,372 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.v1; + +import static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesServiceClient.ListClientConnectorServicesPagedResponse; +import static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.stub.ClientConnectorServicesServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ClientConnectorServicesServiceClient}. + * + *

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

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ClientConnectorServicesServiceSettings.Builder clientConnectorServicesServiceSettingsBuilder =
+ *     ClientConnectorServicesServiceSettings.newBuilder();
+ * clientConnectorServicesServiceSettingsBuilder
+ *     .getClientConnectorServiceSettings()
+ *     .setRetrySettings(
+ *         clientConnectorServicesServiceSettingsBuilder
+ *             .getClientConnectorServiceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ClientConnectorServicesServiceSettings clientConnectorServicesServiceSettings =
+ *     clientConnectorServicesServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ClientConnectorServicesServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to listClientConnectorServices. */ + public PagedCallSettings< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ListClientConnectorServicesPagedResponse> + listClientConnectorServicesSettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()) + .listClientConnectorServicesSettings(); + } + + /** Returns the object with the settings used for calls to getClientConnectorService. */ + public UnaryCallSettings + getClientConnectorServiceSettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()) + .getClientConnectorServiceSettings(); + } + + /** Returns the object with the settings used for calls to createClientConnectorService. */ + public UnaryCallSettings + createClientConnectorServiceSettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()) + .createClientConnectorServiceSettings(); + } + + /** Returns the object with the settings used for calls to createClientConnectorService. */ + public OperationCallSettings< + CreateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + createClientConnectorServiceOperationSettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()) + .createClientConnectorServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateClientConnectorService. */ + public UnaryCallSettings + updateClientConnectorServiceSettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()) + .updateClientConnectorServiceSettings(); + } + + /** Returns the object with the settings used for calls to updateClientConnectorService. */ + public OperationCallSettings< + UpdateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + updateClientConnectorServiceOperationSettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()) + .updateClientConnectorServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteClientConnectorService. */ + public UnaryCallSettings + deleteClientConnectorServiceSettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()) + .deleteClientConnectorServiceSettings(); + } + + /** Returns the object with the settings used for calls to deleteClientConnectorService. */ + public OperationCallSettings< + DeleteClientConnectorServiceRequest, Empty, ClientConnectorServiceOperationMetadata> + deleteClientConnectorServiceOperationSettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()) + .deleteClientConnectorServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((ClientConnectorServicesServiceStubSettings) getStubSettings()) + .testIamPermissionsSettings(); + } + + public static final ClientConnectorServicesServiceSettings create( + ClientConnectorServicesServiceStubSettings stub) throws IOException { + return new ClientConnectorServicesServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ClientConnectorServicesServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ClientConnectorServicesServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ClientConnectorServicesServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ClientConnectorServicesServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ClientConnectorServicesServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ClientConnectorServicesServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ClientConnectorServicesServiceStubSettings.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 ClientConnectorServicesServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ClientConnectorServicesServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ClientConnectorServicesServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(ClientConnectorServicesServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ClientConnectorServicesServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ClientConnectorServicesServiceStubSettings.newBuilder()); + } + + public ClientConnectorServicesServiceStubSettings.Builder getStubSettingsBuilder() { + return ((ClientConnectorServicesServiceStubSettings.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 listClientConnectorServices. */ + public PagedCallSettings.Builder< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ListClientConnectorServicesPagedResponse> + listClientConnectorServicesSettings() { + return getStubSettingsBuilder().listClientConnectorServicesSettings(); + } + + /** Returns the builder for the settings used for calls to getClientConnectorService. */ + public UnaryCallSettings.Builder + getClientConnectorServiceSettings() { + return getStubSettingsBuilder().getClientConnectorServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createClientConnectorService. */ + public UnaryCallSettings.Builder + createClientConnectorServiceSettings() { + return getStubSettingsBuilder().createClientConnectorServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createClientConnectorService. */ + public OperationCallSettings.Builder< + CreateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + createClientConnectorServiceOperationSettings() { + return getStubSettingsBuilder().createClientConnectorServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateClientConnectorService. */ + public UnaryCallSettings.Builder + updateClientConnectorServiceSettings() { + return getStubSettingsBuilder().updateClientConnectorServiceSettings(); + } + + /** Returns the builder for the settings used for calls to updateClientConnectorService. */ + public OperationCallSettings.Builder< + UpdateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + updateClientConnectorServiceOperationSettings() { + return getStubSettingsBuilder().updateClientConnectorServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteClientConnectorService. */ + public UnaryCallSettings.Builder + deleteClientConnectorServiceSettings() { + return getStubSettingsBuilder().deleteClientConnectorServiceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteClientConnectorService. */ + public OperationCallSettings.Builder< + DeleteClientConnectorServiceRequest, Empty, ClientConnectorServiceOperationMetadata> + deleteClientConnectorServiceOperationSettings() { + return getStubSettingsBuilder().deleteClientConnectorServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public ClientConnectorServicesServiceSettings build() throws IOException { + return new ClientConnectorServicesServiceSettings(this); + } + } +} diff --git a/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/gapic_metadata.json b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/gapic_metadata.json new file mode 100644 index 0000000..145a909 --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.beyondcorp.clientconnectorservices.v1", + "libraryPackage": "com.google.cloud.beyondcorp.clientconnectorservices.v1", + "services": { + "ClientConnectorServicesService": { + "clients": { + "grpc": { + "libraryClient": "ClientConnectorServicesServiceClient", + "rpcs": { + "CreateClientConnectorService": { + "methods": ["createClientConnectorServiceAsync", "createClientConnectorServiceAsync", "createClientConnectorServiceAsync", "createClientConnectorServiceOperationCallable", "createClientConnectorServiceCallable"] + }, + "DeleteClientConnectorService": { + "methods": ["deleteClientConnectorServiceAsync", "deleteClientConnectorServiceAsync", "deleteClientConnectorServiceAsync", "deleteClientConnectorServiceOperationCallable", "deleteClientConnectorServiceCallable"] + }, + "GetClientConnectorService": { + "methods": ["getClientConnectorService", "getClientConnectorService", "getClientConnectorService", "getClientConnectorServiceCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListClientConnectorServices": { + "methods": ["listClientConnectorServices", "listClientConnectorServices", "listClientConnectorServices", "listClientConnectorServicesPagedCallable", "listClientConnectorServicesCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateClientConnectorService": { + "methods": ["updateClientConnectorServiceAsync", "updateClientConnectorServiceAsync", "updateClientConnectorServiceOperationCallable", "updateClientConnectorServiceCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/package-info.java b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/package-info.java new file mode 100644 index 0000000..049afb5 --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/package-info.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 BeyondCorp API + * + *

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

======================= ClientConnectorServicesServiceClient ======================= + * + *

Service Description: ## API Overview + * + *

The `beyondcorp.googleapis.com` service implements the Google Cloud BeyondCorp API. + * + *

## Data Model + * + *

The ClientConnectorServicesService exposes the following resources: + * + *

    + *
  • Client Connector Services, named as follows: + * `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. + *
+ * + *

Sample for ClientConnectorServicesServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ClientConnectorServicesServiceClient clientConnectorServicesServiceClient =
+ *     ClientConnectorServicesServiceClient.create()) {
+ *   ClientConnectorServiceName name =
+ *       ClientConnectorServiceName.of("[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]");
+ *   ClientConnectorService response =
+ *       clientConnectorServicesServiceClient.getClientConnectorService(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/ClientConnectorServicesServiceStub.java b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/ClientConnectorServicesServiceStub.java new file mode 100644 index 0000000..ee4ab66 --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/ClientConnectorServicesServiceStub.java @@ -0,0 +1,148 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.v1.stub; + +import static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesServiceClient.ListClientConnectorServicesPagedResponse; +import static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesServiceClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ClientConnectorServicesService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ClientConnectorServicesServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listClientConnectorServicesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listClientConnectorServicesPagedCallable()"); + } + + public UnaryCallable + listClientConnectorServicesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listClientConnectorServicesCallable()"); + } + + public UnaryCallable + getClientConnectorServiceCallable() { + throw new UnsupportedOperationException("Not implemented: getClientConnectorServiceCallable()"); + } + + public OperationCallable< + CreateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + createClientConnectorServiceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createClientConnectorServiceOperationCallable()"); + } + + public UnaryCallable + createClientConnectorServiceCallable() { + throw new UnsupportedOperationException( + "Not implemented: createClientConnectorServiceCallable()"); + } + + public OperationCallable< + UpdateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + updateClientConnectorServiceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateClientConnectorServiceOperationCallable()"); + } + + public UnaryCallable + updateClientConnectorServiceCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateClientConnectorServiceCallable()"); + } + + public OperationCallable< + DeleteClientConnectorServiceRequest, Empty, ClientConnectorServiceOperationMetadata> + deleteClientConnectorServiceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteClientConnectorServiceOperationCallable()"); + } + + public UnaryCallable + deleteClientConnectorServiceCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteClientConnectorServiceCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/ClientConnectorServicesServiceStubSettings.java b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/ClientConnectorServicesServiceStubSettings.java new file mode 100644 index 0000000..c782acd --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/ClientConnectorServicesServiceStubSettings.java @@ -0,0 +1,859 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.v1.stub; + +import static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesServiceClient.ListClientConnectorServicesPagedResponse; +import static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ClientConnectorServicesServiceStub}. + * + *

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

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

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ClientConnectorServicesServiceStubSettings.Builder
+ *     clientConnectorServicesServiceSettingsBuilder =
+ *         ClientConnectorServicesServiceStubSettings.newBuilder();
+ * clientConnectorServicesServiceSettingsBuilder
+ *     .getClientConnectorServiceSettings()
+ *     .setRetrySettings(
+ *         clientConnectorServicesServiceSettingsBuilder
+ *             .getClientConnectorServiceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ClientConnectorServicesServiceStubSettings clientConnectorServicesServiceSettings =
+ *     clientConnectorServicesServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ClientConnectorServicesServiceStubSettings + 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 PagedCallSettings< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ListClientConnectorServicesPagedResponse> + listClientConnectorServicesSettings; + private final UnaryCallSettings + getClientConnectorServiceSettings; + private final UnaryCallSettings + createClientConnectorServiceSettings; + private final OperationCallSettings< + CreateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + createClientConnectorServiceOperationSettings; + private final UnaryCallSettings + updateClientConnectorServiceSettings; + private final OperationCallSettings< + UpdateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + updateClientConnectorServiceOperationSettings; + private final UnaryCallSettings + deleteClientConnectorServiceSettings; + private final OperationCallSettings< + DeleteClientConnectorServiceRequest, Empty, ClientConnectorServiceOperationMetadata> + deleteClientConnectorServiceOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ClientConnectorService> + LIST_CLIENT_CONNECTOR_SERVICES_PAGE_STR_DESC = + new PagedListDescriptor< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ClientConnectorService>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListClientConnectorServicesRequest injectToken( + ListClientConnectorServicesRequest payload, String token) { + return ListClientConnectorServicesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListClientConnectorServicesRequest injectPageSize( + ListClientConnectorServicesRequest payload, int pageSize) { + return ListClientConnectorServicesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListClientConnectorServicesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListClientConnectorServicesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListClientConnectorServicesResponse payload) { + return payload.getClientConnectorServicesList() == null + ? ImmutableList.of() + : payload.getClientConnectorServicesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ListClientConnectorServicesPagedResponse> + LIST_CLIENT_CONNECTOR_SERVICES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ListClientConnectorServicesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListClientConnectorServicesRequest, ListClientConnectorServicesResponse> + callable, + ListClientConnectorServicesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ClientConnectorService> + pageContext = + PageContext.create( + callable, LIST_CLIENT_CONNECTOR_SERVICES_PAGE_STR_DESC, request, context); + return ListClientConnectorServicesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listClientConnectorServices. */ + public PagedCallSettings< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ListClientConnectorServicesPagedResponse> + listClientConnectorServicesSettings() { + return listClientConnectorServicesSettings; + } + + /** Returns the object with the settings used for calls to getClientConnectorService. */ + public UnaryCallSettings + getClientConnectorServiceSettings() { + return getClientConnectorServiceSettings; + } + + /** Returns the object with the settings used for calls to createClientConnectorService. */ + public UnaryCallSettings + createClientConnectorServiceSettings() { + return createClientConnectorServiceSettings; + } + + /** Returns the object with the settings used for calls to createClientConnectorService. */ + public OperationCallSettings< + CreateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + createClientConnectorServiceOperationSettings() { + return createClientConnectorServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to updateClientConnectorService. */ + public UnaryCallSettings + updateClientConnectorServiceSettings() { + return updateClientConnectorServiceSettings; + } + + /** Returns the object with the settings used for calls to updateClientConnectorService. */ + public OperationCallSettings< + UpdateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + updateClientConnectorServiceOperationSettings() { + return updateClientConnectorServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteClientConnectorService. */ + public UnaryCallSettings + deleteClientConnectorServiceSettings() { + return deleteClientConnectorServiceSettings; + } + + /** Returns the object with the settings used for calls to deleteClientConnectorService. */ + public OperationCallSettings< + DeleteClientConnectorServiceRequest, Empty, ClientConnectorServiceOperationMetadata> + deleteClientConnectorServiceOperationSettings() { + return deleteClientConnectorServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public ClientConnectorServicesServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcClientConnectorServicesServiceStub.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 "beyondcorp.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "beyondcorp.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(ClientConnectorServicesServiceStubSettings.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 ClientConnectorServicesServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listClientConnectorServicesSettings = + settingsBuilder.listClientConnectorServicesSettings().build(); + getClientConnectorServiceSettings = settingsBuilder.getClientConnectorServiceSettings().build(); + createClientConnectorServiceSettings = + settingsBuilder.createClientConnectorServiceSettings().build(); + createClientConnectorServiceOperationSettings = + settingsBuilder.createClientConnectorServiceOperationSettings().build(); + updateClientConnectorServiceSettings = + settingsBuilder.updateClientConnectorServiceSettings().build(); + updateClientConnectorServiceOperationSettings = + settingsBuilder.updateClientConnectorServiceOperationSettings().build(); + deleteClientConnectorServiceSettings = + settingsBuilder.deleteClientConnectorServiceSettings().build(); + deleteClientConnectorServiceOperationSettings = + settingsBuilder.deleteClientConnectorServiceOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for ClientConnectorServicesServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ListClientConnectorServicesPagedResponse> + listClientConnectorServicesSettings; + private final UnaryCallSettings.Builder< + GetClientConnectorServiceRequest, ClientConnectorService> + getClientConnectorServiceSettings; + private final UnaryCallSettings.Builder + createClientConnectorServiceSettings; + private final OperationCallSettings.Builder< + CreateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + createClientConnectorServiceOperationSettings; + private final UnaryCallSettings.Builder + updateClientConnectorServiceSettings; + private final OperationCallSettings.Builder< + UpdateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + updateClientConnectorServiceOperationSettings; + private final UnaryCallSettings.Builder + deleteClientConnectorServiceSettings; + private final OperationCallSettings.Builder< + DeleteClientConnectorServiceRequest, Empty, ClientConnectorServiceOperationMetadata> + deleteClientConnectorServiceOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + 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); + + listClientConnectorServicesSettings = + PagedCallSettings.newBuilder(LIST_CLIENT_CONNECTOR_SERVICES_PAGE_STR_FACT); + getClientConnectorServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createClientConnectorServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createClientConnectorServiceOperationSettings = OperationCallSettings.newBuilder(); + updateClientConnectorServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateClientConnectorServiceOperationSettings = OperationCallSettings.newBuilder(); + deleteClientConnectorServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteClientConnectorServiceOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listClientConnectorServicesSettings, + getClientConnectorServiceSettings, + createClientConnectorServiceSettings, + updateClientConnectorServiceSettings, + deleteClientConnectorServiceSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(ClientConnectorServicesServiceStubSettings settings) { + super(settings); + + listClientConnectorServicesSettings = + settings.listClientConnectorServicesSettings.toBuilder(); + getClientConnectorServiceSettings = settings.getClientConnectorServiceSettings.toBuilder(); + createClientConnectorServiceSettings = + settings.createClientConnectorServiceSettings.toBuilder(); + createClientConnectorServiceOperationSettings = + settings.createClientConnectorServiceOperationSettings.toBuilder(); + updateClientConnectorServiceSettings = + settings.updateClientConnectorServiceSettings.toBuilder(); + updateClientConnectorServiceOperationSettings = + settings.updateClientConnectorServiceOperationSettings.toBuilder(); + deleteClientConnectorServiceSettings = + settings.deleteClientConnectorServiceSettings.toBuilder(); + deleteClientConnectorServiceOperationSettings = + settings.deleteClientConnectorServiceOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listClientConnectorServicesSettings, + getClientConnectorServiceSettings, + createClientConnectorServiceSettings, + updateClientConnectorServiceSettings, + deleteClientConnectorServiceSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + 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 + .listClientConnectorServicesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getClientConnectorServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createClientConnectorServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateClientConnectorServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteClientConnectorServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createClientConnectorServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ClientConnectorService.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ClientConnectorServiceOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateClientConnectorServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ClientConnectorService.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ClientConnectorServiceOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteClientConnectorServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ClientConnectorServiceOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * 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 listClientConnectorServices. */ + public PagedCallSettings.Builder< + ListClientConnectorServicesRequest, + ListClientConnectorServicesResponse, + ListClientConnectorServicesPagedResponse> + listClientConnectorServicesSettings() { + return listClientConnectorServicesSettings; + } + + /** Returns the builder for the settings used for calls to getClientConnectorService. */ + public UnaryCallSettings.Builder + getClientConnectorServiceSettings() { + return getClientConnectorServiceSettings; + } + + /** Returns the builder for the settings used for calls to createClientConnectorService. */ + public UnaryCallSettings.Builder + createClientConnectorServiceSettings() { + return createClientConnectorServiceSettings; + } + + /** Returns the builder for the settings used for calls to createClientConnectorService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + createClientConnectorServiceOperationSettings() { + return createClientConnectorServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateClientConnectorService. */ + public UnaryCallSettings.Builder + updateClientConnectorServiceSettings() { + return updateClientConnectorServiceSettings; + } + + /** Returns the builder for the settings used for calls to updateClientConnectorService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + updateClientConnectorServiceOperationSettings() { + return updateClientConnectorServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteClientConnectorService. */ + public UnaryCallSettings.Builder + deleteClientConnectorServiceSettings() { + return deleteClientConnectorServiceSettings; + } + + /** Returns the builder for the settings used for calls to deleteClientConnectorService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DeleteClientConnectorServiceRequest, Empty, ClientConnectorServiceOperationMetadata> + deleteClientConnectorServiceOperationSettings() { + return deleteClientConnectorServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public ClientConnectorServicesServiceStubSettings build() throws IOException { + return new ClientConnectorServicesServiceStubSettings(this); + } + } +} diff --git a/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/GrpcClientConnectorServicesServiceCallableFactory.java b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/GrpcClientConnectorServicesServiceCallableFactory.java new file mode 100644 index 0000000..b9deb8c --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/GrpcClientConnectorServicesServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.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 ClientConnectorServicesService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcClientConnectorServicesServiceCallableFactory 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-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/GrpcClientConnectorServicesServiceStub.java b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/GrpcClientConnectorServicesServiceStub.java new file mode 100644 index 0000000..4d5162b --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/stub/GrpcClientConnectorServicesServiceStub.java @@ -0,0 +1,568 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.v1.stub; + +import static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesServiceClient.ListClientConnectorServicesPagedResponse; +import static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesServiceClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ClientConnectorServicesService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcClientConnectorServicesServiceStub extends ClientConnectorServicesServiceStub { + private static final MethodDescriptor< + ListClientConnectorServicesRequest, ListClientConnectorServicesResponse> + listClientConnectorServicesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/ListClientConnectorServices") + .setRequestMarshaller( + ProtoUtils.marshaller(ListClientConnectorServicesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListClientConnectorServicesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getClientConnectorServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/GetClientConnectorService") + .setRequestMarshaller( + ProtoUtils.marshaller(GetClientConnectorServiceRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ClientConnectorService.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createClientConnectorServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/CreateClientConnectorService") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateClientConnectorServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateClientConnectorServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/UpdateClientConnectorService") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateClientConnectorServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteClientConnectorServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService/DeleteClientConnectorService") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteClientConnectorServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable< + ListClientConnectorServicesRequest, ListClientConnectorServicesResponse> + listClientConnectorServicesCallable; + private final UnaryCallable< + ListClientConnectorServicesRequest, ListClientConnectorServicesPagedResponse> + listClientConnectorServicesPagedCallable; + private final UnaryCallable + getClientConnectorServiceCallable; + private final UnaryCallable + createClientConnectorServiceCallable; + private final OperationCallable< + CreateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + createClientConnectorServiceOperationCallable; + private final UnaryCallable + updateClientConnectorServiceCallable; + private final OperationCallable< + UpdateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + updateClientConnectorServiceOperationCallable; + private final UnaryCallable + deleteClientConnectorServiceCallable; + private final OperationCallable< + DeleteClientConnectorServiceRequest, Empty, ClientConnectorServiceOperationMetadata> + deleteClientConnectorServiceOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcClientConnectorServicesServiceStub create( + ClientConnectorServicesServiceStubSettings settings) throws IOException { + return new GrpcClientConnectorServicesServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcClientConnectorServicesServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcClientConnectorServicesServiceStub( + ClientConnectorServicesServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcClientConnectorServicesServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcClientConnectorServicesServiceStub( + ClientConnectorServicesServiceStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcClientConnectorServicesServiceStub, 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 GrpcClientConnectorServicesServiceStub( + ClientConnectorServicesServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcClientConnectorServicesServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcClientConnectorServicesServiceStub, 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 GrpcClientConnectorServicesServiceStub( + ClientConnectorServicesServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listClientConnectorServicesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listClientConnectorServicesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + getClientConnectorServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getClientConnectorServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + createClientConnectorServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createClientConnectorServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateClientConnectorServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateClientConnectorServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "client_connector_service.name", + String.valueOf(request.getClientConnectorService().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + deleteClientConnectorServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteClientConnectorServiceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + + this.listClientConnectorServicesCallable = + callableFactory.createUnaryCallable( + listClientConnectorServicesTransportSettings, + settings.listClientConnectorServicesSettings(), + clientContext); + this.listClientConnectorServicesPagedCallable = + callableFactory.createPagedCallable( + listClientConnectorServicesTransportSettings, + settings.listClientConnectorServicesSettings(), + clientContext); + this.getClientConnectorServiceCallable = + callableFactory.createUnaryCallable( + getClientConnectorServiceTransportSettings, + settings.getClientConnectorServiceSettings(), + clientContext); + this.createClientConnectorServiceCallable = + callableFactory.createUnaryCallable( + createClientConnectorServiceTransportSettings, + settings.createClientConnectorServiceSettings(), + clientContext); + this.createClientConnectorServiceOperationCallable = + callableFactory.createOperationCallable( + createClientConnectorServiceTransportSettings, + settings.createClientConnectorServiceOperationSettings(), + clientContext, + operationsStub); + this.updateClientConnectorServiceCallable = + callableFactory.createUnaryCallable( + updateClientConnectorServiceTransportSettings, + settings.updateClientConnectorServiceSettings(), + clientContext); + this.updateClientConnectorServiceOperationCallable = + callableFactory.createOperationCallable( + updateClientConnectorServiceTransportSettings, + settings.updateClientConnectorServiceOperationSettings(), + clientContext, + operationsStub); + this.deleteClientConnectorServiceCallable = + callableFactory.createUnaryCallable( + deleteClientConnectorServiceTransportSettings, + settings.deleteClientConnectorServiceSettings(), + clientContext); + this.deleteClientConnectorServiceOperationCallable = + callableFactory.createOperationCallable( + deleteClientConnectorServiceTransportSettings, + settings.deleteClientConnectorServiceOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listClientConnectorServicesCallable() { + return listClientConnectorServicesCallable; + } + + @Override + public UnaryCallable + listClientConnectorServicesPagedCallable() { + return listClientConnectorServicesPagedCallable; + } + + @Override + public UnaryCallable + getClientConnectorServiceCallable() { + return getClientConnectorServiceCallable; + } + + @Override + public UnaryCallable + createClientConnectorServiceCallable() { + return createClientConnectorServiceCallable; + } + + @Override + public OperationCallable< + CreateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + createClientConnectorServiceOperationCallable() { + return createClientConnectorServiceOperationCallable; + } + + @Override + public UnaryCallable + updateClientConnectorServiceCallable() { + return updateClientConnectorServiceCallable; + } + + @Override + public OperationCallable< + UpdateClientConnectorServiceRequest, + ClientConnectorService, + ClientConnectorServiceOperationMetadata> + updateClientConnectorServiceOperationCallable() { + return updateClientConnectorServiceOperationCallable; + } + + @Override + public UnaryCallable + deleteClientConnectorServiceCallable() { + return deleteClientConnectorServiceCallable; + } + + @Override + public OperationCallable< + DeleteClientConnectorServiceRequest, Empty, ClientConnectorServiceOperationMetadata> + deleteClientConnectorServiceOperationCallable() { + return deleteClientConnectorServiceOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceClientTest.java b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceClientTest.java new file mode 100644 index 0000000..69ca216 --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceClientTest.java @@ -0,0 +1,847 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.v1; + +import static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesServiceClient.ListClientConnectorServicesPagedResponse; +import static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesServiceClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ClientConnectorServicesServiceClientTest { + private static MockClientConnectorServicesService mockClientConnectorServicesService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ClientConnectorServicesServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockClientConnectorServicesService = new MockClientConnectorServicesService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockClientConnectorServicesService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ClientConnectorServicesServiceSettings settings = + ClientConnectorServicesServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ClientConnectorServicesServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listClientConnectorServicesTest() throws Exception { + ClientConnectorService responsesElement = ClientConnectorService.newBuilder().build(); + ListClientConnectorServicesResponse expectedResponse = + ListClientConnectorServicesResponse.newBuilder() + .setNextPageToken("") + .addAllClientConnectorServices(Arrays.asList(responsesElement)) + .build(); + mockClientConnectorServicesService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListClientConnectorServicesPagedResponse pagedListResponse = + client.listClientConnectorServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClientConnectorServicesList().get(0), resources.get(0)); + + List actualRequests = mockClientConnectorServicesService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListClientConnectorServicesRequest actualRequest = + ((ListClientConnectorServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listClientConnectorServicesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockClientConnectorServicesService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listClientConnectorServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listClientConnectorServicesTest2() throws Exception { + ClientConnectorService responsesElement = ClientConnectorService.newBuilder().build(); + ListClientConnectorServicesResponse expectedResponse = + ListClientConnectorServicesResponse.newBuilder() + .setNextPageToken("") + .addAllClientConnectorServices(Arrays.asList(responsesElement)) + .build(); + mockClientConnectorServicesService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListClientConnectorServicesPagedResponse pagedListResponse = + client.listClientConnectorServices(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClientConnectorServicesList().get(0), resources.get(0)); + + List actualRequests = mockClientConnectorServicesService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListClientConnectorServicesRequest actualRequest = + ((ListClientConnectorServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listClientConnectorServicesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockClientConnectorServicesService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listClientConnectorServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClientConnectorServiceTest() throws Exception { + ClientConnectorService expectedResponse = + ClientConnectorService.newBuilder() + .setName( + ClientConnectorServiceName.of( + "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setIngress(ClientConnectorService.Ingress.newBuilder().build()) + .setEgress(ClientConnectorService.Egress.newBuilder().build()) + .build(); + mockClientConnectorServicesService.addResponse(expectedResponse); + + ClientConnectorServiceName name = + ClientConnectorServiceName.of("[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]"); + + ClientConnectorService actualResponse = client.getClientConnectorService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockClientConnectorServicesService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClientConnectorServiceRequest actualRequest = + ((GetClientConnectorServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClientConnectorServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockClientConnectorServicesService.addException(exception); + + try { + ClientConnectorServiceName name = + ClientConnectorServiceName.of("[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]"); + client.getClientConnectorService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClientConnectorServiceTest2() throws Exception { + ClientConnectorService expectedResponse = + ClientConnectorService.newBuilder() + .setName( + ClientConnectorServiceName.of( + "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setIngress(ClientConnectorService.Ingress.newBuilder().build()) + .setEgress(ClientConnectorService.Egress.newBuilder().build()) + .build(); + mockClientConnectorServicesService.addResponse(expectedResponse); + + String name = "name3373707"; + + ClientConnectorService actualResponse = client.getClientConnectorService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockClientConnectorServicesService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClientConnectorServiceRequest actualRequest = + ((GetClientConnectorServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClientConnectorServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockClientConnectorServicesService.addException(exception); + + try { + String name = "name3373707"; + client.getClientConnectorService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createClientConnectorServiceTest() throws Exception { + ClientConnectorService expectedResponse = + ClientConnectorService.newBuilder() + .setName( + ClientConnectorServiceName.of( + "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setIngress(ClientConnectorService.Ingress.newBuilder().build()) + .setEgress(ClientConnectorService.Egress.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClientConnectorServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockClientConnectorServicesService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ClientConnectorService clientConnectorService = ClientConnectorService.newBuilder().build(); + String clientConnectorServiceId = "clientConnectorServiceId766123022"; + + ClientConnectorService actualResponse = + client + .createClientConnectorServiceAsync( + parent, clientConnectorService, clientConnectorServiceId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockClientConnectorServicesService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateClientConnectorServiceRequest actualRequest = + ((CreateClientConnectorServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(clientConnectorService, actualRequest.getClientConnectorService()); + Assert.assertEquals(clientConnectorServiceId, actualRequest.getClientConnectorServiceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createClientConnectorServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockClientConnectorServicesService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ClientConnectorService clientConnectorService = ClientConnectorService.newBuilder().build(); + String clientConnectorServiceId = "clientConnectorServiceId766123022"; + client + .createClientConnectorServiceAsync( + parent, clientConnectorService, clientConnectorServiceId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createClientConnectorServiceTest2() throws Exception { + ClientConnectorService expectedResponse = + ClientConnectorService.newBuilder() + .setName( + ClientConnectorServiceName.of( + "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setIngress(ClientConnectorService.Ingress.newBuilder().build()) + .setEgress(ClientConnectorService.Egress.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClientConnectorServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockClientConnectorServicesService.addResponse(resultOperation); + + String parent = "parent-995424086"; + ClientConnectorService clientConnectorService = ClientConnectorService.newBuilder().build(); + String clientConnectorServiceId = "clientConnectorServiceId766123022"; + + ClientConnectorService actualResponse = + client + .createClientConnectorServiceAsync( + parent, clientConnectorService, clientConnectorServiceId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockClientConnectorServicesService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateClientConnectorServiceRequest actualRequest = + ((CreateClientConnectorServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(clientConnectorService, actualRequest.getClientConnectorService()); + Assert.assertEquals(clientConnectorServiceId, actualRequest.getClientConnectorServiceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createClientConnectorServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockClientConnectorServicesService.addException(exception); + + try { + String parent = "parent-995424086"; + ClientConnectorService clientConnectorService = ClientConnectorService.newBuilder().build(); + String clientConnectorServiceId = "clientConnectorServiceId766123022"; + client + .createClientConnectorServiceAsync( + parent, clientConnectorService, clientConnectorServiceId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateClientConnectorServiceTest() throws Exception { + ClientConnectorService expectedResponse = + ClientConnectorService.newBuilder() + .setName( + ClientConnectorServiceName.of( + "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setIngress(ClientConnectorService.Ingress.newBuilder().build()) + .setEgress(ClientConnectorService.Egress.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateClientConnectorServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockClientConnectorServicesService.addResponse(resultOperation); + + ClientConnectorService clientConnectorService = ClientConnectorService.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ClientConnectorService actualResponse = + client.updateClientConnectorServiceAsync(clientConnectorService, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockClientConnectorServicesService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateClientConnectorServiceRequest actualRequest = + ((UpdateClientConnectorServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(clientConnectorService, actualRequest.getClientConnectorService()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateClientConnectorServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockClientConnectorServicesService.addException(exception); + + try { + ClientConnectorService clientConnectorService = ClientConnectorService.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateClientConnectorServiceAsync(clientConnectorService, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteClientConnectorServiceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClientConnectorServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockClientConnectorServicesService.addResponse(resultOperation); + + ClientConnectorServiceName name = + ClientConnectorServiceName.of("[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]"); + + client.deleteClientConnectorServiceAsync(name).get(); + + List actualRequests = mockClientConnectorServicesService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteClientConnectorServiceRequest actualRequest = + ((DeleteClientConnectorServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteClientConnectorServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockClientConnectorServicesService.addException(exception); + + try { + ClientConnectorServiceName name = + ClientConnectorServiceName.of("[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]"); + client.deleteClientConnectorServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteClientConnectorServiceTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClientConnectorServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockClientConnectorServicesService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteClientConnectorServiceAsync(name).get(); + + List actualRequests = mockClientConnectorServicesService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteClientConnectorServiceRequest actualRequest = + ((DeleteClientConnectorServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteClientConnectorServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockClientConnectorServicesService.addException(exception); + + try { + String name = "name3373707"; + client.deleteClientConnectorServiceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ClientConnectorServiceName.of( + "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ClientConnectorServiceName.of( + "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ClientConnectorServiceName.of( + "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ClientConnectorServiceName.of( + "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ClientConnectorServiceName.of( + "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ClientConnectorServiceName.of( + "[PROJECT]", "[LOCATION]", "[CLIENT_CONNECTOR_SERVICE]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockClientConnectorServicesService.java b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockClientConnectorServicesService.java new file mode 100644 index 0000000..8ff3b4e --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockClientConnectorServicesService.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.cloud.beyondcorp.clientconnectorservices.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 MockClientConnectorServicesService implements MockGrpcService { + private final MockClientConnectorServicesServiceImpl serviceImpl; + + public MockClientConnectorServicesService() { + serviceImpl = new MockClientConnectorServicesServiceImpl(); + } + + @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-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockClientConnectorServicesServiceImpl.java b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockClientConnectorServicesServiceImpl.java new file mode 100644 index 0000000..282a875 --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockClientConnectorServicesServiceImpl.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesServiceGrpc.ClientConnectorServicesServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockClientConnectorServicesServiceImpl extends ClientConnectorServicesServiceImplBase { + private List requests; + private Queue responses; + + public MockClientConnectorServicesServiceImpl() { + 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 listClientConnectorServices( + ListClientConnectorServicesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListClientConnectorServicesResponse) { + requests.add(request); + responseObserver.onNext(((ListClientConnectorServicesResponse) 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 ListClientConnectorServices, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListClientConnectorServicesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getClientConnectorService( + GetClientConnectorServiceRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ClientConnectorService) { + requests.add(request); + responseObserver.onNext(((ClientConnectorService) 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 GetClientConnectorService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ClientConnectorService.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createClientConnectorService( + CreateClientConnectorServiceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateClientConnectorService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateClientConnectorService( + UpdateClientConnectorServiceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateClientConnectorService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteClientConnectorService( + DeleteClientConnectorServiceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteClientConnectorService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockIAMPolicy.java b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockIAMPolicy.java new file mode 100644 index 0000000..39dfd11 --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockIAMPolicy.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.cloud.beyondcorp.clientconnectorservices.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 MockIAMPolicy implements MockGrpcService { + private final MockIAMPolicyImpl serviceImpl; + + public MockIAMPolicy() { + serviceImpl = new MockIAMPolicyImpl(); + } + + @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-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockIAMPolicyImpl.java b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockIAMPolicyImpl.java new file mode 100644 index 0000000..2214225 --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockIAMPolicyImpl.java @@ -0,0 +1,127 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.v1; + +import com.google.api.core.BetaApi; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 MockIAMPolicyImpl extends IAMPolicyImplBase { + private List requests; + private Queue responses; + + public MockIAMPolicyImpl() { + 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 testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext(((TestIamPermissionsResponse) 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 TestIamPermissions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest 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 SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest 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 GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockLocations.java b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockLocations.java new file mode 100644 index 0000000..211cece --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockLocations.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.cloud.beyondcorp.clientconnectorservices.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 MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @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-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockLocationsImpl.java b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockLocationsImpl.java new file mode 100644 index 0000000..fdffebd --- /dev/null +++ b/google-cloud-beyondcorp-clientconnectorservices/src/test/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/MockLocationsImpl.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.beyondcorp.clientconnectorservices.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +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 MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + 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 listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) 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 ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) 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 GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/grpc-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml b/grpc-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml new file mode 100644 index 0000000..2f0ac8e --- /dev/null +++ b/grpc-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-beyondcorp-clientconnectorservices-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-beyondcorp-clientconnectorservices-v1 + GRPC library for google-cloud-beyondcorp-clientconnectorservices + + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-beyondcorp-clientconnectorservices-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-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceGrpc.java b/grpc-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceGrpc.java new file mode 100644 index 0000000..3c4943f --- /dev/null +++ b/grpc-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceGrpc.java @@ -0,0 +1,995 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * ## API Overview
+ * The `beyondcorp.googleapis.com` service implements the Google Cloud
+ * BeyondCorp API.
+ * ## Data Model
+ * The ClientConnectorServicesService exposes the following resources:
+ * * Client Connector Services, named as follows:
+ *   `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = + "Source: google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ClientConnectorServicesServiceGrpc { + + private ClientConnectorServicesServiceGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse> + getListClientConnectorServicesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListClientConnectorServices", + requestType = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + .class, + responseType = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse + .class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse> + getListClientConnectorServicesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse> + getListClientConnectorServicesMethod; + if ((getListClientConnectorServicesMethod = + ClientConnectorServicesServiceGrpc.getListClientConnectorServicesMethod) + == null) { + synchronized (ClientConnectorServicesServiceGrpc.class) { + if ((getListClientConnectorServicesMethod = + ClientConnectorServicesServiceGrpc.getListClientConnectorServicesMethod) + == null) { + ClientConnectorServicesServiceGrpc.getListClientConnectorServicesMethod = + getListClientConnectorServicesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListClientConnectorServices")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ClientConnectorServicesServiceMethodDescriptorSupplier( + "ListClientConnectorServices")) + .build(); + } + } + } + return getListClientConnectorServicesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService> + getGetClientConnectorServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetClientConnectorService", + requestType = + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + .class, + responseType = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService> + getGetClientConnectorServiceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService> + getGetClientConnectorServiceMethod; + if ((getGetClientConnectorServiceMethod = + ClientConnectorServicesServiceGrpc.getGetClientConnectorServiceMethod) + == null) { + synchronized (ClientConnectorServicesServiceGrpc.class) { + if ((getGetClientConnectorServiceMethod = + ClientConnectorServicesServiceGrpc.getGetClientConnectorServiceMethod) + == null) { + ClientConnectorServicesServiceGrpc.getGetClientConnectorServiceMethod = + getGetClientConnectorServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetClientConnectorService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.getDefaultInstance())) + .setSchemaDescriptor( + new ClientConnectorServicesServiceMethodDescriptorSupplier( + "GetClientConnectorService")) + .build(); + } + } + } + return getGetClientConnectorServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest, + com.google.longrunning.Operation> + getCreateClientConnectorServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateClientConnectorService", + requestType = + com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + .class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest, + com.google.longrunning.Operation> + getCreateClientConnectorServiceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest, + com.google.longrunning.Operation> + getCreateClientConnectorServiceMethod; + if ((getCreateClientConnectorServiceMethod = + ClientConnectorServicesServiceGrpc.getCreateClientConnectorServiceMethod) + == null) { + synchronized (ClientConnectorServicesServiceGrpc.class) { + if ((getCreateClientConnectorServiceMethod = + ClientConnectorServicesServiceGrpc.getCreateClientConnectorServiceMethod) + == null) { + ClientConnectorServicesServiceGrpc.getCreateClientConnectorServiceMethod = + getCreateClientConnectorServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateClientConnectorService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ClientConnectorServicesServiceMethodDescriptorSupplier( + "CreateClientConnectorService")) + .build(); + } + } + } + return getCreateClientConnectorServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest, + com.google.longrunning.Operation> + getUpdateClientConnectorServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateClientConnectorService", + requestType = + com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + .class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest, + com.google.longrunning.Operation> + getUpdateClientConnectorServiceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest, + com.google.longrunning.Operation> + getUpdateClientConnectorServiceMethod; + if ((getUpdateClientConnectorServiceMethod = + ClientConnectorServicesServiceGrpc.getUpdateClientConnectorServiceMethod) + == null) { + synchronized (ClientConnectorServicesServiceGrpc.class) { + if ((getUpdateClientConnectorServiceMethod = + ClientConnectorServicesServiceGrpc.getUpdateClientConnectorServiceMethod) + == null) { + ClientConnectorServicesServiceGrpc.getUpdateClientConnectorServiceMethod = + getUpdateClientConnectorServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateClientConnectorService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ClientConnectorServicesServiceMethodDescriptorSupplier( + "UpdateClientConnectorService")) + .build(); + } + } + } + return getUpdateClientConnectorServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest, + com.google.longrunning.Operation> + getDeleteClientConnectorServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteClientConnectorService", + requestType = + com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + .class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest, + com.google.longrunning.Operation> + getDeleteClientConnectorServiceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest, + com.google.longrunning.Operation> + getDeleteClientConnectorServiceMethod; + if ((getDeleteClientConnectorServiceMethod = + ClientConnectorServicesServiceGrpc.getDeleteClientConnectorServiceMethod) + == null) { + synchronized (ClientConnectorServicesServiceGrpc.class) { + if ((getDeleteClientConnectorServiceMethod = + ClientConnectorServicesServiceGrpc.getDeleteClientConnectorServiceMethod) + == null) { + ClientConnectorServicesServiceGrpc.getDeleteClientConnectorServiceMethod = + getDeleteClientConnectorServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteClientConnectorService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ClientConnectorServicesServiceMethodDescriptorSupplier( + "DeleteClientConnectorService")) + .build(); + } + } + } + return getDeleteClientConnectorServiceMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ClientConnectorServicesServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ClientConnectorServicesServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ClientConnectorServicesServiceStub(channel, callOptions); + } + }; + return ClientConnectorServicesServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ClientConnectorServicesServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ClientConnectorServicesServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ClientConnectorServicesServiceBlockingStub(channel, callOptions); + } + }; + return ClientConnectorServicesServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ClientConnectorServicesServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ClientConnectorServicesServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ClientConnectorServicesServiceFutureStub(channel, callOptions); + } + }; + return ClientConnectorServicesServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * ## API Overview
+   * The `beyondcorp.googleapis.com` service implements the Google Cloud
+   * BeyondCorp API.
+   * ## Data Model
+   * The ClientConnectorServicesService exposes the following resources:
+   * * Client Connector Services, named as follows:
+   *   `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`.
+   * 
+ */ + public abstract static class ClientConnectorServicesServiceImplBase + implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists ClientConnectorServices in a given project and location.
+     * 
+ */ + public void listClientConnectorServices( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListClientConnectorServicesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single ClientConnectorService.
+     * 
+ */ + public void getClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetClientConnectorServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new ClientConnectorService in a given project and location.
+     * 
+ */ + public void createClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateClientConnectorServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single ClientConnectorService.
+     * 
+ */ + public void updateClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateClientConnectorServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single ClientConnectorService.
+     * 
+ */ + public void deleteClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteClientConnectorServiceMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListClientConnectorServicesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse>( + this, METHODID_LIST_CLIENT_CONNECTOR_SERVICES))) + .addMethod( + getGetClientConnectorServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService>(this, METHODID_GET_CLIENT_CONNECTOR_SERVICE))) + .addMethod( + getCreateClientConnectorServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest, + com.google.longrunning.Operation>( + this, METHODID_CREATE_CLIENT_CONNECTOR_SERVICE))) + .addMethod( + getUpdateClientConnectorServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest, + com.google.longrunning.Operation>( + this, METHODID_UPDATE_CLIENT_CONNECTOR_SERVICE))) + .addMethod( + getDeleteClientConnectorServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest, + com.google.longrunning.Operation>( + this, METHODID_DELETE_CLIENT_CONNECTOR_SERVICE))) + .build(); + } + } + + /** + * + * + *
+   * ## API Overview
+   * The `beyondcorp.googleapis.com` service implements the Google Cloud
+   * BeyondCorp API.
+   * ## Data Model
+   * The ClientConnectorServicesService exposes the following resources:
+   * * Client Connector Services, named as follows:
+   *   `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`.
+   * 
+ */ + public static final class ClientConnectorServicesServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ClientConnectorServicesServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ClientConnectorServicesServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ClientConnectorServicesServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists ClientConnectorServices in a given project and location.
+     * 
+ */ + public void listClientConnectorServices( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListClientConnectorServicesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single ClientConnectorService.
+     * 
+ */ + public void getClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetClientConnectorServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new ClientConnectorService in a given project and location.
+     * 
+ */ + public void createClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateClientConnectorServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single ClientConnectorService.
+     * 
+ */ + public void updateClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateClientConnectorServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single ClientConnectorService.
+     * 
+ */ + public void deleteClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteClientConnectorServiceMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * ## API Overview
+   * The `beyondcorp.googleapis.com` service implements the Google Cloud
+   * BeyondCorp API.
+   * ## Data Model
+   * The ClientConnectorServicesService exposes the following resources:
+   * * Client Connector Services, named as follows:
+   *   `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`.
+   * 
+ */ + public static final class ClientConnectorServicesServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ClientConnectorServicesServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ClientConnectorServicesServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ClientConnectorServicesServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists ClientConnectorServices in a given project and location.
+     * 
+ */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + listClientConnectorServices( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListClientConnectorServicesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single ClientConnectorService.
+     * 
+ */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetClientConnectorServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new ClientConnectorService in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateClientConnectorServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single ClientConnectorService.
+     * 
+ */ + public com.google.longrunning.Operation updateClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateClientConnectorServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single ClientConnectorService.
+     * 
+ */ + public com.google.longrunning.Operation deleteClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteClientConnectorServiceMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * ## API Overview
+   * The `beyondcorp.googleapis.com` service implements the Google Cloud
+   * BeyondCorp API.
+   * ## Data Model
+   * The ClientConnectorServicesService exposes the following resources:
+   * * Client Connector Services, named as follows:
+   *   `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`.
+   * 
+ */ + public static final class ClientConnectorServicesServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ClientConnectorServicesServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ClientConnectorServicesServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ClientConnectorServicesServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists ClientConnectorServices in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse> + listClientConnectorServices( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListClientConnectorServicesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single ClientConnectorService.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService> + getClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetClientConnectorServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new ClientConnectorService in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateClientConnectorServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single ClientConnectorService.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateClientConnectorServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single ClientConnectorService.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteClientConnectorServiceMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_CLIENT_CONNECTOR_SERVICES = 0; + private static final int METHODID_GET_CLIENT_CONNECTOR_SERVICE = 1; + private static final int METHODID_CREATE_CLIENT_CONNECTOR_SERVICE = 2; + private static final int METHODID_UPDATE_CLIENT_CONNECTOR_SERVICE = 3; + private static final int METHODID_DELETE_CLIENT_CONNECTOR_SERVICE = 4; + + 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 ClientConnectorServicesServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ClientConnectorServicesServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_CLIENT_CONNECTOR_SERVICES: + serviceImpl.listClientConnectorServices( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse>) + responseObserver); + break; + case METHODID_GET_CLIENT_CONNECTOR_SERVICE: + serviceImpl.getClientConnectorService( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService>) + responseObserver); + break; + case METHODID_CREATE_CLIENT_CONNECTOR_SERVICE: + serviceImpl.createClientConnectorService( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CLIENT_CONNECTOR_SERVICE: + serviceImpl.updateClientConnectorService( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CLIENT_CONNECTOR_SERVICE: + serviceImpl.deleteClientConnectorService( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest) + 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 ClientConnectorServicesServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ClientConnectorServicesServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ClientConnectorServicesService"); + } + } + + private static final class ClientConnectorServicesServiceFileDescriptorSupplier + extends ClientConnectorServicesServiceBaseDescriptorSupplier { + ClientConnectorServicesServiceFileDescriptorSupplier() {} + } + + private static final class ClientConnectorServicesServiceMethodDescriptorSupplier + extends ClientConnectorServicesServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ClientConnectorServicesServiceMethodDescriptorSupplier(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 (ClientConnectorServicesServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new ClientConnectorServicesServiceFileDescriptorSupplier()) + .addMethod(getListClientConnectorServicesMethod()) + .addMethod(getGetClientConnectorServiceMethod()) + .addMethod(getCreateClientConnectorServiceMethod()) + .addMethod(getUpdateClientConnectorServiceMethod()) + .addMethod(getDeleteClientConnectorServiceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java.header b/java.header new file mode 100644 index 0000000..d0970ba --- /dev/null +++ b/java.header @@ -0,0 +1,15 @@ +^/\*$ +^ \* 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 new file mode 100644 index 0000000..6597fce --- /dev/null +++ b/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 0000000..7724346 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,24 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates() \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..135f09f --- /dev/null +++ b/pom.xml @@ -0,0 +1,188 @@ + + + 4.0.0 + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices-parent + pom + 0.0.1-SNAPSHOT + Google BeyondCorp ClientConnectorServices Parent + https://github.com/googleapis/java-beyondcorp-clientconnectorservices + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 1.5.0 + + + + + chingor + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + neenushaji + Neenu Shaji + neenushaji@google.com + Google LLC + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-beyondcorp-clientconnectorservices.git + scm:git:git@github.com:googleapis/java-beyondcorp-clientconnectorservices.git + https://github.com/googleapis/java-beyondcorp-clientconnectorservices + HEAD + + + https://github.com/googleapis/java-beyondcorp-clientconnectorservices/issues + GitHub Issues + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-beyondcorp-clientconnectorservices-parent + + + + + + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-beyondcorp-clientconnectorservices-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-beyondcorp-clientconnectorservices-v1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 2.13.0 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-beyondcorp-clientconnectorservices + grpc-google-cloud-beyondcorp-clientconnectorservices-v1 + proto-google-cloud-beyondcorp-clientconnectorservices-v1 + google-cloud-beyondcorp-clientconnectorservices-bom + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.3.0 + + + + index + dependency-info + team + ci-management + issue-management + licenses + scm + dependency-management + distribution-management + summary + modules + + + + + true + ${site.installationModule} + jar + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.0 + + + html + + aggregate + javadoc + + + + + none + protected + true + ${project.build.directory}/javadoc + + + Test helpers packages + com.google.cloud.testing + + + SPI packages + com.google.cloud.spi* + + + + + https://grpc.io/grpc-java/javadoc/ + https://developers.google.com/protocol-buffers/docs/reference/java/ + https://googleapis.dev/java/google-auth-library/latest/ + https://googleapis.dev/java/gax/latest/ + https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/ + + + + + + diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/clirr-ignored-differences.xml b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/clirr-ignored-differences.xml new file mode 100644 index 0000000..5388c06 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/beyondcorp/clientconnectorservices/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/beyondcorp/clientconnectorservices/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/beyondcorp/clientconnectorservices/v1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml new file mode 100644 index 0000000..8f4cf50 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-beyondcorp-clientconnectorservices-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-beyondcorp-clientconnectorservices-v1 + Proto library for google-cloud-beyondcorp-clientconnectorservices + + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorService.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorService.java new file mode 100644 index 0000000..91d482f --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorService.java @@ -0,0 +1,7904 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +/** + * + * + *
+ * Message describing ClientConnectorService object.
+ * 
+ * + * Protobuf type {@code google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService} + */ +public final class ClientConnectorService extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService) + ClientConnectorServiceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClientConnectorService.newBuilder() to construct. + private ClientConnectorService(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClientConnectorService() { + name_ = ""; + displayName_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClientConnectorService(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ClientConnectorService( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 50: + { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Builder + subBuilder = null; + if (ingress_ != null) { + subBuilder = ingress_.toBuilder(); + } + ingress_ = + input.readMessage( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(ingress_); + ingress_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .Builder + subBuilder = null; + if (egress_ != null) { + subBuilder = egress_.toBuilder(); + } + egress_ = + input.readMessage( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(egress_); + egress_ = subBuilder.buildPartial(); + } + + break; + } + case 64: + { + int rawValue = input.readEnum(); + + state_ = 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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + .class); + } + + /** + * + * + *
+   * Represents the different states of a ClientConnectorService.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * ClientConnectorService is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * ClientConnectorService is being updated.
+     * 
+ * + * UPDATING = 2; + */ + UPDATING(2), + /** + * + * + *
+     * ClientConnectorService is being deleted.
+     * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+     * ClientConnectorService is running.
+     * 
+ * + * RUNNING = 4; + */ + RUNNING(4), + /** + * + * + *
+     * ClientConnectorService is down and may be restored in the future.
+     * This happens when CCFE sends ProjectState = OFF.
+     * 
+ * + * DOWN = 5; + */ + DOWN(5), + /** + * + * + *
+     * ClientConnectorService encountered an error and is in an indeterministic
+     * state.
+     * 
+ * + * ERROR = 6; + */ + ERROR(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * ClientConnectorService is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * ClientConnectorService is being updated.
+     * 
+ * + * UPDATING = 2; + */ + public static final int UPDATING_VALUE = 2; + /** + * + * + *
+     * ClientConnectorService is being deleted.
+     * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + /** + * + * + *
+     * ClientConnectorService is running.
+     * 
+ * + * RUNNING = 4; + */ + public static final int RUNNING_VALUE = 4; + /** + * + * + *
+     * ClientConnectorService is down and may be restored in the future.
+     * This happens when CCFE sends ProjectState = OFF.
+     * 
+ * + * DOWN = 5; + */ + public static final int DOWN_VALUE = 5; + /** + * + * + *
+     * ClientConnectorService encountered an error and is in an indeterministic
+     * state.
+     * 
+ * + * ERROR = 6; + */ + public static final int ERROR_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return UPDATING; + case 3: + return DELETING; + case 4: + return RUNNING; + case 5: + return DOWN; + case 6: + return ERROR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State) + } + + public interface IngressOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The basic ingress config for ClientGateways.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+     * The basic ingress config for ClientGateways.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + * + * @return The config. + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config + getConfig(); + /** + * + * + *
+     * The basic ingress config for ClientGateways.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .ConfigOrBuilder + getConfigOrBuilder(); + + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .IngressConfigCase + getIngressConfigCase(); + } + /** + * + * + *
+   * Settings of how to connect to the ClientGateway.
+   * One of the following options should be set.
+   * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress} + */ + public static final class Ingress extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress) + IngressOrBuilder { + private static final long serialVersionUID = 0L; + // Use Ingress.newBuilder() to construct. + private Ingress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Ingress() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Ingress(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Ingress( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.Builder + subBuilder = null; + if (ingressConfigCase_ == 1) { + subBuilder = + ((com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Ingress.Config) + ingressConfig_) + .toBuilder(); + } + ingressConfig_ = + input.readMessage( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Ingress.Config.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config) + ingressConfig_); + ingressConfig_ = subBuilder.buildPartial(); + } + ingressConfigCase_ = 1; + 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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Builder.class); + } + + public interface ConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. Immutable. The transport protocol used between the client and
+       * the server.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for transportProtocol. + */ + int getTransportProtocolValue(); + /** + * + * + *
+       * Required. Immutable. The transport protocol used between the client and
+       * the server.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The transportProtocol. + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config + .TransportProtocol + getTransportProtocol(); + + /** + * + * + *
+       * Required. The settings used to configure basic ClientGateways.
+       * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute> + getDestinationRoutesList(); + /** + * + * + *
+       * Required. The settings used to configure basic ClientGateways.
+       * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config + .DestinationRoute + getDestinationRoutes(int index); + /** + * + * + *
+       * Required. The settings used to configure basic ClientGateways.
+       * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getDestinationRoutesCount(); + /** + * + * + *
+       * Required. The settings used to configure basic ClientGateways.
+       * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRouteOrBuilder> + getDestinationRoutesOrBuilderList(); + /** + * + * + *
+       * Required. The settings used to configure basic ClientGateways.
+       * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config + .DestinationRouteOrBuilder + getDestinationRoutesOrBuilder(int index); + } + /** + * + * + *
+     * The basic ingress config for ClientGateways.
+     * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config} + */ + public static final class Config extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config) + ConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use Config.newBuilder() to construct. + private Config(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Config() { + transportProtocol_ = 0; + destinationRoutes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Config(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Config( + 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(); + + transportProtocol_ = rawValue; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + destinationRoutes_ = + new java.util.ArrayList< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Ingress.Config.DestinationRoute>(); + mutable_bitField0_ |= 0x00000001; + } + destinationRoutes_.add( + input.readMessage( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Ingress.Config.DestinationRoute.parser(), + extensionRegistry)); + 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)) { + destinationRoutes_ = java.util.Collections.unmodifiableList(destinationRoutes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.Builder.class); + } + + /** + * + * + *
+       * The protocol used to connect to the server.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol} + */ + public enum TransportProtocol implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Default value. This value is unused.
+         * 
+ * + * TRANSPORT_PROTOCOL_UNSPECIFIED = 0; + */ + TRANSPORT_PROTOCOL_UNSPECIFIED(0), + /** + * + * + *
+         * TCP protocol.
+         * 
+ * + * TCP = 1; + */ + TCP(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Default value. This value is unused.
+         * 
+ * + * TRANSPORT_PROTOCOL_UNSPECIFIED = 0; + */ + public static final int TRANSPORT_PROTOCOL_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * TCP protocol.
+         * 
+ * + * TCP = 1; + */ + public static final int TCP_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 TransportProtocol 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 TransportProtocol forNumber(int value) { + switch (value) { + case 0: + return TRANSPORT_PROTOCOL_UNSPECIFIED; + case 1: + return TCP; + 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 TransportProtocol findValueByNumber(int number) { + return TransportProtocol.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.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TransportProtocol[] VALUES = values(); + + public static TransportProtocol 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 TransportProtocol(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol) + } + + public interface DestinationRouteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. The network address of the subnet
+         * for which the packet is routed to the ClientGateway.
+         * 
+ * + * string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The address. + */ + java.lang.String getAddress(); + /** + * + * + *
+         * Required. The network address of the subnet
+         * for which the packet is routed to the ClientGateway.
+         * 
+ * + * string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for address. + */ + com.google.protobuf.ByteString getAddressBytes(); + + /** + * + * + *
+         * Required. The network mask of the subnet
+         * for which the packet is routed to the ClientGateway.
+         * 
+ * + * string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The netmask. + */ + java.lang.String getNetmask(); + /** + * + * + *
+         * Required. The network mask of the subnet
+         * for which the packet is routed to the ClientGateway.
+         * 
+ * + * string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for netmask. + */ + com.google.protobuf.ByteString getNetmaskBytes(); + } + /** + * + * + *
+       * The setting used to configure ClientGateways.
+       * It is adding routes to the client's routing table
+       * after the connection is established.
+       * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute} + */ + public static final class DestinationRoute extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute) + DestinationRouteOrBuilder { + private static final long serialVersionUID = 0L; + // Use DestinationRoute.newBuilder() to construct. + private DestinationRoute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DestinationRoute() { + address_ = ""; + netmask_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DestinationRoute(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DestinationRoute( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + + address_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + netmask_ = 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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_DestinationRoute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_DestinationRoute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object address_; + /** + * + * + *
+         * Required. The network address of the subnet
+         * for which the packet is routed to the ClientGateway.
+         * 
+ * + * string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The network address of the subnet
+         * for which the packet is routed to the ClientGateway.
+         * 
+ * + * string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETMASK_FIELD_NUMBER = 2; + private volatile java.lang.Object netmask_; + /** + * + * + *
+         * Required. The network mask of the subnet
+         * for which the packet is routed to the ClientGateway.
+         * 
+ * + * string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The netmask. + */ + @java.lang.Override + public java.lang.String getNetmask() { + java.lang.Object ref = netmask_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + netmask_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The network mask of the subnet
+         * for which the packet is routed to the ClientGateway.
+         * 
+ * + * string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for netmask. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetmaskBytes() { + java.lang.Object ref = netmask_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + netmask_ = 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(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(netmask_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, netmask_); + } + 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(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(netmask_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, netmask_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute) + obj; + + if (!getAddress().equals(other.getAddress())) return false; + if (!getNetmask().equals(other.getNetmask())) return false; + if (!unknownFields.equals(other.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) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + NETMASK_FIELD_NUMBER; + hash = (53 * hash) + getNetmask().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * The setting used to configure ClientGateways.
+         * It is adding routes to the client's routing table
+         * after the connection is established.
+         * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute) + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRouteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_DestinationRoute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_DestinationRoute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + address_ = ""; + + netmask_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_DestinationRoute_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Ingress.Config.DestinationRoute(this); + result.address_ = address_; + result.netmask_ = netmask_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.getDefaultInstance()) return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + if (!other.getNetmask().isEmpty()) { + netmask_ = other.netmask_; + 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.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object address_ = ""; + /** + * + * + *
+           * Required. The network address of the subnet
+           * for which the packet is routed to the ClientGateway.
+           * 
+ * + * string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The network address of the subnet
+           * for which the packet is routed to the ClientGateway.
+           * 
+ * + * string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for address. + */ + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The network address of the subnet
+           * for which the packet is routed to the ClientGateway.
+           * 
+ * + * string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The network address of the subnet
+           * for which the packet is routed to the ClientGateway.
+           * 
+ * + * string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The network address of the subnet
+           * for which the packet is routed to the ClientGateway.
+           * 
+ * + * string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + + private java.lang.Object netmask_ = ""; + /** + * + * + *
+           * Required. The network mask of the subnet
+           * for which the packet is routed to the ClientGateway.
+           * 
+ * + * string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The netmask. + */ + public java.lang.String getNetmask() { + java.lang.Object ref = netmask_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + netmask_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The network mask of the subnet
+           * for which the packet is routed to the ClientGateway.
+           * 
+ * + * string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for netmask. + */ + public com.google.protobuf.ByteString getNetmaskBytes() { + java.lang.Object ref = netmask_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + netmask_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The network mask of the subnet
+           * for which the packet is routed to the ClientGateway.
+           * 
+ * + * string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The netmask to set. + * @return This builder for chaining. + */ + public Builder setNetmask(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + netmask_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The network mask of the subnet
+           * for which the packet is routed to the ClientGateway.
+           * 
+ * + * string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearNetmask() { + + netmask_ = getDefaultInstance().getNetmask(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The network mask of the subnet
+           * for which the packet is routed to the ClientGateway.
+           * 
+ * + * string netmask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for netmask to set. + * @return This builder for chaining. + */ + public Builder setNetmaskBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + netmask_ = 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.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Ingress.Config.DestinationRoute + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DestinationRoute parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DestinationRoute(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int TRANSPORT_PROTOCOL_FIELD_NUMBER = 1; + private int transportProtocol_; + /** + * + * + *
+       * Required. Immutable. The transport protocol used between the client and
+       * the server.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for transportProtocol. + */ + @java.lang.Override + public int getTransportProtocolValue() { + return transportProtocol_; + } + /** + * + * + *
+       * Required. Immutable. The transport protocol used between the client and
+       * the server.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The transportProtocol. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.TransportProtocol + getTransportProtocol() { + @SuppressWarnings("deprecation") + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config + .TransportProtocol + result = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.TransportProtocol.valueOf(transportProtocol_); + return result == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.TransportProtocol.UNRECOGNIZED + : result; + } + + public static final int DESTINATION_ROUTES_FIELD_NUMBER = 2; + private java.util.List< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute> + destinationRoutes_; + /** + * + * + *
+       * Required. The settings used to configure basic ClientGateways.
+       * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute> + getDestinationRoutesList() { + return destinationRoutes_; + } + /** + * + * + *
+       * Required. The settings used to configure basic ClientGateways.
+       * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRouteOrBuilder> + getDestinationRoutesOrBuilderList() { + return destinationRoutes_; + } + /** + * + * + *
+       * Required. The settings used to configure basic ClientGateways.
+       * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getDestinationRoutesCount() { + return destinationRoutes_.size(); + } + /** + * + * + *
+       * Required. The settings used to configure basic ClientGateways.
+       * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + getDestinationRoutes(int index) { + return destinationRoutes_.get(index); + } + /** + * + * + *
+       * Required. The settings used to configure basic ClientGateways.
+       * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRouteOrBuilder + getDestinationRoutesOrBuilder(int index) { + return destinationRoutes_.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 (transportProtocol_ + != com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.TransportProtocol.TRANSPORT_PROTOCOL_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, transportProtocol_); + } + for (int i = 0; i < destinationRoutes_.size(); i++) { + output.writeMessage(2, destinationRoutes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transportProtocol_ + != com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.TransportProtocol.TRANSPORT_PROTOCOL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, transportProtocol_); + } + for (int i = 0; i < destinationRoutes_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, destinationRoutes_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config + other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config) + obj; + + if (transportProtocol_ != other.transportProtocol_) return false; + if (!getDestinationRoutesList().equals(other.getDestinationRoutesList())) return false; + if (!unknownFields.equals(other.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) + TRANSPORT_PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + transportProtocol_; + if (getDestinationRoutesCount() > 0) { + hash = (37 * hash) + DESTINATION_ROUTES_FIELD_NUMBER; + hash = (53 * hash) + getDestinationRoutesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * The basic ingress config for ClientGateways.
+       * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config) + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .ConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDestinationRoutesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + transportProtocol_ = 0; + + if (destinationRoutesBuilder_ == null) { + destinationRoutes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + destinationRoutesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config(this); + int from_bitField0_ = bitField0_; + result.transportProtocol_ = transportProtocol_; + if (destinationRoutesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + destinationRoutes_ = java.util.Collections.unmodifiableList(destinationRoutes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.destinationRoutes_ = destinationRoutes_; + } else { + result.destinationRoutes_ = destinationRoutesBuilder_.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.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.getDefaultInstance()) return this; + if (other.transportProtocol_ != 0) { + setTransportProtocolValue(other.getTransportProtocolValue()); + } + if (destinationRoutesBuilder_ == null) { + if (!other.destinationRoutes_.isEmpty()) { + if (destinationRoutes_.isEmpty()) { + destinationRoutes_ = other.destinationRoutes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDestinationRoutesIsMutable(); + destinationRoutes_.addAll(other.destinationRoutes_); + } + onChanged(); + } + } else { + if (!other.destinationRoutes_.isEmpty()) { + if (destinationRoutesBuilder_.isEmpty()) { + destinationRoutesBuilder_.dispose(); + destinationRoutesBuilder_ = null; + destinationRoutes_ = other.destinationRoutes_; + bitField0_ = (bitField0_ & ~0x00000001); + destinationRoutesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDestinationRoutesFieldBuilder() + : null; + } else { + destinationRoutesBuilder_.addAllMessages(other.destinationRoutes_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int transportProtocol_ = 0; + /** + * + * + *
+         * Required. Immutable. The transport protocol used between the client and
+         * the server.
+         * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for transportProtocol. + */ + @java.lang.Override + public int getTransportProtocolValue() { + return transportProtocol_; + } + /** + * + * + *
+         * Required. Immutable. The transport protocol used between the client and
+         * the server.
+         * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for transportProtocol to set. + * @return This builder for chaining. + */ + public Builder setTransportProtocolValue(int value) { + + transportProtocol_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Immutable. The transport protocol used between the client and
+         * the server.
+         * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The transportProtocol. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.TransportProtocol + getTransportProtocol() { + @SuppressWarnings("deprecation") + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.TransportProtocol + result = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.TransportProtocol.valueOf(transportProtocol_); + return result == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.TransportProtocol.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Required. Immutable. The transport protocol used between the client and
+         * the server.
+         * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The transportProtocol to set. + * @return This builder for chaining. + */ + public Builder setTransportProtocol( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.TransportProtocol + value) { + if (value == null) { + throw new NullPointerException(); + } + + transportProtocol_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Immutable. The transport protocol used between the client and
+         * the server.
+         * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol transport_protocol = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearTransportProtocol() { + + transportProtocol_ = 0; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute> + destinationRoutes_ = java.util.Collections.emptyList(); + + private void ensureDestinationRoutesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + destinationRoutes_ = + new java.util.ArrayList< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute>(destinationRoutes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRouteOrBuilder> + destinationRoutesBuilder_; + + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute> + getDestinationRoutesList() { + if (destinationRoutesBuilder_ == null) { + return java.util.Collections.unmodifiableList(destinationRoutes_); + } else { + return destinationRoutesBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getDestinationRoutesCount() { + if (destinationRoutesBuilder_ == null) { + return destinationRoutes_.size(); + } else { + return destinationRoutesBuilder_.getCount(); + } + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + getDestinationRoutes(int index) { + if (destinationRoutesBuilder_ == null) { + return destinationRoutes_.get(index); + } else { + return destinationRoutesBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDestinationRoutes( + int index, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + value) { + if (destinationRoutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationRoutesIsMutable(); + destinationRoutes_.set(index, value); + onChanged(); + } else { + destinationRoutesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDestinationRoutes( + int index, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute.Builder + builderForValue) { + if (destinationRoutesBuilder_ == null) { + ensureDestinationRoutesIsMutable(); + destinationRoutes_.set(index, builderForValue.build()); + onChanged(); + } else { + destinationRoutesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDestinationRoutes( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + value) { + if (destinationRoutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationRoutesIsMutable(); + destinationRoutes_.add(value); + onChanged(); + } else { + destinationRoutesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDestinationRoutes( + int index, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute + value) { + if (destinationRoutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationRoutesIsMutable(); + destinationRoutes_.add(index, value); + onChanged(); + } else { + destinationRoutesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDestinationRoutes( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute.Builder + builderForValue) { + if (destinationRoutesBuilder_ == null) { + ensureDestinationRoutesIsMutable(); + destinationRoutes_.add(builderForValue.build()); + onChanged(); + } else { + destinationRoutesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDestinationRoutes( + int index, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute.Builder + builderForValue) { + if (destinationRoutesBuilder_ == null) { + ensureDestinationRoutesIsMutable(); + destinationRoutes_.add(index, builderForValue.build()); + onChanged(); + } else { + destinationRoutesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllDestinationRoutes( + java.lang.Iterable< + ? extends + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Ingress.Config.DestinationRoute> + values) { + if (destinationRoutesBuilder_ == null) { + ensureDestinationRoutesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, destinationRoutes_); + onChanged(); + } else { + destinationRoutesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDestinationRoutes() { + if (destinationRoutesBuilder_ == null) { + destinationRoutes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + destinationRoutesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeDestinationRoutes(int index) { + if (destinationRoutesBuilder_ == null) { + ensureDestinationRoutesIsMutable(); + destinationRoutes_.remove(index); + onChanged(); + } else { + destinationRoutesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute.Builder + getDestinationRoutesBuilder(int index) { + return getDestinationRoutesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRouteOrBuilder + getDestinationRoutesOrBuilder(int index) { + if (destinationRoutesBuilder_ == null) { + return destinationRoutes_.get(index); + } else { + return destinationRoutesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRouteOrBuilder> + getDestinationRoutesOrBuilderList() { + if (destinationRoutesBuilder_ != null) { + return destinationRoutesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(destinationRoutes_); + } + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute.Builder + addDestinationRoutesBuilder() { + return getDestinationRoutesFieldBuilder() + .addBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.getDefaultInstance()); + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.DestinationRoute.Builder + addDestinationRoutesBuilder(int index) { + return getDestinationRoutesFieldBuilder() + .addBuilder( + index, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.getDefaultInstance()); + } + /** + * + * + *
+         * Required. The settings used to configure basic ClientGateways.
+         * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.DestinationRoute destination_routes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.Builder> + getDestinationRoutesBuilderList() { + return getDestinationRoutesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRouteOrBuilder> + getDestinationRoutesFieldBuilder() { + if (destinationRoutesBuilder_ == null) { + destinationRoutesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRoute.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.DestinationRouteOrBuilder>( + destinationRoutes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + destinationRoutes_ = null; + } + return destinationRoutesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Ingress.Config + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Config parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Config(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int ingressConfigCase_ = 0; + private java.lang.Object ingressConfig_; + + public enum IngressConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CONFIG(1), + INGRESSCONFIG_NOT_SET(0); + private final int value; + + private IngressConfigCase(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 IngressConfigCase valueOf(int value) { + return forNumber(value); + } + + public static IngressConfigCase forNumber(int value) { + switch (value) { + case 1: + return CONFIG; + case 0: + return INGRESSCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public IngressConfigCase getIngressConfigCase() { + return IngressConfigCase.forNumber(ingressConfigCase_); + } + + public static final int CONFIG_FIELD_NUMBER = 1; + /** + * + * + *
+     * The basic ingress config for ClientGateways.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return ingressConfigCase_ == 1; + } + /** + * + * + *
+     * The basic ingress config for ClientGateways.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + getConfig() { + if (ingressConfigCase_ == 1) { + return (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config) + ingressConfig_; + } + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.getDefaultInstance(); + } + /** + * + * + *
+     * The basic ingress config for ClientGateways.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .ConfigOrBuilder + getConfigOrBuilder() { + if (ingressConfigCase_ == 1) { + return (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config) + ingressConfig_; + } + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.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 (ingressConfigCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config) + ingressConfig_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (ingressConfigCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config) + ingressConfig_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress) + obj; + + if (!getIngressConfigCase().equals(other.getIngressConfigCase())) return false; + switch (ingressConfigCase_) { + case 1: + if (!getConfig().equals(other.getConfig())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (ingressConfigCase_) { + case 1: + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Settings of how to connect to the ClientGateway.
+     * One of the following options should be set.
+     * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress) + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .IngressOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + ingressConfigCase_ = 0; + ingressConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress(this); + if (ingressConfigCase_ == 1) { + if (configBuilder_ == null) { + result.ingressConfig_ = ingressConfig_; + } else { + result.ingressConfig_ = configBuilder_.build(); + } + } + result.ingressConfigCase_ = ingressConfigCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .getDefaultInstance()) return this; + switch (other.getIngressConfigCase()) { + case CONFIG: + { + mergeConfig(other.getConfig()); + break; + } + case INGRESSCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int ingressConfigCase_ = 0; + private java.lang.Object ingressConfig_; + + public IngressConfigCase getIngressConfigCase() { + return IngressConfigCase.forNumber(ingressConfigCase_); + } + + public Builder clearIngressConfig() { + ingressConfigCase_ = 0; + ingressConfig_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .ConfigOrBuilder> + configBuilder_; + /** + * + * + *
+       * The basic ingress config for ClientGateways.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return ingressConfigCase_ == 1; + } + /** + * + * + *
+       * The basic ingress config for ClientGateways.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + getConfig() { + if (configBuilder_ == null) { + if (ingressConfigCase_ == 1) { + return (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config) + ingressConfig_; + } + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.getDefaultInstance(); + } else { + if (ingressConfigCase_ == 1) { + return configBuilder_.getMessage(); + } + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.getDefaultInstance(); + } + } + /** + * + * + *
+       * The basic ingress config for ClientGateways.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + */ + public Builder setConfig( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ingressConfig_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + ingressConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * The basic ingress config for ClientGateways.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + */ + public Builder setConfig( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.Builder + builderForValue) { + if (configBuilder_ == null) { + ingressConfig_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + ingressConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * The basic ingress config for ClientGateways.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + */ + public Builder mergeConfig( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config + value) { + if (configBuilder_ == null) { + if (ingressConfigCase_ == 1 + && ingressConfig_ + != com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.getDefaultInstance()) { + ingressConfig_ = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.newBuilder( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Ingress.Config) + ingressConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + ingressConfig_ = value; + } + onChanged(); + } else { + if (ingressConfigCase_ == 1) { + configBuilder_.mergeFrom(value); + } else { + configBuilder_.setMessage(value); + } + } + ingressConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * The basic ingress config for ClientGateways.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + if (ingressConfigCase_ == 1) { + ingressConfigCase_ = 0; + ingressConfig_ = null; + onChanged(); + } + } else { + if (ingressConfigCase_ == 1) { + ingressConfigCase_ = 0; + ingressConfig_ = null; + } + configBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The basic ingress config for ClientGateways.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.Builder + getConfigBuilder() { + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The basic ingress config for ClientGateways.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .ConfigOrBuilder + getConfigOrBuilder() { + if ((ingressConfigCase_ == 1) && (configBuilder_ != null)) { + return configBuilder_.getMessageOrBuilder(); + } else { + if (ingressConfigCase_ == 1) { + return (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config) + ingressConfig_; + } + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.getDefaultInstance(); + } + } + /** + * + * + *
+       * The basic ingress config for ClientGateways.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Config.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .ConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + if (!(ingressConfigCase_ == 1)) { + ingressConfig_ = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.getDefaultInstance(); + } + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.ConfigOrBuilder>( + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Config) + ingressConfig_, + getParentForChildren(), + isClean()); + ingressConfig_ = null; + } + ingressConfigCase_ = 1; + onChanged(); + ; + return configBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Ingress + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Ingress parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Ingress(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EgressOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A VPC from the consumer project.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + * + * @return Whether the peeredVpc field is set. + */ + boolean hasPeeredVpc(); + /** + * + * + *
+     * A VPC from the consumer project.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + * + * @return The peeredVpc. + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc + getPeeredVpc(); + /** + * + * + *
+     * A VPC from the consumer project.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpcOrBuilder + getPeeredVpcOrBuilder(); + + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .DestinationTypeCase + getDestinationTypeCase(); + } + /** + * + * + *
+   * The details of the egress info. One of the following options should be set.
+   * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress} + */ + public static final class Egress extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress) + EgressOrBuilder { + private static final long serialVersionUID = 0L; + // Use Egress.newBuilder() to construct. + private Egress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Egress() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Egress(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Egress( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc.Builder + subBuilder = null; + if (destinationTypeCase_ == 1) { + subBuilder = + ((com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Egress.PeeredVpc) + destinationType_) + .toBuilder(); + } + destinationType_ = + input.readMessage( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Egress.PeeredVpc.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc) + destinationType_); + destinationType_ = subBuilder.buildPartial(); + } + destinationTypeCase_ = 1; + 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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .Builder.class); + } + + public interface PeeredVpcOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The name of the peered VPC owned by the consumer project.
+       * 
+ * + * string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The networkVpc. + */ + java.lang.String getNetworkVpc(); + /** + * + * + *
+       * Required. The name of the peered VPC owned by the consumer project.
+       * 
+ * + * string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for networkVpc. + */ + com.google.protobuf.ByteString getNetworkVpcBytes(); + } + /** + * + * + *
+     * The peered VPC owned by the consumer project.
+     * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc} + */ + public static final class PeeredVpc extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc) + PeeredVpcOrBuilder { + private static final long serialVersionUID = 0L; + // Use PeeredVpc.newBuilder() to construct. + private PeeredVpc(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PeeredVpc() { + networkVpc_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PeeredVpc(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PeeredVpc( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + + networkVpc_ = 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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_PeeredVpc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_PeeredVpc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc.Builder.class); + } + + public static final int NETWORK_VPC_FIELD_NUMBER = 1; + private volatile java.lang.Object networkVpc_; + /** + * + * + *
+       * Required. The name of the peered VPC owned by the consumer project.
+       * 
+ * + * string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The networkVpc. + */ + @java.lang.Override + public java.lang.String getNetworkVpc() { + java.lang.Object ref = networkVpc_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkVpc_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The name of the peered VPC owned by the consumer project.
+       * 
+ * + * string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for networkVpc. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkVpcBytes() { + java.lang.Object ref = networkVpc_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkVpc_ = 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(networkVpc_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, networkVpc_); + } + 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(networkVpc_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, networkVpc_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc) + obj; + + if (!getNetworkVpc().equals(other.getNetworkVpc())) return false; + if (!unknownFields.equals(other.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) + NETWORK_VPC_FIELD_NUMBER; + hash = (53 * hash) + getNetworkVpc().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * The peered VPC owned by the consumer project.
+       * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc) + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpcOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_PeeredVpc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_PeeredVpc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc.Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + networkVpc_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_PeeredVpc_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc(this); + result.networkVpc_ = networkVpc_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc.getDefaultInstance()) return this; + if (!other.getNetworkVpc().isEmpty()) { + networkVpc_ = other.networkVpc_; + 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.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object networkVpc_ = ""; + /** + * + * + *
+         * Required. The name of the peered VPC owned by the consumer project.
+         * 
+ * + * string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The networkVpc. + */ + public java.lang.String getNetworkVpc() { + java.lang.Object ref = networkVpc_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkVpc_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The name of the peered VPC owned by the consumer project.
+         * 
+ * + * string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for networkVpc. + */ + public com.google.protobuf.ByteString getNetworkVpcBytes() { + java.lang.Object ref = networkVpc_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkVpc_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The name of the peered VPC owned by the consumer project.
+         * 
+ * + * string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The networkVpc to set. + * @return This builder for chaining. + */ + public Builder setNetworkVpc(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkVpc_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The name of the peered VPC owned by the consumer project.
+         * 
+ * + * string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearNetworkVpc() { + + networkVpc_ = getDefaultInstance().getNetworkVpc(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The name of the peered VPC owned by the consumer project.
+         * 
+ * + * string network_vpc = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for networkVpc to set. + * @return This builder for chaining. + */ + public Builder setNetworkVpcBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkVpc_ = 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.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Egress.PeeredVpc + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PeeredVpc parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PeeredVpc(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int destinationTypeCase_ = 0; + private java.lang.Object destinationType_; + + public enum DestinationTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PEERED_VPC(1), + DESTINATIONTYPE_NOT_SET(0); + private final int value; + + private DestinationTypeCase(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 DestinationTypeCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationTypeCase forNumber(int value) { + switch (value) { + case 1: + return PEERED_VPC; + case 0: + return DESTINATIONTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationTypeCase getDestinationTypeCase() { + return DestinationTypeCase.forNumber(destinationTypeCase_); + } + + public static final int PEERED_VPC_FIELD_NUMBER = 1; + /** + * + * + *
+     * A VPC from the consumer project.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + * + * @return Whether the peeredVpc field is set. + */ + @java.lang.Override + public boolean hasPeeredVpc() { + return destinationTypeCase_ == 1; + } + /** + * + * + *
+     * A VPC from the consumer project.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + * + * @return The peeredVpc. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + getPeeredVpc() { + if (destinationTypeCase_ == 1) { + return (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc) + destinationType_; + } + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc.getDefaultInstance(); + } + /** + * + * + *
+     * A VPC from the consumer project.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpcOrBuilder + getPeeredVpcOrBuilder() { + if (destinationTypeCase_ == 1) { + return (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc) + destinationType_; + } + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc.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 (destinationTypeCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc) + destinationType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationTypeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc) + destinationType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress) + obj; + + if (!getDestinationTypeCase().equals(other.getDestinationTypeCase())) return false; + switch (destinationTypeCase_) { + case 1: + if (!getPeeredVpc().equals(other.getPeeredVpc())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationTypeCase_) { + case 1: + hash = (37 * hash) + PEERED_VPC_FIELD_NUMBER; + hash = (53 * hash) + getPeeredVpc().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The details of the egress info. One of the following options should be set.
+     * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress) + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .EgressOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + destinationTypeCase_ = 0; + destinationType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress(this); + if (destinationTypeCase_ == 1) { + if (peeredVpcBuilder_ == null) { + result.destinationType_ = destinationType_; + } else { + result.destinationType_ = peeredVpcBuilder_.build(); + } + } + result.destinationTypeCase_ = destinationTypeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .getDefaultInstance()) return this; + switch (other.getDestinationTypeCase()) { + case PEERED_VPC: + { + mergePeeredVpc(other.getPeeredVpc()); + break; + } + case DESTINATIONTYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationTypeCase_ = 0; + private java.lang.Object destinationType_; + + public DestinationTypeCase getDestinationTypeCase() { + return DestinationTypeCase.forNumber(destinationTypeCase_); + } + + public Builder clearDestinationType() { + destinationTypeCase_ = 0; + destinationType_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpcOrBuilder> + peeredVpcBuilder_; + /** + * + * + *
+       * A VPC from the consumer project.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + * + * @return Whether the peeredVpc field is set. + */ + @java.lang.Override + public boolean hasPeeredVpc() { + return destinationTypeCase_ == 1; + } + /** + * + * + *
+       * A VPC from the consumer project.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + * + * @return The peeredVpc. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + getPeeredVpc() { + if (peeredVpcBuilder_ == null) { + if (destinationTypeCase_ == 1) { + return (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc) + destinationType_; + } + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc.getDefaultInstance(); + } else { + if (destinationTypeCase_ == 1) { + return peeredVpcBuilder_.getMessage(); + } + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc.getDefaultInstance(); + } + } + /** + * + * + *
+       * A VPC from the consumer project.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + */ + public Builder setPeeredVpc( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + value) { + if (peeredVpcBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destinationType_ = value; + onChanged(); + } else { + peeredVpcBuilder_.setMessage(value); + } + destinationTypeCase_ = 1; + return this; + } + /** + * + * + *
+       * A VPC from the consumer project.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + */ + public Builder setPeeredVpc( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc.Builder + builderForValue) { + if (peeredVpcBuilder_ == null) { + destinationType_ = builderForValue.build(); + onChanged(); + } else { + peeredVpcBuilder_.setMessage(builderForValue.build()); + } + destinationTypeCase_ = 1; + return this; + } + /** + * + * + *
+       * A VPC from the consumer project.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + */ + public Builder mergePeeredVpc( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc + value) { + if (peeredVpcBuilder_ == null) { + if (destinationTypeCase_ == 1 + && destinationType_ + != com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc.getDefaultInstance()) { + destinationType_ = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc.newBuilder( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Egress.PeeredVpc) + destinationType_) + .mergeFrom(value) + .buildPartial(); + } else { + destinationType_ = value; + } + onChanged(); + } else { + if (destinationTypeCase_ == 1) { + peeredVpcBuilder_.mergeFrom(value); + } else { + peeredVpcBuilder_.setMessage(value); + } + } + destinationTypeCase_ = 1; + return this; + } + /** + * + * + *
+       * A VPC from the consumer project.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + */ + public Builder clearPeeredVpc() { + if (peeredVpcBuilder_ == null) { + if (destinationTypeCase_ == 1) { + destinationTypeCase_ = 0; + destinationType_ = null; + onChanged(); + } + } else { + if (destinationTypeCase_ == 1) { + destinationTypeCase_ = 0; + destinationType_ = null; + } + peeredVpcBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A VPC from the consumer project.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc.Builder + getPeeredVpcBuilder() { + return getPeeredVpcFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A VPC from the consumer project.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpcOrBuilder + getPeeredVpcOrBuilder() { + if ((destinationTypeCase_ == 1) && (peeredVpcBuilder_ != null)) { + return peeredVpcBuilder_.getMessageOrBuilder(); + } else { + if (destinationTypeCase_ == 1) { + return (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc) + destinationType_; + } + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc.getDefaultInstance(); + } + } + /** + * + * + *
+       * A VPC from the consumer project.
+       * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.PeeredVpc peered_vpc = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpcOrBuilder> + getPeeredVpcFieldBuilder() { + if (peeredVpcBuilder_ == null) { + if (!(destinationTypeCase_ == 1)) { + destinationType_ = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .PeeredVpc.getDefaultInstance(); + } + peeredVpcBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpcOrBuilder>( + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress.PeeredVpc) + destinationType_, + getParentForChildren(), + isClean()); + destinationType_ = null; + } + destinationTypeCase_ = 1; + onChanged(); + ; + return peeredVpcBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService.Egress + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Egress parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Egress(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of resource. The name is ignored during creation.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of resource. The name is ignored during creation.
+   * 
+ * + * 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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. [Output only] Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. [Output only] Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. [Output only] Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. [Output only] Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. [Output only] Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. [Output only] Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Optional. User-provided name.
+   * The display name should follow certain format.
+   * * Must be 6 to 30 characters in length.
+   * * Can only contain lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User-provided name.
+   * The display name should follow certain format.
+   * * Must be 6 to 30 characters in length.
+   * * Can only contain lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INGRESS_FIELD_NUMBER = 6; + private com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + ingress_; + /** + * + * + *
+   * Required. The details of the ingress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ingress field is set. + */ + @java.lang.Override + public boolean hasIngress() { + return ingress_ != null; + } + /** + * + * + *
+   * Required. The details of the ingress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ingress. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + getIngress() { + return ingress_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .getDefaultInstance() + : ingress_; + } + /** + * + * + *
+   * Required. The details of the ingress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .IngressOrBuilder + getIngressOrBuilder() { + return getIngress(); + } + + public static final int EGRESS_FIELD_NUMBER = 7; + private com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + egress_; + /** + * + * + *
+   * Required. The details of the egress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the egress field is set. + */ + @java.lang.Override + public boolean hasEgress() { + return egress_ != null; + } + /** + * + * + *
+   * Required. The details of the egress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The egress. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + getEgress() { + return egress_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .getDefaultInstance() + : egress_; + } + /** + * + * + *
+   * Required. The details of the egress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .EgressOrBuilder + getEgressOrBuilder() { + return getEgress(); + } + + public static final int STATE_FIELD_NUMBER = 8; + private int state_; + /** + * + * + *
+   * Output only. The operational state of the ClientConnectorService.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The operational state of the ClientConnectorService.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State + getState() { + @SuppressWarnings("deprecation") + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State result = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State.valueOf( + state_); + return result == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State + .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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + if (ingress_ != null) { + output.writeMessage(6, getIngress()); + } + if (egress_ != null) { + output.writeMessage(7, getEgress()); + } + if (state_ + != com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, state_); + } + 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_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + if (ingress_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getIngress()); + } + if (egress_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEgress()); + } + if (state_ + != com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasIngress() != other.hasIngress()) return false; + if (hasIngress()) { + if (!getIngress().equals(other.getIngress())) return false; + } + if (hasEgress() != other.hasEgress()) return false; + if (hasEgress()) { + if (!getEgress().equals(other.getEgress())) return false; + } + if (state_ != other.state_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasIngress()) { + hash = (37 * hash) + INGRESS_FIELD_NUMBER; + hash = (53 * hash) + getIngress().hashCode(); + } + if (hasEgress()) { + hash = (37 * hash) + EGRESS_FIELD_NUMBER; + hash = (53 * hash) + getEgress().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message describing ClientConnectorService object.
+   * 
+ * + * Protobuf type {@code google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService) + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + .class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + displayName_ = ""; + + if (ingressBuilder_ == null) { + ingress_ = null; + } else { + ingress_ = null; + ingressBuilder_ = null; + } + if (egressBuilder_ == null) { + egress_ = null; + } else { + egress_ = null; + egressBuilder_ = null; + } + state_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService(this); + result.name_ = name_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.displayName_ = displayName_; + if (ingressBuilder_ == null) { + result.ingress_ = ingress_; + } else { + result.ingress_ = ingressBuilder_.build(); + } + if (egressBuilder_ == null) { + result.egress_ = egress_; + } else { + result.egress_ = egressBuilder_.build(); + } + result.state_ = state_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasIngress()) { + mergeIngress(other.getIngress()); + } + if (other.hasEgress()) { + mergeEgress(other.getEgress()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of resource. The name is ignored during creation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of resource. The name is ignored during creation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of resource. The name is ignored during creation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of resource. The name is ignored during creation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of resource. The name is ignored during creation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. [Output only] Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. [Output only] Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. [Output only] Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. [Output only] Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. [Output only] Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. [Output only] Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. [Output only] Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. [Output only] Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. [Output only] Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. [Output only] Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. User-provided name.
+     * The display name should follow certain format.
+     * * Must be 6 to 30 characters in length.
+     * * Can only contain lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User-provided name.
+     * The display name should follow certain format.
+     * * Must be 6 to 30 characters in length.
+     * * Can only contain lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User-provided name.
+     * The display name should follow certain format.
+     * * Must be 6 to 30 characters in length.
+     * * Can only contain lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided name.
+     * The display name should follow certain format.
+     * * Must be 6 to 30 characters in length.
+     * * Can only contain lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided name.
+     * The display name should follow certain format.
+     * * Must be 6 to 30 characters in length.
+     * * Can only contain lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + ingress_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .IngressOrBuilder> + ingressBuilder_; + /** + * + * + *
+     * Required. The details of the ingress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ingress field is set. + */ + public boolean hasIngress() { + return ingressBuilder_ != null || ingress_ != null; + } + /** + * + * + *
+     * Required. The details of the ingress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ingress. + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + getIngress() { + if (ingressBuilder_ == null) { + return ingress_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .getDefaultInstance() + : ingress_; + } else { + return ingressBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The details of the ingress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIngress( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + value) { + if (ingressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ingress_ = value; + onChanged(); + } else { + ingressBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The details of the ingress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIngress( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Builder + builderForValue) { + if (ingressBuilder_ == null) { + ingress_ = builderForValue.build(); + onChanged(); + } else { + ingressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The details of the ingress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeIngress( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + value) { + if (ingressBuilder_ == null) { + if (ingress_ != null) { + ingress_ = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .newBuilder(ingress_) + .mergeFrom(value) + .buildPartial(); + } else { + ingress_ = value; + } + onChanged(); + } else { + ingressBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The details of the ingress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearIngress() { + if (ingressBuilder_ == null) { + ingress_ = null; + onChanged(); + } else { + ingress_ = null; + ingressBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The details of the ingress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Builder + getIngressBuilder() { + + onChanged(); + return getIngressFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The details of the ingress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .IngressOrBuilder + getIngressOrBuilder() { + if (ingressBuilder_ != null) { + return ingressBuilder_.getMessageOrBuilder(); + } else { + return ingress_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .getDefaultInstance() + : ingress_; + } + } + /** + * + * + *
+     * Required. The details of the ingress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + .Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .IngressOrBuilder> + getIngressFieldBuilder() { + if (ingressBuilder_ == null) { + ingressBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Ingress.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .IngressOrBuilder>(getIngress(), getParentForChildren(), isClean()); + ingress_ = null; + } + return ingressBuilder_; + } + + private com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + egress_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .EgressOrBuilder> + egressBuilder_; + /** + * + * + *
+     * Required. The details of the egress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the egress field is set. + */ + public boolean hasEgress() { + return egressBuilder_ != null || egress_ != null; + } + /** + * + * + *
+     * Required. The details of the egress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The egress. + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + getEgress() { + if (egressBuilder_ == null) { + return egress_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .getDefaultInstance() + : egress_; + } else { + return egressBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The details of the egress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEgress( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + value) { + if (egressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + egress_ = value; + onChanged(); + } else { + egressBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The details of the egress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEgress( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress.Builder + builderForValue) { + if (egressBuilder_ == null) { + egress_ = builderForValue.build(); + onChanged(); + } else { + egressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The details of the egress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEgress( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + value) { + if (egressBuilder_ == null) { + if (egress_ != null) { + egress_ = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .newBuilder(egress_) + .mergeFrom(value) + .buildPartial(); + } else { + egress_ = value; + } + onChanged(); + } else { + egressBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The details of the egress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEgress() { + if (egressBuilder_ == null) { + egress_ = null; + onChanged(); + } else { + egress_ = null; + egressBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The details of the egress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .Builder + getEgressBuilder() { + + onChanged(); + return getEgressFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The details of the egress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .EgressOrBuilder + getEgressOrBuilder() { + if (egressBuilder_ != null) { + return egressBuilder_.getMessageOrBuilder(); + } else { + return egress_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .getDefaultInstance() + : egress_; + } + } + /** + * + * + *
+     * Required. The details of the egress settings.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .EgressOrBuilder> + getEgressFieldBuilder() { + if (egressBuilder_ == null) { + egressBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Egress, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress + .Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .EgressOrBuilder>(getEgress(), getParentForChildren(), isClean()); + egress_ = null; + } + return egressBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The operational state of the ClientConnectorService.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The operational state of the ClientConnectorService.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The operational state of the ClientConnectorService.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State + getState() { + @SuppressWarnings("deprecation") + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State result = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State + .valueOf(state_); + return result == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The operational state of the ClientConnectorService.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The operational state of the ClientConnectorService.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 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.beyondcorp.clientconnectorservices.v1.ClientConnectorService) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClientConnectorService parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ClientConnectorService(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceName.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceName.java new file mode 100644 index 0000000..b1b5a73 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceName.java @@ -0,0 +1,240 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.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 ClientConnectorServiceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CLIENT_CONNECTOR_SERVICE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/clientConnectorServices/{client_connector_service}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String clientConnectorService; + + @Deprecated + protected ClientConnectorServiceName() { + project = null; + location = null; + clientConnectorService = null; + } + + private ClientConnectorServiceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + clientConnectorService = Preconditions.checkNotNull(builder.getClientConnectorService()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getClientConnectorService() { + return clientConnectorService; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ClientConnectorServiceName of( + String project, String location, String clientConnectorService) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setClientConnectorService(clientConnectorService) + .build(); + } + + public static String format(String project, String location, String clientConnectorService) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setClientConnectorService(clientConnectorService) + .build() + .toString(); + } + + public static ClientConnectorServiceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CLIENT_CONNECTOR_SERVICE.validatedMatch( + formattedString, + "ClientConnectorServiceName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("client_connector_service")); + } + + 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 (ClientConnectorServiceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CLIENT_CONNECTOR_SERVICE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (clientConnectorService != null) { + fieldMapBuilder.put("client_connector_service", clientConnectorService); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CLIENT_CONNECTOR_SERVICE.instantiate( + "project", + project, + "location", + location, + "client_connector_service", + clientConnectorService); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ClientConnectorServiceName that = ((ClientConnectorServiceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.clientConnectorService, that.clientConnectorService); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(clientConnectorService); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/clientConnectorServices/{client_connector_service}. + */ + public static class Builder { + private String project; + private String location; + private String clientConnectorService; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getClientConnectorService() { + return clientConnectorService; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setClientConnectorService(String clientConnectorService) { + this.clientConnectorService = clientConnectorService; + return this; + } + + private Builder(ClientConnectorServiceName clientConnectorServiceName) { + this.project = clientConnectorServiceName.project; + this.location = clientConnectorServiceName.location; + this.clientConnectorService = clientConnectorServiceName.clientConnectorService; + } + + public ClientConnectorServiceName build() { + return new ClientConnectorServiceName(this); + } + } +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOperationMetadata.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOperationMetadata.java new file mode 100644 index 0000000..562fe96 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOperationMetadata.java @@ -0,0 +1,1927 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata} + */ +public final class ClientConnectorServiceOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata) + ClientConnectorServiceOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClientConnectorServiceOperationMetadata.newBuilder() to construct. + private ClientConnectorServiceOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClientConnectorServiceOperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClientConnectorServiceOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ClientConnectorServiceOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + verb_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + statusMessage_ = s; + break; + } + case 48: + { + requestedCancellation_ = input.readBool(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiVersion_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorServiceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorServiceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + private volatile java.lang.Object verb_; + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + private volatile java.lang.Object statusMessage_; + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_; + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object apiVersion_; + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata + other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata) + obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata) + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorServiceOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorServiceOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + target_ = ""; + + verb_ = ""; + + statusMessage_ = ""; + + requestedCancellation_ = false; + + apiVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorServiceOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.target_ = target_; + result.verb_ = verb_; + result.statusMessage_ = statusMessage_; + result.requestedCancellation_ = requestedCancellation_; + result.apiVersion_ = apiVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + target_ = value; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + verb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + verb_ = value; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + statusMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + + statusMessage_ = getDefaultInstance().getStatusMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + statusMessage_ = value; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = getDefaultInstance().getApiVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClientConnectorServiceOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ClientConnectorServiceOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOperationMetadataOrBuilder.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOperationMetadataOrBuilder.java new file mode 100644 index 0000000..7d977ee --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOperationMetadataOrBuilder.java @@ -0,0 +1,219 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +public interface ClientConnectorServiceOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOrBuilder.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOrBuilder.java new file mode 100644 index 0000000..f01faad --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServiceOrBuilder.java @@ -0,0 +1,274 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +public interface ClientConnectorServiceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of resource. The name is ignored during creation.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of resource. The name is ignored during creation.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. [Output only] Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. [Output only] Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. [Output only] Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. [Output only] Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. User-provided name.
+   * The display name should follow certain format.
+   * * Must be 6 to 30 characters in length.
+   * * Can only contain lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. User-provided name.
+   * The display name should follow certain format.
+   * * Must be 6 to 30 characters in length.
+   * * Can only contain lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. The details of the ingress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ingress field is set. + */ + boolean hasIngress(); + /** + * + * + *
+   * Required. The details of the ingress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ingress. + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress + getIngress(); + /** + * + * + *
+   * Required. The details of the ingress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress ingress = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.IngressOrBuilder + getIngressOrBuilder(); + + /** + * + * + *
+   * Required. The details of the egress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the egress field is set. + */ + boolean hasEgress(); + /** + * + * + *
+   * Required. The details of the egress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The egress. + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress getEgress(); + /** + * + * + *
+   * Required. The details of the egress settings.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Egress egress = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.EgressOrBuilder + getEgressOrBuilder(); + + /** + * + * + *
+   * Output only. The operational state of the ClientConnectorService.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The operational state of the ClientConnectorService.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.State getState(); +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceProto.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceProto.java new file mode 100644 index 0000000..0157070 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ClientConnectorServicesServiceProto.java @@ -0,0 +1,390 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +public final class ClientConnectorServicesServiceProto { + private ClientConnectorServicesServiceProto() {} + + 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_beyondcorp_clientconnectorservices_v1_ClientConnectorService_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_DestinationRoute_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_DestinationRoute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_PeeredVpc_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_PeeredVpc_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_GetClientConnectorServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_GetClientConnectorServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_CreateClientConnectorServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_CreateClientConnectorServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_UpdateClientConnectorServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_UpdateClientConnectorServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_DeleteClientConnectorServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_DeleteClientConnectorServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorServiceOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorServiceOperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nZgoogle/cloud/beyondcorp/clientconnecto" + + "rservices/v1/client_connector_services_s" + + "ervice.proto\0222google.cloud.beyondcorp.cl" + + "ientconnectorservices.v1\032\034google/api/ann" + + "otations.proto\032\027google/api/client.proto\032" + + "\037google/api/field_behavior.proto\032\031google" + + "/api/resource.proto\032#google/longrunning/" + + "operations.proto\032 google/protobuf/field_" + + "mask.proto\032\037google/protobuf/timestamp.pr" + + "oto\"\334\013\n\026ClientConnectorService\022\021\n\004name\030\001" + + " \001(\tB\003\340A\002\0224\n\013create_time\030\002 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\0224\n\013update_time\030\003" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\031\n" + + "\014display_name\030\004 \001(\tB\003\340A\001\022h\n\007ingress\030\006 \001(" + + "\0132R.google.cloud.beyondcorp.clientconnec" + + "torservices.v1.ClientConnectorService.In" + + "gressB\003\340A\002\022f\n\006egress\030\007 \001(\0132Q.google.clou" + + "d.beyondcorp.clientconnectorservices.v1." + + "ClientConnectorService.EgressB\003\340A\002\022d\n\005st" + + "ate\030\010 \001(\0162P.google.cloud.beyondcorp.clie" + + "ntconnectorservices.v1.ClientConnectorSe" + + "rvice.StateB\003\340A\003\032\265\004\n\007Ingress\022k\n\006config\030\001" + + " \001(\0132Y.google.cloud.beyondcorp.clientcon" + + "nectorservices.v1.ClientConnectorService" + + ".Ingress.ConfigH\000\032\252\003\n\006Config\022\217\001\n\022transpo" + + "rt_protocol\030\001 \001(\0162k.google.cloud.beyondc" + + "orp.clientconnectorservices.v1.ClientCon" + + "nectorService.Ingress.Config.TransportPr" + + "otocolB\006\340A\002\340A\005\022\213\001\n\022destination_routes\030\002 " + + "\003(\0132j.google.cloud.beyondcorp.clientconn" + + "ectorservices.v1.ClientConnectorService." + + "Ingress.Config.DestinationRouteB\003\340A\002\032>\n\020" + + "DestinationRoute\022\024\n\007address\030\001 \001(\tB\003\340A\002\022\024" + + "\n\007netmask\030\002 \001(\tB\003\340A\002\"@\n\021TransportProtoco" + + "l\022\"\n\036TRANSPORT_PROTOCOL_UNSPECIFIED\020\000\022\007\n" + + "\003TCP\020\001B\020\n\016ingress_config\032\266\001\n\006Egress\022q\n\np" + + "eered_vpc\030\001 \001(\0132[.google.cloud.beyondcor" + + "p.clientconnectorservices.v1.ClientConne" + + "ctorService.Egress.PeeredVpcH\000\032%\n\tPeered" + + "Vpc\022\030\n\013network_vpc\030\001 \001(\tB\003\340A\002B\022\n\020destina" + + "tion_type\"j\n\005State\022\025\n\021STATE_UNSPECIFIED\020" + + "\000\022\014\n\010CREATING\020\001\022\014\n\010UPDATING\020\002\022\014\n\010DELETIN" + + "G\020\003\022\013\n\007RUNNING\020\004\022\010\n\004DOWN\020\005\022\t\n\005ERROR\020\006:\222\001" + + "\352A\216\001\n0beyondcorp.googleapis.com/ClientCo" + + "nnectorService\022Zprojects/{project}/locat" + + "ions/{location}/clientConnectorServices/" + + "{client_connector_service}\"\313\001\n\"ListClien" + + "tConnectorServicesRequest\022H\n\006parent\030\001 \001(" + + "\tB8\340A\002\372A2\0220beyondcorp.googleapis.com/Cli" + + "entConnectorService\022\026\n\tpage_size\030\002 \001(\005B\003" + + "\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004" + + " \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"\302\001\n#Lis" + + "tClientConnectorServicesResponse\022m\n\031clie" + + "nt_connector_services\030\001 \003(\0132J.google.clo" + + "ud.beyondcorp.clientconnectorservices.v1" + + ".ClientConnectorService\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"j\n GetClie" + + "ntConnectorServiceRequest\022F\n\004name\030\001 \001(\tB" + + "8\340A\002\372A2\n0beyondcorp.googleapis.com/Clien" + + "tConnectorService\"\301\002\n#CreateClientConnec" + + "torServiceRequest\022H\n\006parent\030\001 \001(\tB8\340A\002\372A" + + "2\0220beyondcorp.googleapis.com/ClientConne" + + "ctorService\022(\n\033client_connector_service_" + + "id\030\002 \001(\tB\003\340A\001\022q\n\030client_connector_servic" + + "e\030\003 \001(\0132J.google.cloud.beyondcorp.client" + + "connectorservices.v1.ClientConnectorServ" + + "iceB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\022\032\n\rval" + + "idate_only\030\005 \001(\010B\003\340A\001\"\237\002\n#UpdateClientCo" + + "nnectorServiceRequest\0224\n\013update_mask\030\001 \001" + + "(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022q\n\030c" + + "lient_connector_service\030\002 \001(\0132J.google.c" + + "loud.beyondcorp.clientconnectorservices." + + "v1.ClientConnectorServiceB\003\340A\002\022\027\n\nreques" + + "t_id\030\003 \001(\tB\003\340A\001\022\032\n\rvalidate_only\030\004 \001(\010B\003" + + "\340A\001\022\032\n\rallow_missing\030\005 \001(\010B\003\340A\001\"\242\001\n#Dele" + + "teClientConnectorServiceRequest\022F\n\004name\030" + + "\001 \001(\tB8\340A\002\372A2\n0beyondcorp.googleapis.com" + + "/ClientConnectorService\022\027\n\nrequest_id\030\002 " + + "\001(\tB\003\340A\001\022\032\n\rvalidate_only\030\003 \001(\010B\003\340A\001\"\226\002\n" + + "\'ClientConnectorServiceOperationMetadata" + + "\0224\n\013create_time\030\001 \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\022\023\n\006target\030\003 \001(" + + "\tB\003\340A\003\022\021\n\004verb\030\004 \001(\tB\003\340A\003\022\033\n\016status_mess" + + "age\030\005 \001(\tB\003\340A\003\022#\n\026requested_cancellation" + + "\030\006 \001(\010B\003\340A\003\022\030\n\013api_version\030\007 \001(\tB\003\340A\0032\273\r" + + "\n\036ClientConnectorServicesService\022\234\002\n\033Lis" + + "tClientConnectorServices\022V.google.cloud." + + "beyondcorp.clientconnectorservices.v1.Li" + + "stClientConnectorServicesRequest\032W.googl" + + "e.cloud.beyondcorp.clientconnectorservic" + + "es.v1.ListClientConnectorServicesRespons" + + "e\"L\202\323\344\223\002=\022;/v1/{parent=projects/*/locati" + + "ons/*}/clientConnectorServices\332A\006parent\022" + + "\211\002\n\031GetClientConnectorService\022T.google.c" + + "loud.beyondcorp.clientconnectorservices." + + "v1.GetClientConnectorServiceRequest\032J.go" + + "ogle.cloud.beyondcorp.clientconnectorser" + + "vices.v1.ClientConnectorService\"J\202\323\344\223\002=\022" + + ";/v1/{name=projects/*/locations/*/client" + + "ConnectorServices/*}\332A\004name\022\370\002\n\034CreateCl" + + "ientConnectorService\022W.google.cloud.beyo" + + "ndcorp.clientconnectorservices.v1.Create" + + "ClientConnectorServiceRequest\032\035.google.l" + + "ongrunning.Operation\"\337\001\202\323\344\223\002W\";/v1/{pare" + + "nt=projects/*/locations/*}/clientConnect" + + "orServices:\030client_connector_service\332A;p" + + "arent,client_connector_service,client_co" + + "nnector_service_id\312AA\n\026ClientConnectorSe" + + "rvice\022\'ClientConnectorServiceOperationMe" + + "tadata\022\372\002\n\034UpdateClientConnectorService\022" + + "W.google.cloud.beyondcorp.clientconnecto" + + "rservices.v1.UpdateClientConnectorServic" + + "eRequest\032\035.google.longrunning.Operation\"" + + "\341\001\202\323\344\223\002p2T/v1/{client_connector_service." + + "name=projects/*/locations/*/clientConnec" + + "torServices/*}:\030client_connector_service" + + "\332A$client_connector_service,update_mask\312" + + "AA\n\026ClientConnectorService\022\'ClientConnec" + + "torServiceOperationMetadata\022\246\002\n\034DeleteCl" + + "ientConnectorService\022W.google.cloud.beyo" + + "ndcorp.clientconnectorservices.v1.Delete" + + "ClientConnectorServiceRequest\032\035.google.l" + + "ongrunning.Operation\"\215\001\202\323\344\223\002=*;/v1/{name" + + "=projects/*/locations/*/clientConnectorS" + + "ervices/*}\332A\004name\312A@\n\025google.protobuf.Em" + + "pty\022\'ClientConnectorServiceOperationMeta" + + "data\032M\312A\031beyondcorp.googleapis.com\322A.htt" + + "ps://www.googleapis.com/auth/cloud-platf" + + "ormB\355\002\n6com.google.cloud.beyondcorp.clie" + + "ntconnectorservices.v1B#ClientConnectorS" + + "ervicesServiceProtoP\001Zigoogle.golang.org" + + "/genproto/googleapis/cloud/beyondcorp/cl" + + "ientconnectorservices/v1;clientconnector" + + "services\252\0022Google.Cloud.BeyondCorp.Clien" + + "tConnectorServices.V1\312\0022Google\\Cloud\\Bey" + + "ondCorp\\ClientConnectorServices\\V1\352\0026Goo" + + "gle::Cloud::BeyondCorp::ClientConnectorS" + + "ervices::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_descriptor, + new java.lang.String[] { + "Name", "CreateTime", "UpdateTime", "DisplayName", "Ingress", "Egress", "State", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_descriptor = + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_descriptor, + new java.lang.String[] { + "Config", "IngressConfig", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_descriptor = + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_descriptor, + new java.lang.String[] { + "TransportProtocol", "DestinationRoutes", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_DestinationRoute_descriptor = + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_DestinationRoute_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Ingress_Config_DestinationRoute_descriptor, + new java.lang.String[] { + "Address", "Netmask", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_descriptor = + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_descriptor, + new java.lang.String[] { + "PeeredVpc", "DestinationType", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_PeeredVpc_descriptor = + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_PeeredVpc_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorService_Egress_PeeredVpc_descriptor, + new java.lang.String[] { + "NetworkVpc", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesResponse_descriptor, + new java.lang.String[] { + "ClientConnectorServices", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_GetClientConnectorServiceRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_GetClientConnectorServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_GetClientConnectorServiceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_CreateClientConnectorServiceRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_CreateClientConnectorServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_CreateClientConnectorServiceRequest_descriptor, + new java.lang.String[] { + "Parent", + "ClientConnectorServiceId", + "ClientConnectorService", + "RequestId", + "ValidateOnly", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_UpdateClientConnectorServiceRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_UpdateClientConnectorServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_UpdateClientConnectorServiceRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "ClientConnectorService", "RequestId", "ValidateOnly", "AllowMissing", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_DeleteClientConnectorServiceRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_DeleteClientConnectorServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_DeleteClientConnectorServiceRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "ValidateOnly", + }); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorServiceOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorServiceOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ClientConnectorServiceOperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/CreateClientConnectorServiceRequest.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/CreateClientConnectorServiceRequest.java new file mode 100644 index 0000000..5224ff7 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/CreateClientConnectorServiceRequest.java @@ -0,0 +1,1608 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +/** + * + * + *
+ * Message for creating a ClientConnectorService.
+ * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest} + */ +public final class CreateClientConnectorServiceRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest) + CreateClientConnectorServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateClientConnectorServiceRequest.newBuilder() to construct. + private CreateClientConnectorServiceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateClientConnectorServiceRequest() { + parent_ = ""; + clientConnectorServiceId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateClientConnectorServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateClientConnectorServiceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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(); + + clientConnectorServiceId_ = s; + break; + } + case 26: + { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + subBuilder = null; + if (clientConnectorService_ != null) { + subBuilder = clientConnectorService_.toBuilder(); + } + clientConnectorService_ = + input.readMessage( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(clientConnectorService_); + clientConnectorService_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 40: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_CreateClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_CreateClientConnectorServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * 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. Value for parent.
+   * 
+ * + * + * 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 CLIENT_CONNECTOR_SERVICE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object clientConnectorServiceId_; + /** + * + * + *
+   * Optional. User-settable client connector service resource ID.
+   *  * Must start with a letter.
+   *  * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
+   *  * Must end with a number or a letter.
+   * A random system generated name will be assigned
+   * if not specified by the user.
+   * 
+ * + * string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientConnectorServiceId. + */ + @java.lang.Override + public java.lang.String getClientConnectorServiceId() { + java.lang.Object ref = clientConnectorServiceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientConnectorServiceId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User-settable client connector service resource ID.
+   *  * Must start with a letter.
+   *  * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
+   *  * Must end with a number or a letter.
+   * A random system generated name will be assigned
+   * if not specified by the user.
+   * 
+ * + * string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientConnectorServiceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientConnectorServiceIdBytes() { + java.lang.Object ref = clientConnectorServiceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientConnectorServiceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_CONNECTOR_SERVICE_FIELD_NUMBER = 3; + private com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + clientConnectorService_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientConnectorService field is set. + */ + @java.lang.Override + public boolean hasClientConnectorService() { + return clientConnectorService_ != null; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientConnectorService. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getClientConnectorService() { + return clientConnectorService_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .getDefaultInstance() + : clientConnectorService_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder + getClientConnectorServiceOrBuilder() { + return getClientConnectorService(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set, validates request by executing a dry-run which would not
+   * alter the resource in any way.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientConnectorServiceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientConnectorServiceId_); + } + if (clientConnectorService_ != null) { + output.writeMessage(3, getClientConnectorService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + 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(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientConnectorServiceId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientConnectorServiceId_); + } + if (clientConnectorService_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getClientConnectorService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest) + obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getClientConnectorServiceId().equals(other.getClientConnectorServiceId())) return false; + if (hasClientConnectorService() != other.hasClientConnectorService()) return false; + if (hasClientConnectorService()) { + if (!getClientConnectorService().equals(other.getClientConnectorService())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + CLIENT_CONNECTOR_SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getClientConnectorServiceId().hashCode(); + if (hasClientConnectorService()) { + hash = (37 * hash) + CLIENT_CONNECTOR_SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getClientConnectorService().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message for creating a ClientConnectorService.
+   * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest) + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_CreateClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_CreateClientConnectorServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest.Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + clientConnectorServiceId_ = ""; + + if (clientConnectorServiceBuilder_ == null) { + clientConnectorService_ = null; + } else { + clientConnectorService_ = null; + clientConnectorServiceBuilder_ = null; + } + requestId_ = ""; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_CreateClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest(this); + result.parent_ = parent_; + result.clientConnectorServiceId_ = clientConnectorServiceId_; + if (clientConnectorServiceBuilder_ == null) { + result.clientConnectorService_ = clientConnectorService_; + } else { + result.clientConnectorService_ = clientConnectorServiceBuilder_.build(); + } + result.requestId_ = requestId_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getClientConnectorServiceId().isEmpty()) { + clientConnectorServiceId_ = other.clientConnectorServiceId_; + onChanged(); + } + if (other.hasClientConnectorService()) { + mergeClientConnectorService(other.getClientConnectorService()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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 clientConnectorServiceId_ = ""; + /** + * + * + *
+     * Optional. User-settable client connector service resource ID.
+     *  * Must start with a letter.
+     *  * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
+     *  * Must end with a number or a letter.
+     * A random system generated name will be assigned
+     * if not specified by the user.
+     * 
+ * + * string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clientConnectorServiceId. + */ + public java.lang.String getClientConnectorServiceId() { + java.lang.Object ref = clientConnectorServiceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientConnectorServiceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User-settable client connector service resource ID.
+     *  * Must start with a letter.
+     *  * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
+     *  * Must end with a number or a letter.
+     * A random system generated name will be assigned
+     * if not specified by the user.
+     * 
+ * + * string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for clientConnectorServiceId. + */ + public com.google.protobuf.ByteString getClientConnectorServiceIdBytes() { + java.lang.Object ref = clientConnectorServiceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientConnectorServiceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User-settable client connector service resource ID.
+     *  * Must start with a letter.
+     *  * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
+     *  * Must end with a number or a letter.
+     * A random system generated name will be assigned
+     * if not specified by the user.
+     * 
+ * + * string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The clientConnectorServiceId to set. + * @return This builder for chaining. + */ + public Builder setClientConnectorServiceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clientConnectorServiceId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-settable client connector service resource ID.
+     *  * Must start with a letter.
+     *  * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
+     *  * Must end with a number or a letter.
+     * A random system generated name will be assigned
+     * if not specified by the user.
+     * 
+ * + * string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearClientConnectorServiceId() { + + clientConnectorServiceId_ = getDefaultInstance().getClientConnectorServiceId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-settable client connector service resource ID.
+     *  * Must start with a letter.
+     *  * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
+     *  * Must end with a number or a letter.
+     * A random system generated name will be assigned
+     * if not specified by the user.
+     * 
+ * + * string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for clientConnectorServiceId to set. + * @return This builder for chaining. + */ + public Builder setClientConnectorServiceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clientConnectorServiceId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + clientConnectorService_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder> + clientConnectorServiceBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientConnectorService field is set. + */ + public boolean hasClientConnectorService() { + return clientConnectorServiceBuilder_ != null || clientConnectorService_ != null; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientConnectorService. + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getClientConnectorService() { + if (clientConnectorServiceBuilder_ == null) { + return clientConnectorService_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .getDefaultInstance() + : clientConnectorService_; + } else { + return clientConnectorServiceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService value) { + if (clientConnectorServiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clientConnectorService_ = value; + onChanged(); + } else { + clientConnectorServiceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + builderForValue) { + if (clientConnectorServiceBuilder_ == null) { + clientConnectorService_ = builderForValue.build(); + onChanged(); + } else { + clientConnectorServiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService value) { + if (clientConnectorServiceBuilder_ == null) { + if (clientConnectorService_ != null) { + clientConnectorService_ = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .newBuilder(clientConnectorService_) + .mergeFrom(value) + .buildPartial(); + } else { + clientConnectorService_ = value; + } + onChanged(); + } else { + clientConnectorServiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearClientConnectorService() { + if (clientConnectorServiceBuilder_ == null) { + clientConnectorService_ = null; + onChanged(); + } else { + clientConnectorService_ = null; + clientConnectorServiceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + getClientConnectorServiceBuilder() { + + onChanged(); + return getClientConnectorServiceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder + getClientConnectorServiceOrBuilder() { + if (clientConnectorServiceBuilder_ != null) { + return clientConnectorServiceBuilder_.getMessageOrBuilder(); + } else { + return clientConnectorService_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .getDefaultInstance() + : clientConnectorService_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder> + getClientConnectorServiceFieldBuilder() { + if (clientConnectorServiceBuilder_ == null) { + clientConnectorServiceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOrBuilder>( + getClientConnectorService(), getParentForChildren(), isClean()); + clientConnectorService_ = null; + } + return clientConnectorServiceBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set, validates request by executing a dry-run which would not
+     * alter the resource in any way.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set, validates request by executing a dry-run which would not
+     * alter the resource in any way.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, validates request by executing a dry-run which would not
+     * alter the resource in any way.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .CreateClientConnectorServiceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateClientConnectorServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateClientConnectorServiceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/CreateClientConnectorServiceRequestOrBuilder.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/CreateClientConnectorServiceRequestOrBuilder.java new file mode 100644 index 0000000..379810c --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/CreateClientConnectorServiceRequestOrBuilder.java @@ -0,0 +1,192 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +public interface CreateClientConnectorServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.CreateClientConnectorServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. User-settable client connector service resource ID.
+   *  * Must start with a letter.
+   *  * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
+   *  * Must end with a number or a letter.
+   * A random system generated name will be assigned
+   * if not specified by the user.
+   * 
+ * + * string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clientConnectorServiceId. + */ + java.lang.String getClientConnectorServiceId(); + /** + * + * + *
+   * Optional. User-settable client connector service resource ID.
+   *  * Must start with a letter.
+   *  * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
+   *  * Must end with a number or a letter.
+   * A random system generated name will be assigned
+   * if not specified by the user.
+   * 
+ * + * string client_connector_service_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clientConnectorServiceId. + */ + com.google.protobuf.ByteString getClientConnectorServiceIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientConnectorService field is set. + */ + boolean hasClientConnectorService(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientConnectorService. + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getClientConnectorService(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder + getClientConnectorServiceOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set, validates request by executing a dry-run which would not
+   * alter the resource in any way.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/DeleteClientConnectorServiceRequest.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/DeleteClientConnectorServiceRequest.java new file mode 100644 index 0000000..15fdc6c --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/DeleteClientConnectorServiceRequest.java @@ -0,0 +1,1066 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +/** + * + * + *
+ * Message for deleting a ClientConnectorService.
+ * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest} + */ +public final class DeleteClientConnectorServiceRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest) + DeleteClientConnectorServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteClientConnectorServiceRequest.newBuilder() to construct. + private DeleteClientConnectorServiceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteClientConnectorServiceRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteClientConnectorServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteClientConnectorServiceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 24: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_DeleteClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_DeleteClientConnectorServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * 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. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set, validates request by executing a dry-run which would not
+   * alter the resource in any way.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest) + obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message for deleting a ClientConnectorService.
+   * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest) + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_DeleteClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_DeleteClientConnectorServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest.Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + requestId_ = ""; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_DeleteClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest(this); + result.name_ = name_; + result.requestId_ = requestId_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set, validates request by executing a dry-run which would not
+     * alter the resource in any way.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set, validates request by executing a dry-run which would not
+     * alter the resource in any way.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, validates request by executing a dry-run which would not
+     * alter the resource in any way.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .DeleteClientConnectorServiceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteClientConnectorServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteClientConnectorServiceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/DeleteClientConnectorServiceRequestOrBuilder.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/DeleteClientConnectorServiceRequestOrBuilder.java new file mode 100644 index 0000000..e7afaa1 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/DeleteClientConnectorServiceRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +public interface DeleteClientConnectorServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.DeleteClientConnectorServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set, validates request by executing a dry-run which would not
+   * alter the resource in any way.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/GetClientConnectorServiceRequest.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/GetClientConnectorServiceRequest.java new file mode 100644 index 0000000..f623b6f --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/GetClientConnectorServiceRequest.java @@ -0,0 +1,715 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +/** + * + * + *
+ * Message for getting a ClientConnectorService.
+ * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest} + */ +public final class GetClientConnectorServiceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest) + GetClientConnectorServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetClientConnectorServiceRequest.newBuilder() to construct. + private GetClientConnectorServiceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetClientConnectorServiceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetClientConnectorServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetClientConnectorServiceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + 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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_GetClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_GetClientConnectorServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + .class, + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * 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. Name of the resource.
+   * 
+ * + * + * 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.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest) + 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.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message for getting a ClientConnectorService.
+   * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest) + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_GetClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_GetClientConnectorServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest.Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_GetClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest(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.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + .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.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * 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.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .GetClientConnectorServiceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetClientConnectorServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetClientConnectorServiceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/GetClientConnectorServiceRequestOrBuilder.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/GetClientConnectorServiceRequestOrBuilder.java new file mode 100644 index 0000000..6aefc46 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/GetClientConnectorServiceRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +public interface GetClientConnectorServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.GetClientConnectorServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * 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-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesRequest.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesRequest.java new file mode 100644 index 0000000..6ae9bf1 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesRequest.java @@ -0,0 +1,1350 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +/** + * + * + *
+ * Message for requesting list of ClientConnectorServices.
+ * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest} + */ +public final class ListClientConnectorServicesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest) + ListClientConnectorServicesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListClientConnectorServicesRequest.newBuilder() to construct. + private ListClientConnectorServicesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListClientConnectorServicesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListClientConnectorServicesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListClientConnectorServicesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Parent value for ListClientConnectorServicesRequest.
+   * 
+ * + * + * 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. Parent value for ListClientConnectorServicesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest) + obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message for requesting list of ClientConnectorServices.
+   * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest) + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListClientConnectorServicesRequest.
+     * 
+ * + * + * 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. Parent value for ListClientConnectorServicesRequest.
+     * 
+ * + * + * 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. Parent value for ListClientConnectorServicesRequest.
+     * 
+ * + * + * 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. Parent value for ListClientConnectorServicesRequest.
+     * 
+ * + * + * 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. Parent value for ListClientConnectorServicesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListClientConnectorServicesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListClientConnectorServicesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesRequestOrBuilder.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesRequestOrBuilder.java new file mode 100644 index 0000000..344817f --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +public interface ListClientConnectorServicesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListClientConnectorServicesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListClientConnectorServicesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesResponse.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesResponse.java new file mode 100644 index 0000000..21fa2b7 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesResponse.java @@ -0,0 +1,1580 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +/** + * + * + *
+ * Message for response to listing ClientConnectorServices.
+ * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse} + */ +public final class ListClientConnectorServicesResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse) + ListClientConnectorServicesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListClientConnectorServicesResponse.newBuilder() to construct. + private ListClientConnectorServicesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListClientConnectorServicesResponse() { + clientConnectorServices_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListClientConnectorServicesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListClientConnectorServicesResponse( + 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)) { + clientConnectorServices_ = + new java.util.ArrayList< + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorService>(); + mutable_bitField0_ |= 0x00000001; + } + clientConnectorServices_.add( + input.readMessage( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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)) { + clientConnectorServices_ = java.util.Collections.unmodifiableList(clientConnectorServices_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse.Builder.class); + } + + public static final int CLIENT_CONNECTOR_SERVICES_FIELD_NUMBER = 1; + private java.util.List< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService> + clientConnectorServices_; + /** + * + * + *
+   * The list of ClientConnectorService.
+   * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService> + getClientConnectorServicesList() { + return clientConnectorServices_; + } + /** + * + * + *
+   * The list of ClientConnectorService.
+   * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOrBuilder> + getClientConnectorServicesOrBuilderList() { + return clientConnectorServices_; + } + /** + * + * + *
+   * The list of ClientConnectorService.
+   * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + @java.lang.Override + public int getClientConnectorServicesCount() { + return clientConnectorServices_.size(); + } + /** + * + * + *
+   * The list of ClientConnectorService.
+   * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getClientConnectorServices(int index) { + return clientConnectorServices_.get(index); + } + /** + * + * + *
+   * The list of ClientConnectorService.
+   * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder + getClientConnectorServicesOrBuilder(int index) { + return clientConnectorServices_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < clientConnectorServices_.size(); i++) { + output.writeMessage(1, clientConnectorServices_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < clientConnectorServices_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, clientConnectorServices_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse + other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse) + obj; + + if (!getClientConnectorServicesList().equals(other.getClientConnectorServicesList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getClientConnectorServicesCount() > 0) { + hash = (37 * hash) + CLIENT_CONNECTOR_SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getClientConnectorServicesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message for response to listing ClientConnectorServices.
+   * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse) + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getClientConnectorServicesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (clientConnectorServicesBuilder_ == null) { + clientConnectorServices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + clientConnectorServicesBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_ListClientConnectorServicesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse(this); + int from_bitField0_ = bitField0_; + if (clientConnectorServicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + clientConnectorServices_ = + java.util.Collections.unmodifiableList(clientConnectorServices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.clientConnectorServices_ = clientConnectorServices_; + } else { + result.clientConnectorServices_ = clientConnectorServicesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse.getDefaultInstance()) return this; + if (clientConnectorServicesBuilder_ == null) { + if (!other.clientConnectorServices_.isEmpty()) { + if (clientConnectorServices_.isEmpty()) { + clientConnectorServices_ = other.clientConnectorServices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureClientConnectorServicesIsMutable(); + clientConnectorServices_.addAll(other.clientConnectorServices_); + } + onChanged(); + } + } else { + if (!other.clientConnectorServices_.isEmpty()) { + if (clientConnectorServicesBuilder_.isEmpty()) { + clientConnectorServicesBuilder_.dispose(); + clientConnectorServicesBuilder_ = null; + clientConnectorServices_ = other.clientConnectorServices_; + bitField0_ = (bitField0_ & ~0x00000001); + clientConnectorServicesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getClientConnectorServicesFieldBuilder() + : null; + } else { + clientConnectorServicesBuilder_.addAllMessages(other.clientConnectorServices_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService> + clientConnectorServices_ = java.util.Collections.emptyList(); + + private void ensureClientConnectorServicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + clientConnectorServices_ = + new java.util.ArrayList< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService>( + clientConnectorServices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder> + clientConnectorServicesBuilder_; + + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public java.util.List< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService> + getClientConnectorServicesList() { + if (clientConnectorServicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(clientConnectorServices_); + } else { + return clientConnectorServicesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public int getClientConnectorServicesCount() { + if (clientConnectorServicesBuilder_ == null) { + return clientConnectorServices_.size(); + } else { + return clientConnectorServicesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getClientConnectorServices(int index) { + if (clientConnectorServicesBuilder_ == null) { + return clientConnectorServices_.get(index); + } else { + return clientConnectorServicesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public Builder setClientConnectorServices( + int index, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService value) { + if (clientConnectorServicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClientConnectorServicesIsMutable(); + clientConnectorServices_.set(index, value); + onChanged(); + } else { + clientConnectorServicesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public Builder setClientConnectorServices( + int index, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + builderForValue) { + if (clientConnectorServicesBuilder_ == null) { + ensureClientConnectorServicesIsMutable(); + clientConnectorServices_.set(index, builderForValue.build()); + onChanged(); + } else { + clientConnectorServicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public Builder addClientConnectorServices( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService value) { + if (clientConnectorServicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClientConnectorServicesIsMutable(); + clientConnectorServices_.add(value); + onChanged(); + } else { + clientConnectorServicesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public Builder addClientConnectorServices( + int index, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService value) { + if (clientConnectorServicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClientConnectorServicesIsMutable(); + clientConnectorServices_.add(index, value); + onChanged(); + } else { + clientConnectorServicesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public Builder addClientConnectorServices( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + builderForValue) { + if (clientConnectorServicesBuilder_ == null) { + ensureClientConnectorServicesIsMutable(); + clientConnectorServices_.add(builderForValue.build()); + onChanged(); + } else { + clientConnectorServicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public Builder addClientConnectorServices( + int index, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + builderForValue) { + if (clientConnectorServicesBuilder_ == null) { + ensureClientConnectorServicesIsMutable(); + clientConnectorServices_.add(index, builderForValue.build()); + onChanged(); + } else { + clientConnectorServicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public Builder addAllClientConnectorServices( + java.lang.Iterable< + ? extends + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService> + values) { + if (clientConnectorServicesBuilder_ == null) { + ensureClientConnectorServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, clientConnectorServices_); + onChanged(); + } else { + clientConnectorServicesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public Builder clearClientConnectorServices() { + if (clientConnectorServicesBuilder_ == null) { + clientConnectorServices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + clientConnectorServicesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public Builder removeClientConnectorServices(int index) { + if (clientConnectorServicesBuilder_ == null) { + ensureClientConnectorServicesIsMutable(); + clientConnectorServices_.remove(index); + onChanged(); + } else { + clientConnectorServicesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + getClientConnectorServicesBuilder(int index) { + return getClientConnectorServicesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder + getClientConnectorServicesOrBuilder(int index) { + if (clientConnectorServicesBuilder_ == null) { + return clientConnectorServices_.get(index); + } else { + return clientConnectorServicesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOrBuilder> + getClientConnectorServicesOrBuilderList() { + if (clientConnectorServicesBuilder_ != null) { + return clientConnectorServicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(clientConnectorServices_); + } + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + addClientConnectorServicesBuilder() { + return getClientConnectorServicesFieldBuilder() + .addBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + addClientConnectorServicesBuilder(int index) { + return getClientConnectorServicesFieldBuilder() + .addBuilder( + index, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of ClientConnectorService.
+     * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + public java.util.List< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder> + getClientConnectorServicesBuilderList() { + return getClientConnectorServicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder> + getClientConnectorServicesFieldBuilder() { + if (clientConnectorServicesBuilder_ == null) { + clientConnectorServicesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOrBuilder>( + clientConnectorServices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + clientConnectorServices_ = null; + } + return clientConnectorServicesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ListClientConnectorServicesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListClientConnectorServicesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListClientConnectorServicesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesResponseOrBuilder.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesResponseOrBuilder.java new file mode 100644 index 0000000..12a9d7b --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/ListClientConnectorServicesResponseOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +public interface ListClientConnectorServicesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.ListClientConnectorServicesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of ClientConnectorService.
+   * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + java.util.List + getClientConnectorServicesList(); + /** + * + * + *
+   * The list of ClientConnectorService.
+   * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getClientConnectorServices(int index); + /** + * + * + *
+   * The list of ClientConnectorService.
+   * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + int getClientConnectorServicesCount(); + /** + * + * + *
+   * The list of ClientConnectorService.
+   * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOrBuilder> + getClientConnectorServicesOrBuilderList(); + /** + * + * + *
+   * The list of ClientConnectorService.
+   * 
+ * + * + * repeated .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_services = 1; + * + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder + getClientConnectorServicesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/LocationName.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/LocationName.java new file mode 100644 index 0000000..6b39feb --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.beyondcorp.clientconnectorservices.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 LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/UpdateClientConnectorServiceRequest.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/UpdateClientConnectorServiceRequest.java new file mode 100644 index 0000000..309b196 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/UpdateClientConnectorServiceRequest.java @@ -0,0 +1,1629 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +/** + * + * + *
+ * Message for updating a ClientConnectorService
+ * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest} + */ +public final class UpdateClientConnectorServiceRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest) + UpdateClientConnectorServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateClientConnectorServiceRequest.newBuilder() to construct. + private UpdateClientConnectorServiceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateClientConnectorServiceRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateClientConnectorServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateClientConnectorServiceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + subBuilder = null; + if (clientConnectorService_ != null) { + subBuilder = clientConnectorService_.toBuilder(); + } + clientConnectorService_ = + input.readMessage( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(clientConnectorService_); + clientConnectorService_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 32: + { + validateOnly_ = input.readBool(); + break; + } + case 40: + { + allowMissing_ = input.readBool(); + 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.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_UpdateClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_UpdateClientConnectorServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * ClientConnectorService resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * Mutable fields: display_name.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * ClientConnectorService resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * Mutable fields: display_name.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * ClientConnectorService resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * Mutable fields: display_name.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int CLIENT_CONNECTOR_SERVICE_FIELD_NUMBER = 2; + private com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + clientConnectorService_; + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientConnectorService field is set. + */ + @java.lang.Override + public boolean hasClientConnectorService() { + return clientConnectorService_ != null; + } + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientConnectorService. + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getClientConnectorService() { + return clientConnectorService_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .getDefaultInstance() + : clientConnectorService_; + } + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder + getClientConnectorServiceOrBuilder() { + return getClientConnectorService(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set, validates request by executing a dry-run which would not
+   * alter the resource in any way.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 5; + private boolean allowMissing_; + /** + * + * + *
+   * Optional. If set as true, will create the resource if it is not found.
+   * 
+ * + * bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (clientConnectorService_ != null) { + output.writeMessage(2, getClientConnectorService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + if (allowMissing_ != false) { + output.writeBool(5, allowMissing_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (clientConnectorService_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getClientConnectorService()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowMissing_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + other = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest) + obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasClientConnectorService() != other.hasClientConnectorService()) return false; + if (hasClientConnectorService()) { + if (!getClientConnectorService().equals(other.getClientConnectorService())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (!unknownFields.equals(other.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 (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasClientConnectorService()) { + hash = (37 * hash) + CLIENT_CONNECTOR_SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getClientConnectorService().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message for updating a ClientConnectorService
+   * 
+ * + * Protobuf type {@code + * google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest) + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_UpdateClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_UpdateClientConnectorServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest.class, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest.Builder.class); + } + + // Construct using + // com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + if (clientConnectorServiceBuilder_ == null) { + clientConnectorService_ = null; + } else { + clientConnectorService_ = null; + clientConnectorServiceBuilder_ = null; + } + requestId_ = ""; + + validateOnly_ = false; + + allowMissing_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServicesServiceProto + .internal_static_google_cloud_beyondcorp_clientconnectorservices_v1_UpdateClientConnectorServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + getDefaultInstanceForType() { + return com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + build() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + buildPartial() { + com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + result = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest(this); + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + if (clientConnectorServiceBuilder_ == null) { + result.clientConnectorService_ = clientConnectorService_; + } else { + result.clientConnectorService_ = clientConnectorServiceBuilder_.build(); + } + result.requestId_ = requestId_; + result.validateOnly_ = validateOnly_; + result.allowMissing_ = allowMissing_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest) { + return mergeFrom( + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + other) { + if (other + == com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasClientConnectorService()) { + mergeClientConnectorService(other.getClientConnectorService()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * ClientConnectorService resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * Mutable fields: display_name.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * ClientConnectorService resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * Mutable fields: display_name.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * ClientConnectorService resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * Mutable fields: display_name.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * ClientConnectorService resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * Mutable fields: display_name.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * ClientConnectorService resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * Mutable fields: display_name.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * ClientConnectorService resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * Mutable fields: display_name.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * ClientConnectorService resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * Mutable fields: display_name.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * ClientConnectorService resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * Mutable fields: display_name.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * ClientConnectorService resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * Mutable fields: display_name.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + clientConnectorService_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder> + clientConnectorServiceBuilder_; + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientConnectorService field is set. + */ + public boolean hasClientConnectorService() { + return clientConnectorServiceBuilder_ != null || clientConnectorService_ != null; + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientConnectorService. + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getClientConnectorService() { + if (clientConnectorServiceBuilder_ == null) { + return clientConnectorService_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .getDefaultInstance() + : clientConnectorService_; + } else { + return clientConnectorServiceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService value) { + if (clientConnectorServiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clientConnectorService_ = value; + onChanged(); + } else { + clientConnectorServiceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + builderForValue) { + if (clientConnectorServiceBuilder_ == null) { + clientConnectorService_ = builderForValue.build(); + onChanged(); + } else { + clientConnectorServiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeClientConnectorService( + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService value) { + if (clientConnectorServiceBuilder_ == null) { + if (clientConnectorService_ != null) { + clientConnectorService_ = + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .newBuilder(clientConnectorService_) + .mergeFrom(value) + .buildPartial(); + } else { + clientConnectorService_ = value; + } + onChanged(); + } else { + clientConnectorServiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearClientConnectorService() { + if (clientConnectorServiceBuilder_ == null) { + clientConnectorService_ = null; + onChanged(); + } else { + clientConnectorService_ = null; + clientConnectorServiceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder + getClientConnectorServiceBuilder() { + + onChanged(); + return getClientConnectorServiceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder + getClientConnectorServiceOrBuilder() { + if (clientConnectorServiceBuilder_ != null) { + return clientConnectorServiceBuilder_.getMessageOrBuilder(); + } else { + return clientConnectorService_ == null + ? com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .getDefaultInstance() + : clientConnectorService_; + } + } + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder> + getClientConnectorServiceFieldBuilder() { + if (clientConnectorServiceBuilder_ == null) { + clientConnectorServiceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService, + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + .Builder, + com.google.cloud.beyondcorp.clientconnectorservices.v1 + .ClientConnectorServiceOrBuilder>( + getClientConnectorService(), getParentForChildren(), isClean()); + clientConnectorService_ = null; + } + return clientConnectorServiceBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set, validates request by executing a dry-run which would not
+     * alter the resource in any way.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set, validates request by executing a dry-run which would not
+     * alter the resource in any way.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, validates request by executing a dry-run which would not
+     * alter the resource in any way.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * Optional. If set as true, will create the resource if it is not found.
+     * 
+ * + * bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * Optional. If set as true, will create the resource if it is not found.
+     * 
+ * + * bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set as true, will create the resource if it is not found.
+     * 
+ * + * bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest) + private static final com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest(); + } + + public static com.google.cloud.beyondcorp.clientconnectorservices.v1 + .UpdateClientConnectorServiceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateClientConnectorServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateClientConnectorServiceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/UpdateClientConnectorServiceRequestOrBuilder.java b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/UpdateClientConnectorServiceRequestOrBuilder.java new file mode 100644 index 0000000..7c225d6 --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/java/com/google/cloud/beyondcorp/clientconnectorservices/v1/UpdateClientConnectorServiceRequestOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: +// google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto + +package com.google.cloud.beyondcorp.clientconnectorservices.v1; + +public interface UpdateClientConnectorServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.beyondcorp.clientconnectorservices.v1.UpdateClientConnectorServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * ClientConnectorService resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * Mutable fields: display_name.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * ClientConnectorService resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * Mutable fields: display_name.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * ClientConnectorService resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * Mutable fields: display_name.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the clientConnectorService field is set. + */ + boolean hasClientConnectorService(); + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The clientConnectorService. + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService + getClientConnectorService(); + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService client_connector_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServiceOrBuilder + getClientConnectorServiceOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set, validates request by executing a dry-run which would not
+   * alter the resource in any way.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. If set as true, will create the resource if it is not found.
+   * 
+ * + * bool allow_missing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/proto/google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/proto/google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto new file mode 100644 index 0000000..fdfb27c --- /dev/null +++ b/proto-google-cloud-beyondcorp-clientconnectorservices-v1/src/main/proto/google/cloud/beyondcorp/clientconnectorservices/v1/client_connector_services_service.proto @@ -0,0 +1,421 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.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.beyondcorp.clientconnectorservices.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BeyondCorp.ClientConnectorServices.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1;clientconnectorservices"; +option java_multiple_files = true; +option java_outer_classname = "ClientConnectorServicesServiceProto"; +option java_package = "com.google.cloud.beyondcorp.clientconnectorservices.v1"; +option php_namespace = "Google\\Cloud\\BeyondCorp\\ClientConnectorServices\\V1"; +option ruby_package = "Google::Cloud::BeyondCorp::ClientConnectorServices::V1"; + +// ## API Overview +// +// The `beyondcorp.googleapis.com` service implements the Google Cloud +// BeyondCorp API. +// +// ## Data Model +// +// The ClientConnectorServicesService exposes the following resources: +// +// * Client Connector Services, named as follows: +// `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`. +service ClientConnectorServicesService { + option (google.api.default_host) = "beyondcorp.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists ClientConnectorServices in a given project and location. + rpc ListClientConnectorServices(ListClientConnectorServicesRequest) + returns (ListClientConnectorServicesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/clientConnectorServices" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single ClientConnectorService. + rpc GetClientConnectorService(GetClientConnectorServiceRequest) + returns (ClientConnectorService) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/clientConnectorServices/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new ClientConnectorService in a given project and location. + rpc CreateClientConnectorService(CreateClientConnectorServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/clientConnectorServices" + body: "client_connector_service" + }; + option (google.api.method_signature) = + "parent,client_connector_service,client_connector_service_id"; + option (google.longrunning.operation_info) = { + response_type: "ClientConnectorService" + metadata_type: "ClientConnectorServiceOperationMetadata" + }; + } + + // Updates the parameters of a single ClientConnectorService. + rpc UpdateClientConnectorService(UpdateClientConnectorServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{client_connector_service.name=projects/*/locations/*/clientConnectorServices/*}" + body: "client_connector_service" + }; + option (google.api.method_signature) = + "client_connector_service,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ClientConnectorService" + metadata_type: "ClientConnectorServiceOperationMetadata" + }; + } + + // Deletes a single ClientConnectorService. + rpc DeleteClientConnectorService(DeleteClientConnectorServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/clientConnectorServices/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "ClientConnectorServiceOperationMetadata" + }; + } +} + +// Message describing ClientConnectorService object. +message ClientConnectorService { + option (google.api.resource) = { + type: "beyondcorp.googleapis.com/ClientConnectorService" + pattern: "projects/{project}/locations/{location}/clientConnectorServices/{client_connector_service}" + }; + + // Settings of how to connect to the ClientGateway. + // One of the following options should be set. + message Ingress { + // The basic ingress config for ClientGateways. + message Config { + // The setting used to configure ClientGateways. + // It is adding routes to the client's routing table + // after the connection is established. + message DestinationRoute { + // Required. The network address of the subnet + // for which the packet is routed to the ClientGateway. + string address = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The network mask of the subnet + // for which the packet is routed to the ClientGateway. + string netmask = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // The protocol used to connect to the server. + enum TransportProtocol { + // Default value. This value is unused. + TRANSPORT_PROTOCOL_UNSPECIFIED = 0; + + // TCP protocol. + TCP = 1; + } + + // Required. Immutable. The transport protocol used between the client and + // the server. + TransportProtocol transport_protocol = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. The settings used to configure basic ClientGateways. + repeated DestinationRoute destination_routes = 2 + [(google.api.field_behavior) = REQUIRED]; + } + + oneof ingress_config { + // The basic ingress config for ClientGateways. + Config config = 1; + } + } + + // The details of the egress info. One of the following options should be set. + message Egress { + // The peered VPC owned by the consumer project. + message PeeredVpc { + // Required. The name of the peered VPC owned by the consumer project. + string network_vpc = 1 [(google.api.field_behavior) = REQUIRED]; + } + + oneof destination_type { + // A VPC from the consumer project. + PeeredVpc peered_vpc = 1; + } + } + + // Represents the different states of a ClientConnectorService. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // ClientConnectorService is being created. + CREATING = 1; + + // ClientConnectorService is being updated. + UPDATING = 2; + + // ClientConnectorService is being deleted. + DELETING = 3; + + // ClientConnectorService is running. + RUNNING = 4; + + // ClientConnectorService is down and may be restored in the future. + // This happens when CCFE sends ProjectState = OFF. + DOWN = 5; + + // ClientConnectorService encountered an error and is in an indeterministic + // state. + ERROR = 6; + } + + // Required. Name of resource. The name is ignored during creation. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. [Output only] Create time stamp. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] Update time stamp. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-provided name. + // The display name should follow certain format. + // * Must be 6 to 30 characters in length. + // * Can only contain lowercase letters, numbers, and hyphens. + // * Must start with a letter. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The details of the ingress settings. + Ingress ingress = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. The details of the egress settings. + Egress egress = 7 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The operational state of the ClientConnectorService. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for requesting list of ClientConnectorServices. +message ListClientConnectorServicesRequest { + // Required. Parent value for ListClientConnectorServicesRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "beyondcorp.googleapis.com/ClientConnectorService" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing ClientConnectorServices. +message ListClientConnectorServicesResponse { + // The list of ClientConnectorService. + repeated ClientConnectorService client_connector_services = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a ClientConnectorService. +message GetClientConnectorServiceRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "beyondcorp.googleapis.com/ClientConnectorService" + } + ]; +} + +// Message for creating a ClientConnectorService. +message CreateClientConnectorServiceRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "beyondcorp.googleapis.com/ClientConnectorService" + } + ]; + + // Optional. User-settable client connector service resource ID. + // * Must start with a letter. + // * Must contain between 4-63 characters from `/[a-z][0-9]-/`. + // * Must end with a number or a letter. + // + // A random system generated name will be assigned + // if not specified by the user. + string client_connector_service_id = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being created. + ClientConnectorService client_connector_service = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validates request by executing a dry-run which would not + // alter the resource in any way. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for updating a ClientConnectorService +message UpdateClientConnectorServiceRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // ClientConnectorService resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + // + // Mutable fields: display_name. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated. + ClientConnectorService client_connector_service = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validates request by executing a dry-run which would not + // alter the resource in any way. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set as true, will create the resource if it is not found. + bool allow_missing = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for deleting a ClientConnectorService. +message DeleteClientConnectorServiceRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "beyondcorp.googleapis.com/ClientConnectorService" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validates request by executing a dry-run which would not + // alter the resource in any way. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of the long-running operation. +message ClientConnectorServiceOperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..c4cbdd3 --- /dev/null +++ b/renovate.json @@ -0,0 +1,74 @@ +{ + "extends": [ + ":separateMajorReleases", + ":combinePatchMinorReleases", + ":ignoreUnstable", + ":prImmediately", + ":updateNotScheduled", + ":automergeDisabled", + ":ignoreModulesAndTests", + ":maintainLockFilesDisabled", + ":autodetectPinVersions" + ], + "packageRules": [ + { + "packagePatterns": [ + "^com.google.guava:" + ], + "versionScheme": "docker" + }, + { + "packagePatterns": [ + "*" + ], + "semanticCommitType": "deps", + "semanticCommitScope": null + }, + { + "packagePatterns": [ + "^org.apache.maven", + "^org.jacoco:", + "^org.codehaus.mojo:", + "^org.sonatype.plugins:", + "^com.coveo:", + "^com.google.cloud:google-cloud-shared-config" + ], + "semanticCommitType": "build", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-beyondcorp-clientconnectorservices", + "^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 new file mode 100644 index 0000000..1652634 --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + -install-without-bom + jar + Google BeyondCorp ClientConnectorServices Install Without Bom + https://github.com/googleapis/java-beyondcorp-clientconnectorservices + + + + com.google.cloud.samples + shared-configuration + 1.2.0 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices + 0.0.0 + + + + + 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 new file mode 100644 index 0000000..3cddfd7 --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud--samples + 0.0.1-SNAPSHOT + pom + Google BeyondCorp ClientConnectorServices Samples Parent + https://github.com/googleapis/java-beyondcorp-clientconnectorservices + + 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 + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 0000000..0595950 --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + -snapshot + jar + Google BeyondCorp ClientConnectorServices Snapshot Samples + https://github.com/googleapis/java-beyondcorp-clientconnectorservices + + + + com.google.cloud.samples + shared-configuration + 1.2.0 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices + 0.0.0 + + + + + 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/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 0000000..abda942 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + -snippets + jar + Google BeyondCorp ClientConnectorServices Snippets + https://github.com/googleapis/java-beyondcorp-clientconnectorservices + + + + com.google.cloud.samples + shared-configuration + 1.2.0 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-beyondcorp-clientconnectorservices + 0.0.0 + + + + junit + junit + 4.13.2 + test + + + com.google.truth + truth + 1.1.3 + test + + + diff --git a/versions.txt b/versions.txt new file mode 100644 index 0000000..ab7aca8 --- /dev/null +++ b/versions.txt @@ -0,0 +1,6 @@ +# Format: +# module:released-version:current-version + +google-cloud-beyondcorp-clientconnectorservices:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-beyondcorp-clientconnectorservices-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-beyondcorp-clientconnectorservices-v1:0.0.0:0.0.1-SNAPSHOT