From 44c02ed11efa25eab0028286ba428f815c2f5307 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 1 Mar 2022 23:13:54 -0500 Subject: [PATCH] feat: initial generation --- .github/.OwlBot.lock.yaml | 3 + .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/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 | 48 + .github/trusted-contribution.yml | 3 + .github/workflows/approve-readme.yaml | 69 + .github/workflows/auto-release.yaml | 103 + .github/workflows/ci.yaml | 87 + .github/workflows/samples.yaml | 29 + .gitignore | 17 + .kokoro/build.bat | 18 + .kokoro/build.sh | 129 + .kokoro/coerce_logs.sh | 37 + .kokoro/common.cfg | 13 + .kokoro/common.sh | 58 + .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.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 | 45 + .kokoro/trampoline.sh | 26 + .repo-metadata.json | 16 + CODE_OF_CONDUCT.md | 94 + CONTRIBUTING.md | 92 + LICENSE | 201 + README.md | 201 + SECURITY.md | 7 + google-cloud-certificate-manager-bom/pom.xml | 94 + google-cloud-certificate-manager/pom.xml | 111 + .../v1/CertificateManagerClient.java | 3115 ++++++ .../v1/CertificateManagerSettings.java | 595 + .../certificatemanager/v1/gapic_metadata.json | 78 + .../certificatemanager/v1/package-info.java | 62 + .../v1/stub/CertificateManagerStub.java | 258 + .../stub/CertificateManagerStubSettings.java | 1697 +++ ...GrpcCertificateManagerCallableFactory.java | 113 + .../v1/stub/GrpcCertificateManagerStub.java | 1075 ++ .../v1/CertificateManagerClientTest.java | 1906 ++++ .../v1/MockCertificateManager.java | 59 + .../v1/MockCertificateManagerImpl.java | 484 + .../pom.xml | 69 + .../v1/CertificateManagerGrpc.java | 2783 +++++ java.header | 15 + license-checks.xml | 10 + owlbot.py | 24 + pom.xml | 188 + .../clirr-ignored-differences.xml | 19 + .../pom.xml | 46 + .../certificatemanager/v1/Certificate.java | 9938 +++++++++++++++++ .../v1/CertificateManagerProto.java | 975 ++ .../certificatemanager/v1/CertificateMap.java | 5060 +++++++++ .../v1/CertificateMapEntry.java | 2887 +++++ .../v1/CertificateMapEntryName.java | 269 + .../v1/CertificateMapEntryOrBuilder.java | 379 + .../v1/CertificateMapName.java | 227 + .../v1/CertificateMapOrBuilder.java | 274 + .../v1/CertificateName.java | 227 + .../v1/CertificateOrBuilder.java | 431 + .../v1/CreateCertificateMapEntryRequest.java | 1162 ++ ...teCertificateMapEntryRequestOrBuilder.java | 123 + .../v1/CreateCertificateMapRequest.java | 1155 ++ .../CreateCertificateMapRequestOrBuilder.java | 122 + .../v1/CreateCertificateRequest.java | 1147 ++ .../v1/CreateCertificateRequestOrBuilder.java | 122 + .../v1/CreateDnsAuthorizationRequest.java | 1156 ++ ...reateDnsAuthorizationRequestOrBuilder.java | 122 + .../v1/DeleteCertificateMapEntryRequest.java | 674 ++ ...teCertificateMapEntryRequestOrBuilder.java | 56 + .../v1/DeleteCertificateMapRequest.java | 669 ++ .../DeleteCertificateMapRequestOrBuilder.java | 56 + .../v1/DeleteCertificateRequest.java | 665 ++ .../v1/DeleteCertificateRequestOrBuilder.java | 56 + .../v1/DeleteDnsAuthorizationRequest.java | 669 ++ ...eleteDnsAuthorizationRequestOrBuilder.java | 56 + .../v1/DnsAuthorization.java | 3375 ++++++ .../v1/DnsAuthorizationName.java | 227 + .../v1/DnsAuthorizationOrBuilder.java | 284 + .../v1/GetCertificateMapEntryRequest.java | 669 ++ ...etCertificateMapEntryRequestOrBuilder.java | 56 + .../v1/GetCertificateMapRequest.java | 665 ++ .../v1/GetCertificateMapRequestOrBuilder.java | 56 + .../v1/GetCertificateRequest.java | 661 ++ .../v1/GetCertificateRequestOrBuilder.java | 56 + .../v1/GetDnsAuthorizationRequest.java | 667 ++ .../GetDnsAuthorizationRequestOrBuilder.java | 56 + .../v1/ListCertificateMapEntriesRequest.java | 1355 +++ ...CertificateMapEntriesRequestOrBuilder.java | 159 + .../v1/ListCertificateMapEntriesResponse.java | 1514 +++ ...ertificateMapEntriesResponseOrBuilder.java | 169 + .../v1/ListCertificateMapsRequest.java | 1322 +++ .../ListCertificateMapsRequestOrBuilder.java | 152 + .../v1/ListCertificateMapsResponse.java | 1468 +++ .../ListCertificateMapsResponseOrBuilder.java | 158 + .../v1/ListCertificatesRequest.java | 1319 +++ .../v1/ListCertificatesRequestOrBuilder.java | 152 + .../v1/ListCertificatesResponse.java | 1439 +++ .../v1/ListCertificatesResponseOrBuilder.java | 157 + .../v1/ListDnsAuthorizationsRequest.java | 1324 +++ ...ListDnsAuthorizationsRequestOrBuilder.java | 152 + .../v1/ListDnsAuthorizationsResponse.java | 1479 +++ ...istDnsAuthorizationsResponseOrBuilder.java | 164 + .../certificatemanager/v1/LocationName.java | 192 + .../v1/OperationMetadata.java | 1816 +++ .../v1/OperationMetadataOrBuilder.java | 211 + .../certificatemanager/v1/ServingState.java | 178 + .../v1/UpdateCertificateMapEntryRequest.java | 1090 ++ ...teCertificateMapEntryRequestOrBuilder.java | 111 + .../v1/UpdateCertificateMapRequest.java | 1083 ++ .../UpdateCertificateMapRequestOrBuilder.java | 110 + .../v1/UpdateCertificateRequest.java | 1075 ++ .../v1/UpdateCertificateRequestOrBuilder.java | 110 + .../v1/UpdateDnsAuthorizationRequest.java | 1084 ++ ...pdateDnsAuthorizationRequestOrBuilder.java | 110 + .../v1/certificate_manager.proto | 1071 ++ 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 + 166 files changed, 71850 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/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.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-certificate-manager-bom/pom.xml create mode 100644 google-cloud-certificate-manager/pom.xml create mode 100644 google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerClient.java create mode 100644 google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerSettings.java create mode 100644 google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/gapic_metadata.json create mode 100644 google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/package-info.java create mode 100644 google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStub.java create mode 100644 google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStubSettings.java create mode 100644 google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerCallableFactory.java create mode 100644 google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerStub.java create mode 100644 google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/CertificateManagerClientTest.java create mode 100644 google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/MockCertificateManager.java create mode 100644 google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/MockCertificateManagerImpl.java create mode 100644 grpc-google-cloud-certificate-manager-v1/pom.xml create mode 100644 grpc-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerGrpc.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-certificate-manager-v1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-certificate-manager-v1/pom.xml create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/Certificate.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerProto.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMap.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntry.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntryName.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntryOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapName.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateName.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapEntryRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapEntryRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateDnsAuthorizationRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateDnsAuthorizationRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapEntryRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapEntryRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteDnsAuthorizationRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteDnsAuthorizationRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorization.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorizationName.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorizationOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapEntryRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapEntryRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetDnsAuthorizationRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetDnsAuthorizationRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesResponse.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesResponseOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsResponse.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsResponseOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesResponse.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesResponseOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsResponse.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsResponseOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/LocationName.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/OperationMetadata.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/OperationMetadataOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ServingState.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapEntryRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapEntryRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateDnsAuthorizationRequest.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateDnsAuthorizationRequestOrBuilder.java create mode 100644 proto-google-cloud-certificate-manager-v1/src/main/proto/google/cloud/certificatemanager/v1/certificate_manager.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..ea5b024 --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + digest: sha256:e3746f84955528d0fe24bf2e4df89875d6ce5a036af01b9c326d61a38838523a + 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..13da9a4 --- /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/certificatemanager/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/$1/proto-google-cloud-certificate-manager-$1/src" +- source: "/google/cloud/certificatemanager/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/$1/grpc-google-cloud-certificate-manager-$1/src" +- source: "/google/cloud/certificatemanager/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/$1/google-cloud-certificate-manager/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..b83b0da --- /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-certificate-manager/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..436c960 --- /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-certificate-manager/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/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..f65f189 --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,48 @@ + +# 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 (8)" + - "dependencies (11)" + - "lint" + - "clirr" + - "units (8)" + - "units (11)" + - "Kokoro - Test: Integration" + - "cla/google" + - "OwlBot Post Processor" +# 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 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..83ef7f9 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,87 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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: + - 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..de737e9 --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,29 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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: + 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..cc602c9 --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,18 @@ +:: See documentation in type-shell-output.bat +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Github action job to test core java library features on +# downstream client libraries before they are released. + +"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 0000000..b791dae --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,129 @@ +#!/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=$? + ;; +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-certificate-manager +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..8dfb35e --- /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-certificate-manager/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-certificate-manager/.kokoro/build.sh" +} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 0000000..ace89f4 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,58 @@ +#!/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) $*"; } \ No newline at end of file diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 0000000..d3eb3c8 --- /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-certificate-manager/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-certificate-manager/.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..d3eb3c8 --- /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-certificate-manager/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-certificate-manager/.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..e51c7b4 --- /dev/null +++ b/.kokoro/nightly/integration.cfg @@ -0,0 +1,37 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "ENABLE_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..5220f72 --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-certificate-manager/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 0000000..c725b04 --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-certificate-manager/.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..3752492 --- /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-certificate-manager/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-certificate-manager/.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..e6f867f --- /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-certificate-manager/.kokoro/dependencies.sh" +} 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..5220f72 --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-certificate-manager/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 0000000..c725b04 --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-certificate-manager/.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..df4cb79 --- /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-certificate-manager/.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..6d8ff9b --- /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-certificate-manager + +# 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-certificate-manager \ + --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..9a1691b --- /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-certificate-manager/.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-certificate-manager/.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..28ed276 --- /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-certificate-manager/.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..d9becd2 --- /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-certificate-manager/.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..15f70c5 --- /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-certificate-manager/.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..a170557 --- /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-certificate-manager/.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..9be9da8 --- /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-certificate-manager +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..36e13cf --- /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-certificate-manager/.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..4dd644b --- /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-certificate-manager +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..54a51cd --- /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-certificate-manager/.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..11238c0 --- /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-certificate-manager/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-certificate-manager/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-certificate-manager" + } +} + +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..77dc4e8 --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,45 @@ +#!/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 \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} + +if [[ -n "${AUTORELEASE_PR}" ]] +then + mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml +fi \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh new file mode 100644 index 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..58cab1e --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "certificate-manager", + "name_pretty": "Certificate Manager", + "product_documentation": "https://cloud.google.com/certificate-manager/docs", + "api_description": "lets you acquire and manage TLS (SSL) certificates for use with Cloud Load Balancing.", + "client_documentation": "https://googleapis.dev/java/google-cloud-certificate-manager/latest/index.html", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-certificate-manager", + "repo_short": "java-certificate-manager", + "distribution_name": "com.google.cloud:google-cloud-certificate-manager", + "api_id": "certificate-manager.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..0566b12 --- /dev/null +++ b/README.md @@ -0,0 +1,201 @@ +# Google Certificate Manager Client for Java + +Java idiomatic client for [Certificate Manager][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-certificate-manager + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies + +```Groovy +implementation 'com.google.cloud:google-cloud-certificate-manager:0.0.0' +``` + +If you are using SBT, add this to your dependencies + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-certificate-manager" % "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 Certificate Manager APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Certificate Manager API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Certificate Manager [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Certificate Manager. +[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-certificate-manager` library. See the [Quickstart](#quickstart) section +to add `google-cloud-certificate-manager` as a dependency in your code. + +## About Certificate Manager + + +[Certificate Manager][product-docs] lets you acquire and manage TLS (SSL) certificates for use with Cloud Load Balancing. + +See the [Certificate Manager client library docs][javadocs] to learn how to +use this Certificate Manager Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Certificate Manager 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/certificate-manager/docs +[javadocs]: https://googleapis.dev/java/google-cloud-certificate-manager/latest/index.html +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-certificate-manager/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-certificate-manager/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-certificate-manager/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-certificate-manager/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-certificate-manager/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-certificate-manager/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-certificate-manager/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-certificate-manager/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-certificate-manager/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-certificate-manager/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-certificate-manager.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-certificate-manager&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-certificate-manager/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-certificate-manager/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-certificate-manager/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=certificate-manager.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-certificate-manager-bom/pom.xml b/google-cloud-certificate-manager-bom/pom.xml new file mode 100644 index 0000000..e9e75ac --- /dev/null +++ b/google-cloud-certificate-manager-bom/pom.xml @@ -0,0 +1,94 @@ + + + 4.0.0 + com.google.cloud + google-cloud-certificate-manager-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 1.2.1 + + + Google Certificate Manager BOM + https://github.com/googleapis/java-certificate-manager + + BOM for Certificate Manager + + + + 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-certificate-manager.git + scm:git:git@github.com:googleapis/java-certificate-manager.git + https://github.com/googleapis/java-certificate-manager + + + + true + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + com.google.cloud + google-cloud-certificate-manager + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-certificate-manager-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-certificate-manager-v1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + diff --git a/google-cloud-certificate-manager/pom.xml b/google-cloud-certificate-manager/pom.xml new file mode 100644 index 0000000..29ae86d --- /dev/null +++ b/google-cloud-certificate-manager/pom.xml @@ -0,0 +1,111 @@ + + + 4.0.0 + com.google.cloud + google-cloud-certificate-manager + 0.0.1-SNAPSHOT + jar + Google Certificate Manager + https://github.com/googleapis/java-certificate-manager + Certificate Manager lets you acquire and manage TLS (SSL) certificates for use with Cloud Load Balancing. + + com.google.cloud + google-cloud-certificate-manager-parent + 0.0.1-SNAPSHOT + + + google-cloud-certificate-manager + + + + 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-certificate-manager-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + org.threeten + threetenbp + + + + + junit + junit + test + 4.13.2 + + + + com.google.api.grpc + grpc-google-cloud-certificate-manager-v1 + test + + + + com.google.api + gax-grpc + testlib + test + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerClient.java b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerClient.java new file mode 100644 index 0000000..5b1f02e --- /dev/null +++ b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerClient.java @@ -0,0 +1,3115 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.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.certificatemanager.v1.stub.CertificateManagerStub; +import com.google.cloud.certificatemanager.v1.stub.CertificateManagerStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: API Overview + * + *

Certificates Manager API allows customers to see and manage all their TLS certificates. + * + *

Certificates Manager API service provides methods to manage certificates, group them into + * collections, and create serving configuration that can be easily applied to other Cloud resources + * e.g. Target Proxies. + * + *

Data Model + * + *

The Certificates Manager service exposes the following resources: + * + *

    + *
  • `Certificate` which describes a single TLS certificate. + *
  • `CertificateMap` which describes a collection of certificates that can be attached to a + * target resource. + *
  • `CertificateMapEntry` which describes a single configuration entry that consists of a SNI + * and a group of certificates. It's a subresource of CertificateMap. + *
+ * + *

Certificate, CertificateMap and CertificateMapEntry IDs have to match "^[a-z0-9-]{1,63}$" + * regexp, which means that - only lower case letters, digits, and hyphen are allowed - length of + * the resource ID has to be in [1,63] range. + * + *

Provides methods to manage Cloud Certificate Manager entities. + * + *

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

{@code
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]");
+ *   Certificate response = certificateManagerClient.getCertificate(name);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * CertificateManagerSettings certificateManagerSettings =
+ *     CertificateManagerSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CertificateManagerClient certificateManagerClient =
+ *     CertificateManagerClient.create(certificateManagerSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * CertificateManagerSettings certificateManagerSettings =
+ *     CertificateManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CertificateManagerClient certificateManagerClient =
+ *     CertificateManagerClient.create(certificateManagerSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class CertificateManagerClient implements BackgroundResource { + private final CertificateManagerSettings settings; + private final CertificateManagerStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of CertificateManagerClient with default settings. */ + public static final CertificateManagerClient create() throws IOException { + return create(CertificateManagerSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CertificateManagerClient, 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 CertificateManagerClient create(CertificateManagerSettings settings) + throws IOException { + return new CertificateManagerClient(settings); + } + + /** + * Constructs an instance of CertificateManagerClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(CertificateManagerSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final CertificateManagerClient create(CertificateManagerStub stub) { + return new CertificateManagerClient(stub); + } + + /** + * Constructs an instance of CertificateManagerClient, 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 CertificateManagerClient(CertificateManagerSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CertificateManagerStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected CertificateManagerClient(CertificateManagerStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final CertificateManagerSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CertificateManagerStub 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 Certificates in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Certificate element : certificateManagerClient.listCertificates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location from which the certificate should be listed, + * specified in the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificatesPagedResponse listCertificates(LocationName parent) { + ListCertificatesRequest request = + ListCertificatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCertificates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Certificates in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Certificate element : certificateManagerClient.listCertificates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location from which the certificate should be listed, + * specified in the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificatesPagedResponse listCertificates(String parent) { + ListCertificatesRequest request = + ListCertificatesRequest.newBuilder().setParent(parent).build(); + return listCertificates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Certificates in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListCertificatesRequest request =
+   *       ListCertificatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Certificate element : certificateManagerClient.listCertificates(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificatesPagedResponse listCertificates(ListCertificatesRequest request) { + return listCertificatesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Certificates in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListCertificatesRequest request =
+   *       ListCertificatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.listCertificatesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Certificate element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCertificatesPagedCallable() { + return stub.listCertificatesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Certificates in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListCertificatesRequest request =
+   *       ListCertificatesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListCertificatesResponse response =
+   *         certificateManagerClient.listCertificatesCallable().call(request);
+   *     for (Certificate element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCertificatesCallable() { + return stub.listCertificatesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]");
+   *   Certificate response = certificateManagerClient.getCertificate(name);
+   * }
+   * }
+ * + * @param name Required. A name of the certificate to describe. Must be in the format + * `projects/*/locations/*/certificates/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Certificate getCertificate(CertificateName name) { + GetCertificateRequest request = + GetCertificateRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCertificate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString();
+   *   Certificate response = certificateManagerClient.getCertificate(name);
+   * }
+   * }
+ * + * @param name Required. A name of the certificate to describe. Must be in the format + * `projects/*/locations/*/certificates/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Certificate getCertificate(String name) { + GetCertificateRequest request = GetCertificateRequest.newBuilder().setName(name).build(); + return getCertificate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   GetCertificateRequest request =
+   *       GetCertificateRequest.newBuilder()
+   *           .setName(CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString())
+   *           .build();
+   *   Certificate response = certificateManagerClient.getCertificate(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Certificate getCertificate(GetCertificateRequest request) { + return getCertificateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   GetCertificateRequest request =
+   *       GetCertificateRequest.newBuilder()
+   *           .setName(CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.getCertificateCallable().futureCall(request);
+   *   // Do something.
+   *   Certificate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getCertificateCallable() { + return stub.getCertificateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Certificate in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Certificate certificate = Certificate.newBuilder().build();
+   *   String certificateId = "certificateId-644529902";
+   *   Certificate response =
+   *       certificateManagerClient.createCertificateAsync(parent, certificate, certificateId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the certificate. Must be in the format + * `projects/*/locations/*`. + * @param certificate Required. A definition of the certificate to create. + * @param certificateId Required. A user-provided name of the certificate. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createCertificateAsync( + LocationName parent, Certificate certificate, String certificateId) { + CreateCertificateRequest request = + CreateCertificateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCertificate(certificate) + .setCertificateId(certificateId) + .build(); + return createCertificateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Certificate in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Certificate certificate = Certificate.newBuilder().build();
+   *   String certificateId = "certificateId-644529902";
+   *   Certificate response =
+   *       certificateManagerClient.createCertificateAsync(parent, certificate, certificateId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the certificate. Must be in the format + * `projects/*/locations/*`. + * @param certificate Required. A definition of the certificate to create. + * @param certificateId Required. A user-provided name of the certificate. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createCertificateAsync( + String parent, Certificate certificate, String certificateId) { + CreateCertificateRequest request = + CreateCertificateRequest.newBuilder() + .setParent(parent) + .setCertificate(certificate) + .setCertificateId(certificateId) + .build(); + return createCertificateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Certificate in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateCertificateRequest request =
+   *       CreateCertificateRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setCertificateId("certificateId-644529902")
+   *           .setCertificate(Certificate.newBuilder().build())
+   *           .build();
+   *   Certificate response = certificateManagerClient.createCertificateAsync(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 createCertificateAsync( + CreateCertificateRequest request) { + return createCertificateOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Certificate in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateCertificateRequest request =
+   *       CreateCertificateRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setCertificateId("certificateId-644529902")
+   *           .setCertificate(Certificate.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.createCertificateOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Certificate response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createCertificateOperationCallable() { + return stub.createCertificateOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Certificate in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateCertificateRequest request =
+   *       CreateCertificateRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setCertificateId("certificateId-644529902")
+   *           .setCertificate(Certificate.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.createCertificateCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createCertificateCallable() { + return stub.createCertificateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   Certificate certificate = Certificate.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Certificate response =
+   *       certificateManagerClient.updateCertificateAsync(certificate, updateMask).get();
+   * }
+   * }
+ * + * @param certificate Required. A definition of the certificate to update. + * @param updateMask Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateCertificateAsync( + Certificate certificate, FieldMask updateMask) { + UpdateCertificateRequest request = + UpdateCertificateRequest.newBuilder() + .setCertificate(certificate) + .setUpdateMask(updateMask) + .build(); + return updateCertificateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateCertificateRequest request =
+   *       UpdateCertificateRequest.newBuilder()
+   *           .setCertificate(Certificate.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Certificate response = certificateManagerClient.updateCertificateAsync(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 updateCertificateAsync( + UpdateCertificateRequest request) { + return updateCertificateOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateCertificateRequest request =
+   *       UpdateCertificateRequest.newBuilder()
+   *           .setCertificate(Certificate.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.updateCertificateOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Certificate response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateCertificateOperationCallable() { + return stub.updateCertificateOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateCertificateRequest request =
+   *       UpdateCertificateRequest.newBuilder()
+   *           .setCertificate(Certificate.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.updateCertificateCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateCertificateCallable() { + return stub.updateCertificateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]");
+   *   certificateManagerClient.deleteCertificateAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the certificate to delete. Must be in the format + * `projects/*/locations/*/certificates/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCertificateAsync( + CertificateName name) { + DeleteCertificateRequest request = + DeleteCertificateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteCertificateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString();
+   *   certificateManagerClient.deleteCertificateAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the certificate to delete. Must be in the format + * `projects/*/locations/*/certificates/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCertificateAsync(String name) { + DeleteCertificateRequest request = DeleteCertificateRequest.newBuilder().setName(name).build(); + return deleteCertificateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteCertificateRequest request =
+   *       DeleteCertificateRequest.newBuilder()
+   *           .setName(CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString())
+   *           .build();
+   *   certificateManagerClient.deleteCertificateAsync(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 deleteCertificateAsync( + DeleteCertificateRequest request) { + return deleteCertificateOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteCertificateRequest request =
+   *       DeleteCertificateRequest.newBuilder()
+   *           .setName(CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.deleteCertificateOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteCertificateOperationCallable() { + return stub.deleteCertificateOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Certificate. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteCertificateRequest request =
+   *       DeleteCertificateRequest.newBuilder()
+   *           .setName(CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.deleteCertificateCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteCertificateCallable() { + return stub.deleteCertificateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CertificateMaps in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (CertificateMap element :
+   *       certificateManagerClient.listCertificateMaps(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location from which the certificate maps should be + * listed, specified in the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificateMapsPagedResponse listCertificateMaps(LocationName parent) { + ListCertificateMapsRequest request = + ListCertificateMapsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCertificateMaps(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CertificateMaps in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (CertificateMap element :
+   *       certificateManagerClient.listCertificateMaps(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location from which the certificate maps should be + * listed, specified in the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificateMapsPagedResponse listCertificateMaps(String parent) { + ListCertificateMapsRequest request = + ListCertificateMapsRequest.newBuilder().setParent(parent).build(); + return listCertificateMaps(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CertificateMaps in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListCertificateMapsRequest request =
+   *       ListCertificateMapsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (CertificateMap element :
+   *       certificateManagerClient.listCertificateMaps(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 ListCertificateMapsPagedResponse listCertificateMaps( + ListCertificateMapsRequest request) { + return listCertificateMapsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CertificateMaps in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListCertificateMapsRequest request =
+   *       ListCertificateMapsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.listCertificateMapsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (CertificateMap element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCertificateMapsPagedCallable() { + return stub.listCertificateMapsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CertificateMaps in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListCertificateMapsRequest request =
+   *       ListCertificateMapsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListCertificateMapsResponse response =
+   *         certificateManagerClient.listCertificateMapsCallable().call(request);
+   *     for (CertificateMap element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCertificateMapsCallable() { + return stub.listCertificateMapsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CertificateMap. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CertificateMapName name =
+   *       CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]");
+   *   CertificateMap response = certificateManagerClient.getCertificateMap(name);
+   * }
+   * }
+ * + * @param name Required. A name of the certificate map to describe. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateMap getCertificateMap(CertificateMapName name) { + GetCertificateMapRequest request = + GetCertificateMapRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getCertificateMap(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CertificateMap. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String name =
+   *       CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString();
+   *   CertificateMap response = certificateManagerClient.getCertificateMap(name);
+   * }
+   * }
+ * + * @param name Required. A name of the certificate map to describe. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateMap getCertificateMap(String name) { + GetCertificateMapRequest request = GetCertificateMapRequest.newBuilder().setName(name).build(); + return getCertificateMap(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CertificateMap. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   GetCertificateMapRequest request =
+   *       GetCertificateMapRequest.newBuilder()
+   *           .setName(
+   *               CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString())
+   *           .build();
+   *   CertificateMap response = certificateManagerClient.getCertificateMap(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 CertificateMap getCertificateMap(GetCertificateMapRequest request) { + return getCertificateMapCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CertificateMap. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   GetCertificateMapRequest request =
+   *       GetCertificateMapRequest.newBuilder()
+   *           .setName(
+   *               CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.getCertificateMapCallable().futureCall(request);
+   *   // Do something.
+   *   CertificateMap response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getCertificateMapCallable() { + return stub.getCertificateMapCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CertificateMap in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   CertificateMap certificateMap = CertificateMap.newBuilder().build();
+   *   String certificateMapId = "certificateMapId1612184640";
+   *   CertificateMap response =
+   *       certificateManagerClient
+   *           .createCertificateMapAsync(parent, certificateMap, certificateMapId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the certificate map. Must be in the format + * `projects/*/locations/*`. + * @param certificateMap Required. A definition of the certificate map to create. + * @param certificateMapId Required. A user-provided name of the certificate map. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createCertificateMapAsync( + LocationName parent, CertificateMap certificateMap, String certificateMapId) { + CreateCertificateMapRequest request = + CreateCertificateMapRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCertificateMap(certificateMap) + .setCertificateMapId(certificateMapId) + .build(); + return createCertificateMapAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CertificateMap in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   CertificateMap certificateMap = CertificateMap.newBuilder().build();
+   *   String certificateMapId = "certificateMapId1612184640";
+   *   CertificateMap response =
+   *       certificateManagerClient
+   *           .createCertificateMapAsync(parent, certificateMap, certificateMapId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the certificate map. Must be in the format + * `projects/*/locations/*`. + * @param certificateMap Required. A definition of the certificate map to create. + * @param certificateMapId Required. A user-provided name of the certificate map. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createCertificateMapAsync( + String parent, CertificateMap certificateMap, String certificateMapId) { + CreateCertificateMapRequest request = + CreateCertificateMapRequest.newBuilder() + .setParent(parent) + .setCertificateMap(certificateMap) + .setCertificateMapId(certificateMapId) + .build(); + return createCertificateMapAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CertificateMap in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateCertificateMapRequest request =
+   *       CreateCertificateMapRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setCertificateMapId("certificateMapId1612184640")
+   *           .setCertificateMap(CertificateMap.newBuilder().build())
+   *           .build();
+   *   CertificateMap response = certificateManagerClient.createCertificateMapAsync(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 createCertificateMapAsync( + CreateCertificateMapRequest request) { + return createCertificateMapOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CertificateMap in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateCertificateMapRequest request =
+   *       CreateCertificateMapRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setCertificateMapId("certificateMapId1612184640")
+   *           .setCertificateMap(CertificateMap.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.createCertificateMapOperationCallable().futureCall(request);
+   *   // Do something.
+   *   CertificateMap response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createCertificateMapOperationCallable() { + return stub.createCertificateMapOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CertificateMap in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateCertificateMapRequest request =
+   *       CreateCertificateMapRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setCertificateMapId("certificateMapId1612184640")
+   *           .setCertificateMap(CertificateMap.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.createCertificateMapCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createCertificateMapCallable() { + return stub.createCertificateMapCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CertificateMap. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CertificateMap certificateMap = CertificateMap.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   CertificateMap response =
+   *       certificateManagerClient.updateCertificateMapAsync(certificateMap, updateMask).get();
+   * }
+   * }
+ * + * @param certificateMap Required. A definition of the certificate map to update. + * @param updateMask Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateCertificateMapAsync( + CertificateMap certificateMap, FieldMask updateMask) { + UpdateCertificateMapRequest request = + UpdateCertificateMapRequest.newBuilder() + .setCertificateMap(certificateMap) + .setUpdateMask(updateMask) + .build(); + return updateCertificateMapAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CertificateMap. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateCertificateMapRequest request =
+   *       UpdateCertificateMapRequest.newBuilder()
+   *           .setCertificateMap(CertificateMap.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   CertificateMap response = certificateManagerClient.updateCertificateMapAsync(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 updateCertificateMapAsync( + UpdateCertificateMapRequest request) { + return updateCertificateMapOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CertificateMap. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateCertificateMapRequest request =
+   *       UpdateCertificateMapRequest.newBuilder()
+   *           .setCertificateMap(CertificateMap.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.updateCertificateMapOperationCallable().futureCall(request);
+   *   // Do something.
+   *   CertificateMap response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateCertificateMapOperationCallable() { + return stub.updateCertificateMapOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CertificateMap. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateCertificateMapRequest request =
+   *       UpdateCertificateMapRequest.newBuilder()
+   *           .setCertificateMap(CertificateMap.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.updateCertificateMapCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateCertificateMapCallable() { + return stub.updateCertificateMapCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CertificateMap. A Certificate Map can't be deleted if it contains Certificate + * Map Entries. Remove all the entries from the map before calling this method. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CertificateMapName name =
+   *       CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]");
+   *   certificateManagerClient.deleteCertificateMapAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the certificate map to delete. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCertificateMapAsync( + CertificateMapName name) { + DeleteCertificateMapRequest request = + DeleteCertificateMapRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteCertificateMapAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CertificateMap. A Certificate Map can't be deleted if it contains Certificate + * Map Entries. Remove all the entries from the map before calling this method. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String name =
+   *       CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString();
+   *   certificateManagerClient.deleteCertificateMapAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the certificate map to delete. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCertificateMapAsync(String name) { + DeleteCertificateMapRequest request = + DeleteCertificateMapRequest.newBuilder().setName(name).build(); + return deleteCertificateMapAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CertificateMap. A Certificate Map can't be deleted if it contains Certificate + * Map Entries. Remove all the entries from the map before calling this method. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteCertificateMapRequest request =
+   *       DeleteCertificateMapRequest.newBuilder()
+   *           .setName(
+   *               CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString())
+   *           .build();
+   *   certificateManagerClient.deleteCertificateMapAsync(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 deleteCertificateMapAsync( + DeleteCertificateMapRequest request) { + return deleteCertificateMapOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CertificateMap. A Certificate Map can't be deleted if it contains Certificate + * Map Entries. Remove all the entries from the map before calling this method. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteCertificateMapRequest request =
+   *       DeleteCertificateMapRequest.newBuilder()
+   *           .setName(
+   *               CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.deleteCertificateMapOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteCertificateMapOperationCallable() { + return stub.deleteCertificateMapOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CertificateMap. A Certificate Map can't be deleted if it contains Certificate + * Map Entries. Remove all the entries from the map before calling this method. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteCertificateMapRequest request =
+   *       DeleteCertificateMapRequest.newBuilder()
+   *           .setName(
+   *               CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.deleteCertificateMapCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteCertificateMapCallable() { + return stub.deleteCertificateMapCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CertificateMapEntries in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CertificateMapName parent =
+   *       CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]");
+   *   for (CertificateMapEntry element :
+   *       certificateManagerClient.listCertificateMapEntries(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project, location and certificate map from which the certificate + * map entries should be listed, specified in the format + * `projects/*/locations/*/certificateMaps/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificateMapEntriesPagedResponse listCertificateMapEntries( + CertificateMapName parent) { + ListCertificateMapEntriesRequest request = + ListCertificateMapEntriesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCertificateMapEntries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CertificateMapEntries in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String parent =
+   *       CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString();
+   *   for (CertificateMapEntry element :
+   *       certificateManagerClient.listCertificateMapEntries(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project, location and certificate map from which the certificate + * map entries should be listed, specified in the format + * `projects/*/locations/*/certificateMaps/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCertificateMapEntriesPagedResponse listCertificateMapEntries(String parent) { + ListCertificateMapEntriesRequest request = + ListCertificateMapEntriesRequest.newBuilder().setParent(parent).build(); + return listCertificateMapEntries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CertificateMapEntries in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListCertificateMapEntriesRequest request =
+   *       ListCertificateMapEntriesRequest.newBuilder()
+   *           .setParent(
+   *               CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (CertificateMapEntry element :
+   *       certificateManagerClient.listCertificateMapEntries(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 ListCertificateMapEntriesPagedResponse listCertificateMapEntries( + ListCertificateMapEntriesRequest request) { + return listCertificateMapEntriesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CertificateMapEntries in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListCertificateMapEntriesRequest request =
+   *       ListCertificateMapEntriesRequest.newBuilder()
+   *           .setParent(
+   *               CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.listCertificateMapEntriesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (CertificateMapEntry element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListCertificateMapEntriesRequest, ListCertificateMapEntriesPagedResponse> + listCertificateMapEntriesPagedCallable() { + return stub.listCertificateMapEntriesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CertificateMapEntries in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListCertificateMapEntriesRequest request =
+   *       ListCertificateMapEntriesRequest.newBuilder()
+   *           .setParent(
+   *               CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListCertificateMapEntriesResponse response =
+   *         certificateManagerClient.listCertificateMapEntriesCallable().call(request);
+   *     for (CertificateMapEntry element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCertificateMapEntriesCallable() { + return stub.listCertificateMapEntriesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CertificateMapEntryName name =
+   *       CertificateMapEntryName.of(
+   *           "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]");
+   *   CertificateMapEntry response = certificateManagerClient.getCertificateMapEntry(name);
+   * }
+   * }
+ * + * @param name Required. A name of the certificate map entry to describe. Must be in the format + * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateMapEntry getCertificateMapEntry(CertificateMapEntryName name) { + GetCertificateMapEntryRequest request = + GetCertificateMapEntryRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getCertificateMapEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String name =
+   *       CertificateMapEntryName.of(
+   *               "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]")
+   *           .toString();
+   *   CertificateMapEntry response = certificateManagerClient.getCertificateMapEntry(name);
+   * }
+   * }
+ * + * @param name Required. A name of the certificate map entry to describe. Must be in the format + * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CertificateMapEntry getCertificateMapEntry(String name) { + GetCertificateMapEntryRequest request = + GetCertificateMapEntryRequest.newBuilder().setName(name).build(); + return getCertificateMapEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   GetCertificateMapEntryRequest request =
+   *       GetCertificateMapEntryRequest.newBuilder()
+   *           .setName(
+   *               CertificateMapEntryName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]")
+   *                   .toString())
+   *           .build();
+   *   CertificateMapEntry response = certificateManagerClient.getCertificateMapEntry(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 CertificateMapEntry getCertificateMapEntry(GetCertificateMapEntryRequest request) { + return getCertificateMapEntryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   GetCertificateMapEntryRequest request =
+   *       GetCertificateMapEntryRequest.newBuilder()
+   *           .setName(
+   *               CertificateMapEntryName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.getCertificateMapEntryCallable().futureCall(request);
+   *   // Do something.
+   *   CertificateMapEntry response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getCertificateMapEntryCallable() { + return stub.getCertificateMapEntryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CertificateMapEntry in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CertificateMapName parent =
+   *       CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]");
+   *   CertificateMapEntry certificateMapEntry = CertificateMapEntry.newBuilder().build();
+   *   String certificateMapEntryId = "certificateMapEntryId-859079384";
+   *   CertificateMapEntry response =
+   *       certificateManagerClient
+   *           .createCertificateMapEntryAsync(parent, certificateMapEntry, certificateMapEntryId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the certificate map entry. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * @param certificateMapEntry Required. A definition of the certificate map entry to create. + * @param certificateMapEntryId Required. A user-provided name of the certificate map entry. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createCertificateMapEntryAsync( + CertificateMapName parent, + CertificateMapEntry certificateMapEntry, + String certificateMapEntryId) { + CreateCertificateMapEntryRequest request = + CreateCertificateMapEntryRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCertificateMapEntry(certificateMapEntry) + .setCertificateMapEntryId(certificateMapEntryId) + .build(); + return createCertificateMapEntryAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CertificateMapEntry in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String parent =
+   *       CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString();
+   *   CertificateMapEntry certificateMapEntry = CertificateMapEntry.newBuilder().build();
+   *   String certificateMapEntryId = "certificateMapEntryId-859079384";
+   *   CertificateMapEntry response =
+   *       certificateManagerClient
+   *           .createCertificateMapEntryAsync(parent, certificateMapEntry, certificateMapEntryId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the certificate map entry. Must be in the format + * `projects/*/locations/*/certificateMaps/*`. + * @param certificateMapEntry Required. A definition of the certificate map entry to create. + * @param certificateMapEntryId Required. A user-provided name of the certificate map entry. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createCertificateMapEntryAsync( + String parent, CertificateMapEntry certificateMapEntry, String certificateMapEntryId) { + CreateCertificateMapEntryRequest request = + CreateCertificateMapEntryRequest.newBuilder() + .setParent(parent) + .setCertificateMapEntry(certificateMapEntry) + .setCertificateMapEntryId(certificateMapEntryId) + .build(); + return createCertificateMapEntryAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CertificateMapEntry in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateCertificateMapEntryRequest request =
+   *       CreateCertificateMapEntryRequest.newBuilder()
+   *           .setParent(
+   *               CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString())
+   *           .setCertificateMapEntryId("certificateMapEntryId-859079384")
+   *           .setCertificateMapEntry(CertificateMapEntry.newBuilder().build())
+   *           .build();
+   *   CertificateMapEntry response =
+   *       certificateManagerClient.createCertificateMapEntryAsync(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 + createCertificateMapEntryAsync(CreateCertificateMapEntryRequest request) { + return createCertificateMapEntryOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CertificateMapEntry in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateCertificateMapEntryRequest request =
+   *       CreateCertificateMapEntryRequest.newBuilder()
+   *           .setParent(
+   *               CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString())
+   *           .setCertificateMapEntryId("certificateMapEntryId-859079384")
+   *           .setCertificateMapEntry(CertificateMapEntry.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.createCertificateMapEntryOperationCallable().futureCall(request);
+   *   // Do something.
+   *   CertificateMapEntry response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + createCertificateMapEntryOperationCallable() { + return stub.createCertificateMapEntryOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CertificateMapEntry in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateCertificateMapEntryRequest request =
+   *       CreateCertificateMapEntryRequest.newBuilder()
+   *           .setParent(
+   *               CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString())
+   *           .setCertificateMapEntryId("certificateMapEntryId-859079384")
+   *           .setCertificateMapEntry(CertificateMapEntry.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.createCertificateMapEntryCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createCertificateMapEntryCallable() { + return stub.createCertificateMapEntryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CertificateMapEntry certificateMapEntry = CertificateMapEntry.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   CertificateMapEntry response =
+   *       certificateManagerClient
+   *           .updateCertificateMapEntryAsync(certificateMapEntry, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param certificateMapEntry Required. A definition of the certificate map entry to create map + * entry. + * @param updateMask Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateCertificateMapEntryAsync( + CertificateMapEntry certificateMapEntry, FieldMask updateMask) { + UpdateCertificateMapEntryRequest request = + UpdateCertificateMapEntryRequest.newBuilder() + .setCertificateMapEntry(certificateMapEntry) + .setUpdateMask(updateMask) + .build(); + return updateCertificateMapEntryAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateCertificateMapEntryRequest request =
+   *       UpdateCertificateMapEntryRequest.newBuilder()
+   *           .setCertificateMapEntry(CertificateMapEntry.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   CertificateMapEntry response =
+   *       certificateManagerClient.updateCertificateMapEntryAsync(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 + updateCertificateMapEntryAsync(UpdateCertificateMapEntryRequest request) { + return updateCertificateMapEntryOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateCertificateMapEntryRequest request =
+   *       UpdateCertificateMapEntryRequest.newBuilder()
+   *           .setCertificateMapEntry(CertificateMapEntry.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.updateCertificateMapEntryOperationCallable().futureCall(request);
+   *   // Do something.
+   *   CertificateMapEntry response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + updateCertificateMapEntryOperationCallable() { + return stub.updateCertificateMapEntryOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateCertificateMapEntryRequest request =
+   *       UpdateCertificateMapEntryRequest.newBuilder()
+   *           .setCertificateMapEntry(CertificateMapEntry.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.updateCertificateMapEntryCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateCertificateMapEntryCallable() { + return stub.updateCertificateMapEntryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CertificateMapEntryName name =
+   *       CertificateMapEntryName.of(
+   *           "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]");
+   *   certificateManagerClient.deleteCertificateMapEntryAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the certificate map entry to delete. Must be in the format + * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCertificateMapEntryAsync( + CertificateMapEntryName name) { + DeleteCertificateMapEntryRequest request = + DeleteCertificateMapEntryRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteCertificateMapEntryAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String name =
+   *       CertificateMapEntryName.of(
+   *               "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]")
+   *           .toString();
+   *   certificateManagerClient.deleteCertificateMapEntryAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the certificate map entry to delete. Must be in the format + * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCertificateMapEntryAsync( + String name) { + DeleteCertificateMapEntryRequest request = + DeleteCertificateMapEntryRequest.newBuilder().setName(name).build(); + return deleteCertificateMapEntryAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteCertificateMapEntryRequest request =
+   *       DeleteCertificateMapEntryRequest.newBuilder()
+   *           .setName(
+   *               CertificateMapEntryName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]")
+   *                   .toString())
+   *           .build();
+   *   certificateManagerClient.deleteCertificateMapEntryAsync(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 deleteCertificateMapEntryAsync( + DeleteCertificateMapEntryRequest request) { + return deleteCertificateMapEntryOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteCertificateMapEntryRequest request =
+   *       DeleteCertificateMapEntryRequest.newBuilder()
+   *           .setName(
+   *               CertificateMapEntryName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.deleteCertificateMapEntryOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteCertificateMapEntryOperationCallable() { + return stub.deleteCertificateMapEntryOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CertificateMapEntry. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteCertificateMapEntryRequest request =
+   *       DeleteCertificateMapEntryRequest.newBuilder()
+   *           .setName(
+   *               CertificateMapEntryName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.deleteCertificateMapEntryCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteCertificateMapEntryCallable() { + return stub.deleteCertificateMapEntryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DnsAuthorizations in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (DnsAuthorization element :
+   *       certificateManagerClient.listDnsAuthorizations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location from which the dns authorizations should be + * listed, specified in the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDnsAuthorizationsPagedResponse listDnsAuthorizations(LocationName parent) { + ListDnsAuthorizationsRequest request = + ListDnsAuthorizationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDnsAuthorizations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DnsAuthorizations in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (DnsAuthorization element :
+   *       certificateManagerClient.listDnsAuthorizations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location from which the dns authorizations should be + * listed, specified in the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDnsAuthorizationsPagedResponse listDnsAuthorizations(String parent) { + ListDnsAuthorizationsRequest request = + ListDnsAuthorizationsRequest.newBuilder().setParent(parent).build(); + return listDnsAuthorizations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DnsAuthorizations in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListDnsAuthorizationsRequest request =
+   *       ListDnsAuthorizationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (DnsAuthorization element :
+   *       certificateManagerClient.listDnsAuthorizations(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 ListDnsAuthorizationsPagedResponse listDnsAuthorizations( + ListDnsAuthorizationsRequest request) { + return listDnsAuthorizationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DnsAuthorizations in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListDnsAuthorizationsRequest request =
+   *       ListDnsAuthorizationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.listDnsAuthorizationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DnsAuthorization element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDnsAuthorizationsPagedCallable() { + return stub.listDnsAuthorizationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DnsAuthorizations in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   ListDnsAuthorizationsRequest request =
+   *       ListDnsAuthorizationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListDnsAuthorizationsResponse response =
+   *         certificateManagerClient.listDnsAuthorizationsCallable().call(request);
+   *     for (DnsAuthorization element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDnsAuthorizationsCallable() { + return stub.listDnsAuthorizationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DnsAuthorizationName name =
+   *       DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]");
+   *   DnsAuthorization response = certificateManagerClient.getDnsAuthorization(name);
+   * }
+   * }
+ * + * @param name Required. A name of the dns authorization to describe. Must be in the format + * `projects/*/locations/*/dnsAuthorizations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DnsAuthorization getDnsAuthorization(DnsAuthorizationName name) { + GetDnsAuthorizationRequest request = + GetDnsAuthorizationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDnsAuthorization(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String name =
+   *       DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]").toString();
+   *   DnsAuthorization response = certificateManagerClient.getDnsAuthorization(name);
+   * }
+   * }
+ * + * @param name Required. A name of the dns authorization to describe. Must be in the format + * `projects/*/locations/*/dnsAuthorizations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DnsAuthorization getDnsAuthorization(String name) { + GetDnsAuthorizationRequest request = + GetDnsAuthorizationRequest.newBuilder().setName(name).build(); + return getDnsAuthorization(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   GetDnsAuthorizationRequest request =
+   *       GetDnsAuthorizationRequest.newBuilder()
+   *           .setName(
+   *               DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]")
+   *                   .toString())
+   *           .build();
+   *   DnsAuthorization response = certificateManagerClient.getDnsAuthorization(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 DnsAuthorization getDnsAuthorization(GetDnsAuthorizationRequest request) { + return getDnsAuthorizationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   GetDnsAuthorizationRequest request =
+   *       GetDnsAuthorizationRequest.newBuilder()
+   *           .setName(
+   *               DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.getDnsAuthorizationCallable().futureCall(request);
+   *   // Do something.
+   *   DnsAuthorization response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getDnsAuthorizationCallable() { + return stub.getDnsAuthorizationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DnsAuthorization in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   DnsAuthorization dnsAuthorization = DnsAuthorization.newBuilder().build();
+   *   String dnsAuthorizationId = "dnsAuthorizationId-2054763765";
+   *   DnsAuthorization response =
+   *       certificateManagerClient
+   *           .createDnsAuthorizationAsync(parent, dnsAuthorization, dnsAuthorizationId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the dns authorization. Must be in the format + * `projects/*/locations/*`. + * @param dnsAuthorization Required. A definition of the dns authorization to create. + * @param dnsAuthorizationId Required. A user-provided name of the dns authorization. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDnsAuthorizationAsync( + LocationName parent, DnsAuthorization dnsAuthorization, String dnsAuthorizationId) { + CreateDnsAuthorizationRequest request = + CreateDnsAuthorizationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDnsAuthorization(dnsAuthorization) + .setDnsAuthorizationId(dnsAuthorizationId) + .build(); + return createDnsAuthorizationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DnsAuthorization in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   DnsAuthorization dnsAuthorization = DnsAuthorization.newBuilder().build();
+   *   String dnsAuthorizationId = "dnsAuthorizationId-2054763765";
+   *   DnsAuthorization response =
+   *       certificateManagerClient
+   *           .createDnsAuthorizationAsync(parent, dnsAuthorization, dnsAuthorizationId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the dns authorization. Must be in the format + * `projects/*/locations/*`. + * @param dnsAuthorization Required. A definition of the dns authorization to create. + * @param dnsAuthorizationId Required. A user-provided name of the dns authorization. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDnsAuthorizationAsync( + String parent, DnsAuthorization dnsAuthorization, String dnsAuthorizationId) { + CreateDnsAuthorizationRequest request = + CreateDnsAuthorizationRequest.newBuilder() + .setParent(parent) + .setDnsAuthorization(dnsAuthorization) + .setDnsAuthorizationId(dnsAuthorizationId) + .build(); + return createDnsAuthorizationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DnsAuthorization in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateDnsAuthorizationRequest request =
+   *       CreateDnsAuthorizationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDnsAuthorizationId("dnsAuthorizationId-2054763765")
+   *           .setDnsAuthorization(DnsAuthorization.newBuilder().build())
+   *           .build();
+   *   DnsAuthorization response =
+   *       certificateManagerClient.createDnsAuthorizationAsync(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 createDnsAuthorizationAsync( + CreateDnsAuthorizationRequest request) { + return createDnsAuthorizationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DnsAuthorization in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateDnsAuthorizationRequest request =
+   *       CreateDnsAuthorizationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDnsAuthorizationId("dnsAuthorizationId-2054763765")
+   *           .setDnsAuthorization(DnsAuthorization.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.createDnsAuthorizationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DnsAuthorization response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createDnsAuthorizationOperationCallable() { + return stub.createDnsAuthorizationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DnsAuthorization in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   CreateDnsAuthorizationRequest request =
+   *       CreateDnsAuthorizationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDnsAuthorizationId("dnsAuthorizationId-2054763765")
+   *           .setDnsAuthorization(DnsAuthorization.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.createDnsAuthorizationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createDnsAuthorizationCallable() { + return stub.createDnsAuthorizationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DnsAuthorization dnsAuthorization = DnsAuthorization.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DnsAuthorization response =
+   *       certificateManagerClient.updateDnsAuthorizationAsync(dnsAuthorization, updateMask).get();
+   * }
+   * }
+ * + * @param dnsAuthorization Required. A definition of the dns authorization to update. + * @param updateMask Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateDnsAuthorizationAsync( + DnsAuthorization dnsAuthorization, FieldMask updateMask) { + UpdateDnsAuthorizationRequest request = + UpdateDnsAuthorizationRequest.newBuilder() + .setDnsAuthorization(dnsAuthorization) + .setUpdateMask(updateMask) + .build(); + return updateDnsAuthorizationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateDnsAuthorizationRequest request =
+   *       UpdateDnsAuthorizationRequest.newBuilder()
+   *           .setDnsAuthorization(DnsAuthorization.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   DnsAuthorization response =
+   *       certificateManagerClient.updateDnsAuthorizationAsync(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 updateDnsAuthorizationAsync( + UpdateDnsAuthorizationRequest request) { + return updateDnsAuthorizationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateDnsAuthorizationRequest request =
+   *       UpdateDnsAuthorizationRequest.newBuilder()
+   *           .setDnsAuthorization(DnsAuthorization.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.updateDnsAuthorizationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DnsAuthorization response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateDnsAuthorizationOperationCallable() { + return stub.updateDnsAuthorizationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   UpdateDnsAuthorizationRequest request =
+   *       UpdateDnsAuthorizationRequest.newBuilder()
+   *           .setDnsAuthorization(DnsAuthorization.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.updateDnsAuthorizationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateDnsAuthorizationCallable() { + return stub.updateDnsAuthorizationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DnsAuthorizationName name =
+   *       DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]");
+   *   certificateManagerClient.deleteDnsAuthorizationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the dns authorization to delete. Must be in the format + * `projects/*/locations/*/dnsAuthorizations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDnsAuthorizationAsync( + DnsAuthorizationName name) { + DeleteDnsAuthorizationRequest request = + DeleteDnsAuthorizationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteDnsAuthorizationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   String name =
+   *       DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]").toString();
+   *   certificateManagerClient.deleteDnsAuthorizationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the dns authorization to delete. Must be in the format + * `projects/*/locations/*/dnsAuthorizations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDnsAuthorizationAsync(String name) { + DeleteDnsAuthorizationRequest request = + DeleteDnsAuthorizationRequest.newBuilder().setName(name).build(); + return deleteDnsAuthorizationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteDnsAuthorizationRequest request =
+   *       DeleteDnsAuthorizationRequest.newBuilder()
+   *           .setName(
+   *               DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]")
+   *                   .toString())
+   *           .build();
+   *   certificateManagerClient.deleteDnsAuthorizationAsync(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 deleteDnsAuthorizationAsync( + DeleteDnsAuthorizationRequest request) { + return deleteDnsAuthorizationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteDnsAuthorizationRequest request =
+   *       DeleteDnsAuthorizationRequest.newBuilder()
+   *           .setName(
+   *               DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       certificateManagerClient.deleteDnsAuthorizationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteDnsAuthorizationOperationCallable() { + return stub.deleteDnsAuthorizationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DnsAuthorization. + * + *

Sample code: + * + *

{@code
+   * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+   *   DeleteDnsAuthorizationRequest request =
+   *       DeleteDnsAuthorizationRequest.newBuilder()
+   *           .setName(
+   *               DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       certificateManagerClient.deleteDnsAuthorizationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteDnsAuthorizationCallable() { + return stub.deleteDnsAuthorizationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListCertificatesPagedResponse + extends AbstractPagedListResponse< + ListCertificatesRequest, + ListCertificatesResponse, + Certificate, + ListCertificatesPage, + ListCertificatesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCertificatesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListCertificatesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListCertificatesPagedResponse(ListCertificatesPage page) { + super(page, ListCertificatesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCertificatesPage + extends AbstractPage< + ListCertificatesRequest, ListCertificatesResponse, Certificate, ListCertificatesPage> { + + private ListCertificatesPage( + PageContext context, + ListCertificatesResponse response) { + super(context, response); + } + + private static ListCertificatesPage createEmptyPage() { + return new ListCertificatesPage(null, null); + } + + @Override + protected ListCertificatesPage createPage( + PageContext context, + ListCertificatesResponse response) { + return new ListCertificatesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCertificatesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCertificatesRequest, + ListCertificatesResponse, + Certificate, + ListCertificatesPage, + ListCertificatesFixedSizeCollection> { + + private ListCertificatesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCertificatesFixedSizeCollection createEmptyCollection() { + return new ListCertificatesFixedSizeCollection(null, 0); + } + + @Override + protected ListCertificatesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCertificatesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListCertificateMapsPagedResponse + extends AbstractPagedListResponse< + ListCertificateMapsRequest, + ListCertificateMapsResponse, + CertificateMap, + ListCertificateMapsPage, + ListCertificateMapsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCertificateMapsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListCertificateMapsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListCertificateMapsPagedResponse(ListCertificateMapsPage page) { + super(page, ListCertificateMapsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCertificateMapsPage + extends AbstractPage< + ListCertificateMapsRequest, + ListCertificateMapsResponse, + CertificateMap, + ListCertificateMapsPage> { + + private ListCertificateMapsPage( + PageContext + context, + ListCertificateMapsResponse response) { + super(context, response); + } + + private static ListCertificateMapsPage createEmptyPage() { + return new ListCertificateMapsPage(null, null); + } + + @Override + protected ListCertificateMapsPage createPage( + PageContext + context, + ListCertificateMapsResponse response) { + return new ListCertificateMapsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCertificateMapsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCertificateMapsRequest, + ListCertificateMapsResponse, + CertificateMap, + ListCertificateMapsPage, + ListCertificateMapsFixedSizeCollection> { + + private ListCertificateMapsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCertificateMapsFixedSizeCollection createEmptyCollection() { + return new ListCertificateMapsFixedSizeCollection(null, 0); + } + + @Override + protected ListCertificateMapsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCertificateMapsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListCertificateMapEntriesPagedResponse + extends AbstractPagedListResponse< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + CertificateMapEntry, + ListCertificateMapEntriesPage, + ListCertificateMapEntriesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + CertificateMapEntry> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCertificateMapEntriesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListCertificateMapEntriesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListCertificateMapEntriesPagedResponse(ListCertificateMapEntriesPage page) { + super(page, ListCertificateMapEntriesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCertificateMapEntriesPage + extends AbstractPage< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + CertificateMapEntry, + ListCertificateMapEntriesPage> { + + private ListCertificateMapEntriesPage( + PageContext< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + CertificateMapEntry> + context, + ListCertificateMapEntriesResponse response) { + super(context, response); + } + + private static ListCertificateMapEntriesPage createEmptyPage() { + return new ListCertificateMapEntriesPage(null, null); + } + + @Override + protected ListCertificateMapEntriesPage createPage( + PageContext< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + CertificateMapEntry> + context, + ListCertificateMapEntriesResponse response) { + return new ListCertificateMapEntriesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + CertificateMapEntry> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCertificateMapEntriesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + CertificateMapEntry, + ListCertificateMapEntriesPage, + ListCertificateMapEntriesFixedSizeCollection> { + + private ListCertificateMapEntriesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCertificateMapEntriesFixedSizeCollection createEmptyCollection() { + return new ListCertificateMapEntriesFixedSizeCollection(null, 0); + } + + @Override + protected ListCertificateMapEntriesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCertificateMapEntriesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDnsAuthorizationsPagedResponse + extends AbstractPagedListResponse< + ListDnsAuthorizationsRequest, + ListDnsAuthorizationsResponse, + DnsAuthorization, + ListDnsAuthorizationsPage, + ListDnsAuthorizationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDnsAuthorizationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDnsAuthorizationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDnsAuthorizationsPagedResponse(ListDnsAuthorizationsPage page) { + super(page, ListDnsAuthorizationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDnsAuthorizationsPage + extends AbstractPage< + ListDnsAuthorizationsRequest, + ListDnsAuthorizationsResponse, + DnsAuthorization, + ListDnsAuthorizationsPage> { + + private ListDnsAuthorizationsPage( + PageContext + context, + ListDnsAuthorizationsResponse response) { + super(context, response); + } + + private static ListDnsAuthorizationsPage createEmptyPage() { + return new ListDnsAuthorizationsPage(null, null); + } + + @Override + protected ListDnsAuthorizationsPage createPage( + PageContext + context, + ListDnsAuthorizationsResponse response) { + return new ListDnsAuthorizationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDnsAuthorizationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDnsAuthorizationsRequest, + ListDnsAuthorizationsResponse, + DnsAuthorization, + ListDnsAuthorizationsPage, + ListDnsAuthorizationsFixedSizeCollection> { + + private ListDnsAuthorizationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDnsAuthorizationsFixedSizeCollection createEmptyCollection() { + return new ListDnsAuthorizationsFixedSizeCollection(null, 0); + } + + @Override + protected ListDnsAuthorizationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDnsAuthorizationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerSettings.java b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerSettings.java new file mode 100644 index 0000000..d4a1d55 --- /dev/null +++ b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerSettings.java @@ -0,0 +1,595 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.v1; + +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapEntriesPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapsPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse; + +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.certificatemanager.v1.stub.CertificateManagerStubSettings; +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 CertificateManagerClient}. + * + *

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

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

{@code
+ * CertificateManagerSettings.Builder certificateManagerSettingsBuilder =
+ *     CertificateManagerSettings.newBuilder();
+ * certificateManagerSettingsBuilder
+ *     .getCertificateSettings()
+ *     .setRetrySettings(
+ *         certificateManagerSettingsBuilder
+ *             .getCertificateSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CertificateManagerSettings certificateManagerSettings =
+ *     certificateManagerSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class CertificateManagerSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listCertificates. */ + public PagedCallSettings< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).listCertificatesSettings(); + } + + /** Returns the object with the settings used for calls to getCertificate. */ + public UnaryCallSettings getCertificateSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).getCertificateSettings(); + } + + /** Returns the object with the settings used for calls to createCertificate. */ + public UnaryCallSettings createCertificateSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).createCertificateSettings(); + } + + /** Returns the object with the settings used for calls to createCertificate. */ + public OperationCallSettings + createCertificateOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .createCertificateOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateCertificate. */ + public UnaryCallSettings updateCertificateSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).updateCertificateSettings(); + } + + /** Returns the object with the settings used for calls to updateCertificate. */ + public OperationCallSettings + updateCertificateOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .updateCertificateOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteCertificate. */ + public UnaryCallSettings deleteCertificateSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).deleteCertificateSettings(); + } + + /** Returns the object with the settings used for calls to deleteCertificate. */ + public OperationCallSettings + deleteCertificateOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .deleteCertificateOperationSettings(); + } + + /** Returns the object with the settings used for calls to listCertificateMaps. */ + public PagedCallSettings< + ListCertificateMapsRequest, ListCertificateMapsResponse, ListCertificateMapsPagedResponse> + listCertificateMapsSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).listCertificateMapsSettings(); + } + + /** Returns the object with the settings used for calls to getCertificateMap. */ + public UnaryCallSettings getCertificateMapSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).getCertificateMapSettings(); + } + + /** Returns the object with the settings used for calls to createCertificateMap. */ + public UnaryCallSettings createCertificateMapSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).createCertificateMapSettings(); + } + + /** Returns the object with the settings used for calls to createCertificateMap. */ + public OperationCallSettings + createCertificateMapOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .createCertificateMapOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateCertificateMap. */ + public UnaryCallSettings updateCertificateMapSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).updateCertificateMapSettings(); + } + + /** Returns the object with the settings used for calls to updateCertificateMap. */ + public OperationCallSettings + updateCertificateMapOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .updateCertificateMapOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteCertificateMap. */ + public UnaryCallSettings deleteCertificateMapSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).deleteCertificateMapSettings(); + } + + /** Returns the object with the settings used for calls to deleteCertificateMap. */ + public OperationCallSettings + deleteCertificateMapOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .deleteCertificateMapOperationSettings(); + } + + /** Returns the object with the settings used for calls to listCertificateMapEntries. */ + public PagedCallSettings< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + ListCertificateMapEntriesPagedResponse> + listCertificateMapEntriesSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).listCertificateMapEntriesSettings(); + } + + /** Returns the object with the settings used for calls to getCertificateMapEntry. */ + public UnaryCallSettings + getCertificateMapEntrySettings() { + return ((CertificateManagerStubSettings) getStubSettings()).getCertificateMapEntrySettings(); + } + + /** Returns the object with the settings used for calls to createCertificateMapEntry. */ + public UnaryCallSettings + createCertificateMapEntrySettings() { + return ((CertificateManagerStubSettings) getStubSettings()).createCertificateMapEntrySettings(); + } + + /** Returns the object with the settings used for calls to createCertificateMapEntry. */ + public OperationCallSettings< + CreateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + createCertificateMapEntryOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .createCertificateMapEntryOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateCertificateMapEntry. */ + public UnaryCallSettings + updateCertificateMapEntrySettings() { + return ((CertificateManagerStubSettings) getStubSettings()).updateCertificateMapEntrySettings(); + } + + /** Returns the object with the settings used for calls to updateCertificateMapEntry. */ + public OperationCallSettings< + UpdateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + updateCertificateMapEntryOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .updateCertificateMapEntryOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteCertificateMapEntry. */ + public UnaryCallSettings + deleteCertificateMapEntrySettings() { + return ((CertificateManagerStubSettings) getStubSettings()).deleteCertificateMapEntrySettings(); + } + + /** Returns the object with the settings used for calls to deleteCertificateMapEntry. */ + public OperationCallSettings + deleteCertificateMapEntryOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .deleteCertificateMapEntryOperationSettings(); + } + + /** Returns the object with the settings used for calls to listDnsAuthorizations. */ + public PagedCallSettings< + ListDnsAuthorizationsRequest, + ListDnsAuthorizationsResponse, + ListDnsAuthorizationsPagedResponse> + listDnsAuthorizationsSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).listDnsAuthorizationsSettings(); + } + + /** Returns the object with the settings used for calls to getDnsAuthorization. */ + public UnaryCallSettings + getDnsAuthorizationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).getDnsAuthorizationSettings(); + } + + /** Returns the object with the settings used for calls to createDnsAuthorization. */ + public UnaryCallSettings + createDnsAuthorizationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).createDnsAuthorizationSettings(); + } + + /** Returns the object with the settings used for calls to createDnsAuthorization. */ + public OperationCallSettings + createDnsAuthorizationOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .createDnsAuthorizationOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateDnsAuthorization. */ + public UnaryCallSettings + updateDnsAuthorizationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).updateDnsAuthorizationSettings(); + } + + /** Returns the object with the settings used for calls to updateDnsAuthorization. */ + public OperationCallSettings + updateDnsAuthorizationOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .updateDnsAuthorizationOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDnsAuthorization. */ + public UnaryCallSettings + deleteDnsAuthorizationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()).deleteDnsAuthorizationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDnsAuthorization. */ + public OperationCallSettings + deleteDnsAuthorizationOperationSettings() { + return ((CertificateManagerStubSettings) getStubSettings()) + .deleteDnsAuthorizationOperationSettings(); + } + + public static final CertificateManagerSettings create(CertificateManagerStubSettings stub) + throws IOException { + return new CertificateManagerSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CertificateManagerStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CertificateManagerStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CertificateManagerStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CertificateManagerStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CertificateManagerStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CertificateManagerStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CertificateManagerStubSettings.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 CertificateManagerSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CertificateManagerSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(CertificateManagerStubSettings.newBuilder(clientContext)); + } + + protected Builder(CertificateManagerSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CertificateManagerStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(CertificateManagerStubSettings.newBuilder()); + } + + public CertificateManagerStubSettings.Builder getStubSettingsBuilder() { + return ((CertificateManagerStubSettings.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 listCertificates. */ + public PagedCallSettings.Builder< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings() { + return getStubSettingsBuilder().listCertificatesSettings(); + } + + /** Returns the builder for the settings used for calls to getCertificate. */ + public UnaryCallSettings.Builder getCertificateSettings() { + return getStubSettingsBuilder().getCertificateSettings(); + } + + /** Returns the builder for the settings used for calls to createCertificate. */ + public UnaryCallSettings.Builder + createCertificateSettings() { + return getStubSettingsBuilder().createCertificateSettings(); + } + + /** Returns the builder for the settings used for calls to createCertificate. */ + public OperationCallSettings.Builder + createCertificateOperationSettings() { + return getStubSettingsBuilder().createCertificateOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateCertificate. */ + public UnaryCallSettings.Builder + updateCertificateSettings() { + return getStubSettingsBuilder().updateCertificateSettings(); + } + + /** Returns the builder for the settings used for calls to updateCertificate. */ + public OperationCallSettings.Builder + updateCertificateOperationSettings() { + return getStubSettingsBuilder().updateCertificateOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCertificate. */ + public UnaryCallSettings.Builder + deleteCertificateSettings() { + return getStubSettingsBuilder().deleteCertificateSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCertificate. */ + public OperationCallSettings.Builder + deleteCertificateOperationSettings() { + return getStubSettingsBuilder().deleteCertificateOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listCertificateMaps. */ + public PagedCallSettings.Builder< + ListCertificateMapsRequest, + ListCertificateMapsResponse, + ListCertificateMapsPagedResponse> + listCertificateMapsSettings() { + return getStubSettingsBuilder().listCertificateMapsSettings(); + } + + /** Returns the builder for the settings used for calls to getCertificateMap. */ + public UnaryCallSettings.Builder + getCertificateMapSettings() { + return getStubSettingsBuilder().getCertificateMapSettings(); + } + + /** Returns the builder for the settings used for calls to createCertificateMap. */ + public UnaryCallSettings.Builder + createCertificateMapSettings() { + return getStubSettingsBuilder().createCertificateMapSettings(); + } + + /** Returns the builder for the settings used for calls to createCertificateMap. */ + public OperationCallSettings.Builder< + CreateCertificateMapRequest, CertificateMap, OperationMetadata> + createCertificateMapOperationSettings() { + return getStubSettingsBuilder().createCertificateMapOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateCertificateMap. */ + public UnaryCallSettings.Builder + updateCertificateMapSettings() { + return getStubSettingsBuilder().updateCertificateMapSettings(); + } + + /** Returns the builder for the settings used for calls to updateCertificateMap. */ + public OperationCallSettings.Builder< + UpdateCertificateMapRequest, CertificateMap, OperationMetadata> + updateCertificateMapOperationSettings() { + return getStubSettingsBuilder().updateCertificateMapOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCertificateMap. */ + public UnaryCallSettings.Builder + deleteCertificateMapSettings() { + return getStubSettingsBuilder().deleteCertificateMapSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCertificateMap. */ + public OperationCallSettings.Builder + deleteCertificateMapOperationSettings() { + return getStubSettingsBuilder().deleteCertificateMapOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listCertificateMapEntries. */ + public PagedCallSettings.Builder< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + ListCertificateMapEntriesPagedResponse> + listCertificateMapEntriesSettings() { + return getStubSettingsBuilder().listCertificateMapEntriesSettings(); + } + + /** Returns the builder for the settings used for calls to getCertificateMapEntry. */ + public UnaryCallSettings.Builder + getCertificateMapEntrySettings() { + return getStubSettingsBuilder().getCertificateMapEntrySettings(); + } + + /** Returns the builder for the settings used for calls to createCertificateMapEntry. */ + public UnaryCallSettings.Builder + createCertificateMapEntrySettings() { + return getStubSettingsBuilder().createCertificateMapEntrySettings(); + } + + /** Returns the builder for the settings used for calls to createCertificateMapEntry. */ + public OperationCallSettings.Builder< + CreateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + createCertificateMapEntryOperationSettings() { + return getStubSettingsBuilder().createCertificateMapEntryOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateCertificateMapEntry. */ + public UnaryCallSettings.Builder + updateCertificateMapEntrySettings() { + return getStubSettingsBuilder().updateCertificateMapEntrySettings(); + } + + /** Returns the builder for the settings used for calls to updateCertificateMapEntry. */ + public OperationCallSettings.Builder< + UpdateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + updateCertificateMapEntryOperationSettings() { + return getStubSettingsBuilder().updateCertificateMapEntryOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCertificateMapEntry. */ + public UnaryCallSettings.Builder + deleteCertificateMapEntrySettings() { + return getStubSettingsBuilder().deleteCertificateMapEntrySettings(); + } + + /** Returns the builder for the settings used for calls to deleteCertificateMapEntry. */ + public OperationCallSettings.Builder + deleteCertificateMapEntryOperationSettings() { + return getStubSettingsBuilder().deleteCertificateMapEntryOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listDnsAuthorizations. */ + public PagedCallSettings.Builder< + ListDnsAuthorizationsRequest, + ListDnsAuthorizationsResponse, + ListDnsAuthorizationsPagedResponse> + listDnsAuthorizationsSettings() { + return getStubSettingsBuilder().listDnsAuthorizationsSettings(); + } + + /** Returns the builder for the settings used for calls to getDnsAuthorization. */ + public UnaryCallSettings.Builder + getDnsAuthorizationSettings() { + return getStubSettingsBuilder().getDnsAuthorizationSettings(); + } + + /** Returns the builder for the settings used for calls to createDnsAuthorization. */ + public UnaryCallSettings.Builder + createDnsAuthorizationSettings() { + return getStubSettingsBuilder().createDnsAuthorizationSettings(); + } + + /** Returns the builder for the settings used for calls to createDnsAuthorization. */ + public OperationCallSettings.Builder< + CreateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> + createDnsAuthorizationOperationSettings() { + return getStubSettingsBuilder().createDnsAuthorizationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDnsAuthorization. */ + public UnaryCallSettings.Builder + updateDnsAuthorizationSettings() { + return getStubSettingsBuilder().updateDnsAuthorizationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDnsAuthorization. */ + public OperationCallSettings.Builder< + UpdateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> + updateDnsAuthorizationOperationSettings() { + return getStubSettingsBuilder().updateDnsAuthorizationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDnsAuthorization. */ + public UnaryCallSettings.Builder + deleteDnsAuthorizationSettings() { + return getStubSettingsBuilder().deleteDnsAuthorizationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDnsAuthorization. */ + public OperationCallSettings.Builder + deleteDnsAuthorizationOperationSettings() { + return getStubSettingsBuilder().deleteDnsAuthorizationOperationSettings(); + } + + @Override + public CertificateManagerSettings build() throws IOException { + return new CertificateManagerSettings(this); + } + } +} diff --git a/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/gapic_metadata.json b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/gapic_metadata.json new file mode 100644 index 0000000..d20ad25 --- /dev/null +++ b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/gapic_metadata.json @@ -0,0 +1,78 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.certificatemanager.v1", + "libraryPackage": "com.google.cloud.certificatemanager.v1", + "services": { + "CertificateManager": { + "clients": { + "grpc": { + "libraryClient": "CertificateManagerClient", + "rpcs": { + "CreateCertificate": { + "methods": ["createCertificateAsync", "createCertificateAsync", "createCertificateAsync", "createCertificateOperationCallable", "createCertificateCallable"] + }, + "CreateCertificateMap": { + "methods": ["createCertificateMapAsync", "createCertificateMapAsync", "createCertificateMapAsync", "createCertificateMapOperationCallable", "createCertificateMapCallable"] + }, + "CreateCertificateMapEntry": { + "methods": ["createCertificateMapEntryAsync", "createCertificateMapEntryAsync", "createCertificateMapEntryAsync", "createCertificateMapEntryOperationCallable", "createCertificateMapEntryCallable"] + }, + "CreateDnsAuthorization": { + "methods": ["createDnsAuthorizationAsync", "createDnsAuthorizationAsync", "createDnsAuthorizationAsync", "createDnsAuthorizationOperationCallable", "createDnsAuthorizationCallable"] + }, + "DeleteCertificate": { + "methods": ["deleteCertificateAsync", "deleteCertificateAsync", "deleteCertificateAsync", "deleteCertificateOperationCallable", "deleteCertificateCallable"] + }, + "DeleteCertificateMap": { + "methods": ["deleteCertificateMapAsync", "deleteCertificateMapAsync", "deleteCertificateMapAsync", "deleteCertificateMapOperationCallable", "deleteCertificateMapCallable"] + }, + "DeleteCertificateMapEntry": { + "methods": ["deleteCertificateMapEntryAsync", "deleteCertificateMapEntryAsync", "deleteCertificateMapEntryAsync", "deleteCertificateMapEntryOperationCallable", "deleteCertificateMapEntryCallable"] + }, + "DeleteDnsAuthorization": { + "methods": ["deleteDnsAuthorizationAsync", "deleteDnsAuthorizationAsync", "deleteDnsAuthorizationAsync", "deleteDnsAuthorizationOperationCallable", "deleteDnsAuthorizationCallable"] + }, + "GetCertificate": { + "methods": ["getCertificate", "getCertificate", "getCertificate", "getCertificateCallable"] + }, + "GetCertificateMap": { + "methods": ["getCertificateMap", "getCertificateMap", "getCertificateMap", "getCertificateMapCallable"] + }, + "GetCertificateMapEntry": { + "methods": ["getCertificateMapEntry", "getCertificateMapEntry", "getCertificateMapEntry", "getCertificateMapEntryCallable"] + }, + "GetDnsAuthorization": { + "methods": ["getDnsAuthorization", "getDnsAuthorization", "getDnsAuthorization", "getDnsAuthorizationCallable"] + }, + "ListCertificateMapEntries": { + "methods": ["listCertificateMapEntries", "listCertificateMapEntries", "listCertificateMapEntries", "listCertificateMapEntriesPagedCallable", "listCertificateMapEntriesCallable"] + }, + "ListCertificateMaps": { + "methods": ["listCertificateMaps", "listCertificateMaps", "listCertificateMaps", "listCertificateMapsPagedCallable", "listCertificateMapsCallable"] + }, + "ListCertificates": { + "methods": ["listCertificates", "listCertificates", "listCertificates", "listCertificatesPagedCallable", "listCertificatesCallable"] + }, + "ListDnsAuthorizations": { + "methods": ["listDnsAuthorizations", "listDnsAuthorizations", "listDnsAuthorizations", "listDnsAuthorizationsPagedCallable", "listDnsAuthorizationsCallable"] + }, + "UpdateCertificate": { + "methods": ["updateCertificateAsync", "updateCertificateAsync", "updateCertificateOperationCallable", "updateCertificateCallable"] + }, + "UpdateCertificateMap": { + "methods": ["updateCertificateMapAsync", "updateCertificateMapAsync", "updateCertificateMapOperationCallable", "updateCertificateMapCallable"] + }, + "UpdateCertificateMapEntry": { + "methods": ["updateCertificateMapEntryAsync", "updateCertificateMapEntryAsync", "updateCertificateMapEntryOperationCallable", "updateCertificateMapEntryCallable"] + }, + "UpdateDnsAuthorization": { + "methods": ["updateDnsAuthorizationAsync", "updateDnsAuthorizationAsync", "updateDnsAuthorizationOperationCallable", "updateDnsAuthorizationCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/package-info.java b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/package-info.java new file mode 100644 index 0000000..1734b24 --- /dev/null +++ b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/package-info.java @@ -0,0 +1,62 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Certificate Manager API + * + *

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

======================= CertificateManagerClient ======================= + * + *

Service Description: API Overview + * + *

Certificates Manager API allows customers to see and manage all their TLS certificates. + * + *

Certificates Manager API service provides methods to manage certificates, group them into + * collections, and create serving configuration that can be easily applied to other Cloud resources + * e.g. Target Proxies. + * + *

Data Model + * + *

The Certificates Manager service exposes the following resources: + * + *

    + *
  • `Certificate` which describes a single TLS certificate. + *
  • `CertificateMap` which describes a collection of certificates that can be attached to a + * target resource. + *
  • `CertificateMapEntry` which describes a single configuration entry that consists of a SNI + * and a group of certificates. It's a subresource of CertificateMap. + *
+ * + *

Certificate, CertificateMap and CertificateMapEntry IDs have to match "^[a-z0-9-]{1,63}$" + * regexp, which means that - only lower case letters, digits, and hyphen are allowed - length of + * the resource ID has to be in [1,63] range. + * + *

Provides methods to manage Cloud Certificate Manager entities. + * + *

Sample for CertificateManagerClient: + * + *

{@code
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ *   CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]");
+ *   Certificate response = certificateManagerClient.getCertificate(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.certificatemanager.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStub.java b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStub.java new file mode 100644 index 0000000..026a4e6 --- /dev/null +++ b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStub.java @@ -0,0 +1,258 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.v1.stub; + +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapEntriesPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapsPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse; + +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.certificatemanager.v1.Certificate; +import com.google.cloud.certificatemanager.v1.CertificateMap; +import com.google.cloud.certificatemanager.v1.CertificateMapEntry; +import com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.CreateCertificateRequest; +import com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest; +import com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.DeleteCertificateRequest; +import com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest; +import com.google.cloud.certificatemanager.v1.DnsAuthorization; +import com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.GetCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.GetCertificateRequest; +import com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest; +import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest; +import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse; +import com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest; +import com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse; +import com.google.cloud.certificatemanager.v1.ListCertificatesRequest; +import com.google.cloud.certificatemanager.v1.ListCertificatesResponse; +import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest; +import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse; +import com.google.cloud.certificatemanager.v1.OperationMetadata; +import com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.UpdateCertificateRequest; +import com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest; +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 CertificateManager service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class CertificateManagerStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listCertificatesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCertificatesPagedCallable()"); + } + + public UnaryCallable + listCertificatesCallable() { + throw new UnsupportedOperationException("Not implemented: listCertificatesCallable()"); + } + + public UnaryCallable getCertificateCallable() { + throw new UnsupportedOperationException("Not implemented: getCertificateCallable()"); + } + + public OperationCallable + createCertificateOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createCertificateOperationCallable()"); + } + + public UnaryCallable createCertificateCallable() { + throw new UnsupportedOperationException("Not implemented: createCertificateCallable()"); + } + + public OperationCallable + updateCertificateOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateCertificateOperationCallable()"); + } + + public UnaryCallable updateCertificateCallable() { + throw new UnsupportedOperationException("Not implemented: updateCertificateCallable()"); + } + + public OperationCallable + deleteCertificateOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteCertificateOperationCallable()"); + } + + public UnaryCallable deleteCertificateCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCertificateCallable()"); + } + + public UnaryCallable + listCertificateMapsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCertificateMapsPagedCallable()"); + } + + public UnaryCallable + listCertificateMapsCallable() { + throw new UnsupportedOperationException("Not implemented: listCertificateMapsCallable()"); + } + + public UnaryCallable getCertificateMapCallable() { + throw new UnsupportedOperationException("Not implemented: getCertificateMapCallable()"); + } + + public OperationCallable + createCertificateMapOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createCertificateMapOperationCallable()"); + } + + public UnaryCallable createCertificateMapCallable() { + throw new UnsupportedOperationException("Not implemented: createCertificateMapCallable()"); + } + + public OperationCallable + updateCertificateMapOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateCertificateMapOperationCallable()"); + } + + public UnaryCallable updateCertificateMapCallable() { + throw new UnsupportedOperationException("Not implemented: updateCertificateMapCallable()"); + } + + public OperationCallable + deleteCertificateMapOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteCertificateMapOperationCallable()"); + } + + public UnaryCallable deleteCertificateMapCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCertificateMapCallable()"); + } + + public UnaryCallable + listCertificateMapEntriesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listCertificateMapEntriesPagedCallable()"); + } + + public UnaryCallable + listCertificateMapEntriesCallable() { + throw new UnsupportedOperationException("Not implemented: listCertificateMapEntriesCallable()"); + } + + public UnaryCallable + getCertificateMapEntryCallable() { + throw new UnsupportedOperationException("Not implemented: getCertificateMapEntryCallable()"); + } + + public OperationCallable + createCertificateMapEntryOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createCertificateMapEntryOperationCallable()"); + } + + public UnaryCallable + createCertificateMapEntryCallable() { + throw new UnsupportedOperationException("Not implemented: createCertificateMapEntryCallable()"); + } + + public OperationCallable + updateCertificateMapEntryOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateCertificateMapEntryOperationCallable()"); + } + + public UnaryCallable + updateCertificateMapEntryCallable() { + throw new UnsupportedOperationException("Not implemented: updateCertificateMapEntryCallable()"); + } + + public OperationCallable + deleteCertificateMapEntryOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteCertificateMapEntryOperationCallable()"); + } + + public UnaryCallable + deleteCertificateMapEntryCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCertificateMapEntryCallable()"); + } + + public UnaryCallable + listDnsAuthorizationsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listDnsAuthorizationsPagedCallable()"); + } + + public UnaryCallable + listDnsAuthorizationsCallable() { + throw new UnsupportedOperationException("Not implemented: listDnsAuthorizationsCallable()"); + } + + public UnaryCallable getDnsAuthorizationCallable() { + throw new UnsupportedOperationException("Not implemented: getDnsAuthorizationCallable()"); + } + + public OperationCallable + createDnsAuthorizationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createDnsAuthorizationOperationCallable()"); + } + + public UnaryCallable createDnsAuthorizationCallable() { + throw new UnsupportedOperationException("Not implemented: createDnsAuthorizationCallable()"); + } + + public OperationCallable + updateDnsAuthorizationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateDnsAuthorizationOperationCallable()"); + } + + public UnaryCallable updateDnsAuthorizationCallable() { + throw new UnsupportedOperationException("Not implemented: updateDnsAuthorizationCallable()"); + } + + public OperationCallable + deleteDnsAuthorizationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteDnsAuthorizationOperationCallable()"); + } + + public UnaryCallable deleteDnsAuthorizationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDnsAuthorizationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStubSettings.java b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStubSettings.java new file mode 100644 index 0000000..282ac57 --- /dev/null +++ b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStubSettings.java @@ -0,0 +1,1697 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.v1.stub; + +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapEntriesPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapsPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse; + +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.certificatemanager.v1.Certificate; +import com.google.cloud.certificatemanager.v1.CertificateMap; +import com.google.cloud.certificatemanager.v1.CertificateMapEntry; +import com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.CreateCertificateRequest; +import com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest; +import com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.DeleteCertificateRequest; +import com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest; +import com.google.cloud.certificatemanager.v1.DnsAuthorization; +import com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.GetCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.GetCertificateRequest; +import com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest; +import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest; +import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse; +import com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest; +import com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse; +import com.google.cloud.certificatemanager.v1.ListCertificatesRequest; +import com.google.cloud.certificatemanager.v1.ListCertificatesResponse; +import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest; +import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse; +import com.google.cloud.certificatemanager.v1.OperationMetadata; +import com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.UpdateCertificateRequest; +import com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CertificateManagerStub}. + * + *

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

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

{@code
+ * CertificateManagerStubSettings.Builder certificateManagerSettingsBuilder =
+ *     CertificateManagerStubSettings.newBuilder();
+ * certificateManagerSettingsBuilder
+ *     .getCertificateSettings()
+ *     .setRetrySettings(
+ *         certificateManagerSettingsBuilder
+ *             .getCertificateSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CertificateManagerStubSettings certificateManagerSettings =
+ *     certificateManagerSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class CertificateManagerStubSettings 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< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings; + private final UnaryCallSettings getCertificateSettings; + private final UnaryCallSettings createCertificateSettings; + private final OperationCallSettings + createCertificateOperationSettings; + private final UnaryCallSettings updateCertificateSettings; + private final OperationCallSettings + updateCertificateOperationSettings; + private final UnaryCallSettings deleteCertificateSettings; + private final OperationCallSettings + deleteCertificateOperationSettings; + private final PagedCallSettings< + ListCertificateMapsRequest, ListCertificateMapsResponse, ListCertificateMapsPagedResponse> + listCertificateMapsSettings; + private final UnaryCallSettings + getCertificateMapSettings; + private final UnaryCallSettings + createCertificateMapSettings; + private final OperationCallSettings< + CreateCertificateMapRequest, CertificateMap, OperationMetadata> + createCertificateMapOperationSettings; + private final UnaryCallSettings + updateCertificateMapSettings; + private final OperationCallSettings< + UpdateCertificateMapRequest, CertificateMap, OperationMetadata> + updateCertificateMapOperationSettings; + private final UnaryCallSettings + deleteCertificateMapSettings; + private final OperationCallSettings + deleteCertificateMapOperationSettings; + private final PagedCallSettings< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + ListCertificateMapEntriesPagedResponse> + listCertificateMapEntriesSettings; + private final UnaryCallSettings + getCertificateMapEntrySettings; + private final UnaryCallSettings + createCertificateMapEntrySettings; + private final OperationCallSettings< + CreateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + createCertificateMapEntryOperationSettings; + private final UnaryCallSettings + updateCertificateMapEntrySettings; + private final OperationCallSettings< + UpdateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + updateCertificateMapEntryOperationSettings; + private final UnaryCallSettings + deleteCertificateMapEntrySettings; + private final OperationCallSettings + deleteCertificateMapEntryOperationSettings; + private final PagedCallSettings< + ListDnsAuthorizationsRequest, + ListDnsAuthorizationsResponse, + ListDnsAuthorizationsPagedResponse> + listDnsAuthorizationsSettings; + private final UnaryCallSettings + getDnsAuthorizationSettings; + private final UnaryCallSettings + createDnsAuthorizationSettings; + private final OperationCallSettings< + CreateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> + createDnsAuthorizationOperationSettings; + private final UnaryCallSettings + updateDnsAuthorizationSettings; + private final OperationCallSettings< + UpdateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> + updateDnsAuthorizationOperationSettings; + private final UnaryCallSettings + deleteDnsAuthorizationSettings; + private final OperationCallSettings + deleteDnsAuthorizationOperationSettings; + + private static final PagedListDescriptor< + ListCertificatesRequest, ListCertificatesResponse, Certificate> + LIST_CERTIFICATES_PAGE_STR_DESC = + new PagedListDescriptor< + ListCertificatesRequest, ListCertificatesResponse, Certificate>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCertificatesRequest injectToken( + ListCertificatesRequest payload, String token) { + return ListCertificatesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCertificatesRequest injectPageSize( + ListCertificatesRequest payload, int pageSize) { + return ListCertificatesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCertificatesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCertificatesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCertificatesResponse payload) { + return payload.getCertificatesList() == null + ? ImmutableList.of() + : payload.getCertificatesList(); + } + }; + + private static final PagedListDescriptor< + ListCertificateMapsRequest, ListCertificateMapsResponse, CertificateMap> + LIST_CERTIFICATE_MAPS_PAGE_STR_DESC = + new PagedListDescriptor< + ListCertificateMapsRequest, ListCertificateMapsResponse, CertificateMap>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCertificateMapsRequest injectToken( + ListCertificateMapsRequest payload, String token) { + return ListCertificateMapsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCertificateMapsRequest injectPageSize( + ListCertificateMapsRequest payload, int pageSize) { + return ListCertificateMapsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCertificateMapsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCertificateMapsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCertificateMapsResponse payload) { + return payload.getCertificateMapsList() == null + ? ImmutableList.of() + : payload.getCertificateMapsList(); + } + }; + + private static final PagedListDescriptor< + ListCertificateMapEntriesRequest, ListCertificateMapEntriesResponse, CertificateMapEntry> + LIST_CERTIFICATE_MAP_ENTRIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + CertificateMapEntry>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCertificateMapEntriesRequest injectToken( + ListCertificateMapEntriesRequest payload, String token) { + return ListCertificateMapEntriesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListCertificateMapEntriesRequest injectPageSize( + ListCertificateMapEntriesRequest payload, int pageSize) { + return ListCertificateMapEntriesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListCertificateMapEntriesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCertificateMapEntriesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListCertificateMapEntriesResponse payload) { + return payload.getCertificateMapEntriesList() == null + ? ImmutableList.of() + : payload.getCertificateMapEntriesList(); + } + }; + + private static final PagedListDescriptor< + ListDnsAuthorizationsRequest, ListDnsAuthorizationsResponse, DnsAuthorization> + LIST_DNS_AUTHORIZATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListDnsAuthorizationsRequest, ListDnsAuthorizationsResponse, DnsAuthorization>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDnsAuthorizationsRequest injectToken( + ListDnsAuthorizationsRequest payload, String token) { + return ListDnsAuthorizationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDnsAuthorizationsRequest injectPageSize( + ListDnsAuthorizationsRequest payload, int pageSize) { + return ListDnsAuthorizationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDnsAuthorizationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDnsAuthorizationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListDnsAuthorizationsResponse payload) { + return payload.getDnsAuthorizationsList() == null + ? ImmutableList.of() + : payload.getDnsAuthorizationsList(); + } + }; + + private static final PagedListResponseFactory< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + LIST_CERTIFICATES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCertificatesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_CERTIFICATES_PAGE_STR_DESC, request, context); + return ListCertificatesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListCertificateMapsRequest, ListCertificateMapsResponse, ListCertificateMapsPagedResponse> + LIST_CERTIFICATE_MAPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCertificateMapsRequest, + ListCertificateMapsResponse, + ListCertificateMapsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCertificateMapsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_CERTIFICATE_MAPS_PAGE_STR_DESC, request, context); + return ListCertificateMapsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + ListCertificateMapEntriesPagedResponse> + LIST_CERTIFICATE_MAP_ENTRIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + ListCertificateMapEntriesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListCertificateMapEntriesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + CertificateMapEntry> + pageContext = + PageContext.create( + callable, LIST_CERTIFICATE_MAP_ENTRIES_PAGE_STR_DESC, request, context); + return ListCertificateMapEntriesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDnsAuthorizationsRequest, + ListDnsAuthorizationsResponse, + ListDnsAuthorizationsPagedResponse> + LIST_DNS_AUTHORIZATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDnsAuthorizationsRequest, + ListDnsAuthorizationsResponse, + ListDnsAuthorizationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDnsAuthorizationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListDnsAuthorizationsRequest, ListDnsAuthorizationsResponse, DnsAuthorization> + pageContext = + PageContext.create( + callable, LIST_DNS_AUTHORIZATIONS_PAGE_STR_DESC, request, context); + return ListDnsAuthorizationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listCertificates. */ + public PagedCallSettings< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings() { + return listCertificatesSettings; + } + + /** Returns the object with the settings used for calls to getCertificate. */ + public UnaryCallSettings getCertificateSettings() { + return getCertificateSettings; + } + + /** Returns the object with the settings used for calls to createCertificate. */ + public UnaryCallSettings createCertificateSettings() { + return createCertificateSettings; + } + + /** Returns the object with the settings used for calls to createCertificate. */ + public OperationCallSettings + createCertificateOperationSettings() { + return createCertificateOperationSettings; + } + + /** Returns the object with the settings used for calls to updateCertificate. */ + public UnaryCallSettings updateCertificateSettings() { + return updateCertificateSettings; + } + + /** Returns the object with the settings used for calls to updateCertificate. */ + public OperationCallSettings + updateCertificateOperationSettings() { + return updateCertificateOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteCertificate. */ + public UnaryCallSettings deleteCertificateSettings() { + return deleteCertificateSettings; + } + + /** Returns the object with the settings used for calls to deleteCertificate. */ + public OperationCallSettings + deleteCertificateOperationSettings() { + return deleteCertificateOperationSettings; + } + + /** Returns the object with the settings used for calls to listCertificateMaps. */ + public PagedCallSettings< + ListCertificateMapsRequest, ListCertificateMapsResponse, ListCertificateMapsPagedResponse> + listCertificateMapsSettings() { + return listCertificateMapsSettings; + } + + /** Returns the object with the settings used for calls to getCertificateMap. */ + public UnaryCallSettings getCertificateMapSettings() { + return getCertificateMapSettings; + } + + /** Returns the object with the settings used for calls to createCertificateMap. */ + public UnaryCallSettings createCertificateMapSettings() { + return createCertificateMapSettings; + } + + /** Returns the object with the settings used for calls to createCertificateMap. */ + public OperationCallSettings + createCertificateMapOperationSettings() { + return createCertificateMapOperationSettings; + } + + /** Returns the object with the settings used for calls to updateCertificateMap. */ + public UnaryCallSettings updateCertificateMapSettings() { + return updateCertificateMapSettings; + } + + /** Returns the object with the settings used for calls to updateCertificateMap. */ + public OperationCallSettings + updateCertificateMapOperationSettings() { + return updateCertificateMapOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteCertificateMap. */ + public UnaryCallSettings deleteCertificateMapSettings() { + return deleteCertificateMapSettings; + } + + /** Returns the object with the settings used for calls to deleteCertificateMap. */ + public OperationCallSettings + deleteCertificateMapOperationSettings() { + return deleteCertificateMapOperationSettings; + } + + /** Returns the object with the settings used for calls to listCertificateMapEntries. */ + public PagedCallSettings< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + ListCertificateMapEntriesPagedResponse> + listCertificateMapEntriesSettings() { + return listCertificateMapEntriesSettings; + } + + /** Returns the object with the settings used for calls to getCertificateMapEntry. */ + public UnaryCallSettings + getCertificateMapEntrySettings() { + return getCertificateMapEntrySettings; + } + + /** Returns the object with the settings used for calls to createCertificateMapEntry. */ + public UnaryCallSettings + createCertificateMapEntrySettings() { + return createCertificateMapEntrySettings; + } + + /** Returns the object with the settings used for calls to createCertificateMapEntry. */ + public OperationCallSettings< + CreateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + createCertificateMapEntryOperationSettings() { + return createCertificateMapEntryOperationSettings; + } + + /** Returns the object with the settings used for calls to updateCertificateMapEntry. */ + public UnaryCallSettings + updateCertificateMapEntrySettings() { + return updateCertificateMapEntrySettings; + } + + /** Returns the object with the settings used for calls to updateCertificateMapEntry. */ + public OperationCallSettings< + UpdateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + updateCertificateMapEntryOperationSettings() { + return updateCertificateMapEntryOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteCertificateMapEntry. */ + public UnaryCallSettings + deleteCertificateMapEntrySettings() { + return deleteCertificateMapEntrySettings; + } + + /** Returns the object with the settings used for calls to deleteCertificateMapEntry. */ + public OperationCallSettings + deleteCertificateMapEntryOperationSettings() { + return deleteCertificateMapEntryOperationSettings; + } + + /** Returns the object with the settings used for calls to listDnsAuthorizations. */ + public PagedCallSettings< + ListDnsAuthorizationsRequest, + ListDnsAuthorizationsResponse, + ListDnsAuthorizationsPagedResponse> + listDnsAuthorizationsSettings() { + return listDnsAuthorizationsSettings; + } + + /** Returns the object with the settings used for calls to getDnsAuthorization. */ + public UnaryCallSettings + getDnsAuthorizationSettings() { + return getDnsAuthorizationSettings; + } + + /** Returns the object with the settings used for calls to createDnsAuthorization. */ + public UnaryCallSettings + createDnsAuthorizationSettings() { + return createDnsAuthorizationSettings; + } + + /** Returns the object with the settings used for calls to createDnsAuthorization. */ + public OperationCallSettings + createDnsAuthorizationOperationSettings() { + return createDnsAuthorizationOperationSettings; + } + + /** Returns the object with the settings used for calls to updateDnsAuthorization. */ + public UnaryCallSettings + updateDnsAuthorizationSettings() { + return updateDnsAuthorizationSettings; + } + + /** Returns the object with the settings used for calls to updateDnsAuthorization. */ + public OperationCallSettings + updateDnsAuthorizationOperationSettings() { + return updateDnsAuthorizationOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteDnsAuthorization. */ + public UnaryCallSettings + deleteDnsAuthorizationSettings() { + return deleteDnsAuthorizationSettings; + } + + /** Returns the object with the settings used for calls to deleteDnsAuthorization. */ + public OperationCallSettings + deleteDnsAuthorizationOperationSettings() { + return deleteDnsAuthorizationOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CertificateManagerStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCertificateManagerStub.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 "certificatemanager.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "certificatemanager.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(CertificateManagerStubSettings.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 CertificateManagerStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listCertificatesSettings = settingsBuilder.listCertificatesSettings().build(); + getCertificateSettings = settingsBuilder.getCertificateSettings().build(); + createCertificateSettings = settingsBuilder.createCertificateSettings().build(); + createCertificateOperationSettings = + settingsBuilder.createCertificateOperationSettings().build(); + updateCertificateSettings = settingsBuilder.updateCertificateSettings().build(); + updateCertificateOperationSettings = + settingsBuilder.updateCertificateOperationSettings().build(); + deleteCertificateSettings = settingsBuilder.deleteCertificateSettings().build(); + deleteCertificateOperationSettings = + settingsBuilder.deleteCertificateOperationSettings().build(); + listCertificateMapsSettings = settingsBuilder.listCertificateMapsSettings().build(); + getCertificateMapSettings = settingsBuilder.getCertificateMapSettings().build(); + createCertificateMapSettings = settingsBuilder.createCertificateMapSettings().build(); + createCertificateMapOperationSettings = + settingsBuilder.createCertificateMapOperationSettings().build(); + updateCertificateMapSettings = settingsBuilder.updateCertificateMapSettings().build(); + updateCertificateMapOperationSettings = + settingsBuilder.updateCertificateMapOperationSettings().build(); + deleteCertificateMapSettings = settingsBuilder.deleteCertificateMapSettings().build(); + deleteCertificateMapOperationSettings = + settingsBuilder.deleteCertificateMapOperationSettings().build(); + listCertificateMapEntriesSettings = settingsBuilder.listCertificateMapEntriesSettings().build(); + getCertificateMapEntrySettings = settingsBuilder.getCertificateMapEntrySettings().build(); + createCertificateMapEntrySettings = settingsBuilder.createCertificateMapEntrySettings().build(); + createCertificateMapEntryOperationSettings = + settingsBuilder.createCertificateMapEntryOperationSettings().build(); + updateCertificateMapEntrySettings = settingsBuilder.updateCertificateMapEntrySettings().build(); + updateCertificateMapEntryOperationSettings = + settingsBuilder.updateCertificateMapEntryOperationSettings().build(); + deleteCertificateMapEntrySettings = settingsBuilder.deleteCertificateMapEntrySettings().build(); + deleteCertificateMapEntryOperationSettings = + settingsBuilder.deleteCertificateMapEntryOperationSettings().build(); + listDnsAuthorizationsSettings = settingsBuilder.listDnsAuthorizationsSettings().build(); + getDnsAuthorizationSettings = settingsBuilder.getDnsAuthorizationSettings().build(); + createDnsAuthorizationSettings = settingsBuilder.createDnsAuthorizationSettings().build(); + createDnsAuthorizationOperationSettings = + settingsBuilder.createDnsAuthorizationOperationSettings().build(); + updateDnsAuthorizationSettings = settingsBuilder.updateDnsAuthorizationSettings().build(); + updateDnsAuthorizationOperationSettings = + settingsBuilder.updateDnsAuthorizationOperationSettings().build(); + deleteDnsAuthorizationSettings = settingsBuilder.deleteDnsAuthorizationSettings().build(); + deleteDnsAuthorizationOperationSettings = + settingsBuilder.deleteDnsAuthorizationOperationSettings().build(); + } + + /** Builder for CertificateManagerStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings; + private final UnaryCallSettings.Builder + getCertificateSettings; + private final UnaryCallSettings.Builder + createCertificateSettings; + private final OperationCallSettings.Builder< + CreateCertificateRequest, Certificate, OperationMetadata> + createCertificateOperationSettings; + private final UnaryCallSettings.Builder + updateCertificateSettings; + private final OperationCallSettings.Builder< + UpdateCertificateRequest, Certificate, OperationMetadata> + updateCertificateOperationSettings; + private final UnaryCallSettings.Builder + deleteCertificateSettings; + private final OperationCallSettings.Builder + deleteCertificateOperationSettings; + private final PagedCallSettings.Builder< + ListCertificateMapsRequest, + ListCertificateMapsResponse, + ListCertificateMapsPagedResponse> + listCertificateMapsSettings; + private final UnaryCallSettings.Builder + getCertificateMapSettings; + private final UnaryCallSettings.Builder + createCertificateMapSettings; + private final OperationCallSettings.Builder< + CreateCertificateMapRequest, CertificateMap, OperationMetadata> + createCertificateMapOperationSettings; + private final UnaryCallSettings.Builder + updateCertificateMapSettings; + private final OperationCallSettings.Builder< + UpdateCertificateMapRequest, CertificateMap, OperationMetadata> + updateCertificateMapOperationSettings; + private final UnaryCallSettings.Builder + deleteCertificateMapSettings; + private final OperationCallSettings.Builder< + DeleteCertificateMapRequest, Empty, OperationMetadata> + deleteCertificateMapOperationSettings; + private final PagedCallSettings.Builder< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + ListCertificateMapEntriesPagedResponse> + listCertificateMapEntriesSettings; + private final UnaryCallSettings.Builder + getCertificateMapEntrySettings; + private final UnaryCallSettings.Builder + createCertificateMapEntrySettings; + private final OperationCallSettings.Builder< + CreateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + createCertificateMapEntryOperationSettings; + private final UnaryCallSettings.Builder + updateCertificateMapEntrySettings; + private final OperationCallSettings.Builder< + UpdateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + updateCertificateMapEntryOperationSettings; + private final UnaryCallSettings.Builder + deleteCertificateMapEntrySettings; + private final OperationCallSettings.Builder< + DeleteCertificateMapEntryRequest, Empty, OperationMetadata> + deleteCertificateMapEntryOperationSettings; + private final PagedCallSettings.Builder< + ListDnsAuthorizationsRequest, + ListDnsAuthorizationsResponse, + ListDnsAuthorizationsPagedResponse> + listDnsAuthorizationsSettings; + private final UnaryCallSettings.Builder + getDnsAuthorizationSettings; + private final UnaryCallSettings.Builder + createDnsAuthorizationSettings; + private final OperationCallSettings.Builder< + CreateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> + createDnsAuthorizationOperationSettings; + private final UnaryCallSettings.Builder + updateDnsAuthorizationSettings; + private final OperationCallSettings.Builder< + UpdateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> + updateDnsAuthorizationOperationSettings; + private final UnaryCallSettings.Builder + deleteDnsAuthorizationSettings; + private final OperationCallSettings.Builder< + DeleteDnsAuthorizationRequest, Empty, OperationMetadata> + deleteDnsAuthorizationOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listCertificatesSettings = PagedCallSettings.newBuilder(LIST_CERTIFICATES_PAGE_STR_FACT); + getCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCertificateOperationSettings = OperationCallSettings.newBuilder(); + updateCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateCertificateOperationSettings = OperationCallSettings.newBuilder(); + deleteCertificateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteCertificateOperationSettings = OperationCallSettings.newBuilder(); + listCertificateMapsSettings = + PagedCallSettings.newBuilder(LIST_CERTIFICATE_MAPS_PAGE_STR_FACT); + getCertificateMapSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCertificateMapSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCertificateMapOperationSettings = OperationCallSettings.newBuilder(); + updateCertificateMapSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateCertificateMapOperationSettings = OperationCallSettings.newBuilder(); + deleteCertificateMapSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteCertificateMapOperationSettings = OperationCallSettings.newBuilder(); + listCertificateMapEntriesSettings = + PagedCallSettings.newBuilder(LIST_CERTIFICATE_MAP_ENTRIES_PAGE_STR_FACT); + getCertificateMapEntrySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCertificateMapEntrySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCertificateMapEntryOperationSettings = OperationCallSettings.newBuilder(); + updateCertificateMapEntrySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateCertificateMapEntryOperationSettings = OperationCallSettings.newBuilder(); + deleteCertificateMapEntrySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteCertificateMapEntryOperationSettings = OperationCallSettings.newBuilder(); + listDnsAuthorizationsSettings = + PagedCallSettings.newBuilder(LIST_DNS_AUTHORIZATIONS_PAGE_STR_FACT); + getDnsAuthorizationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDnsAuthorizationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDnsAuthorizationOperationSettings = OperationCallSettings.newBuilder(); + updateDnsAuthorizationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDnsAuthorizationOperationSettings = OperationCallSettings.newBuilder(); + deleteDnsAuthorizationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDnsAuthorizationOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listCertificatesSettings, + getCertificateSettings, + createCertificateSettings, + updateCertificateSettings, + deleteCertificateSettings, + listCertificateMapsSettings, + getCertificateMapSettings, + createCertificateMapSettings, + updateCertificateMapSettings, + deleteCertificateMapSettings, + listCertificateMapEntriesSettings, + getCertificateMapEntrySettings, + createCertificateMapEntrySettings, + updateCertificateMapEntrySettings, + deleteCertificateMapEntrySettings, + listDnsAuthorizationsSettings, + getDnsAuthorizationSettings, + createDnsAuthorizationSettings, + updateDnsAuthorizationSettings, + deleteDnsAuthorizationSettings); + initDefaults(this); + } + + protected Builder(CertificateManagerStubSettings settings) { + super(settings); + + listCertificatesSettings = settings.listCertificatesSettings.toBuilder(); + getCertificateSettings = settings.getCertificateSettings.toBuilder(); + createCertificateSettings = settings.createCertificateSettings.toBuilder(); + createCertificateOperationSettings = settings.createCertificateOperationSettings.toBuilder(); + updateCertificateSettings = settings.updateCertificateSettings.toBuilder(); + updateCertificateOperationSettings = settings.updateCertificateOperationSettings.toBuilder(); + deleteCertificateSettings = settings.deleteCertificateSettings.toBuilder(); + deleteCertificateOperationSettings = settings.deleteCertificateOperationSettings.toBuilder(); + listCertificateMapsSettings = settings.listCertificateMapsSettings.toBuilder(); + getCertificateMapSettings = settings.getCertificateMapSettings.toBuilder(); + createCertificateMapSettings = settings.createCertificateMapSettings.toBuilder(); + createCertificateMapOperationSettings = + settings.createCertificateMapOperationSettings.toBuilder(); + updateCertificateMapSettings = settings.updateCertificateMapSettings.toBuilder(); + updateCertificateMapOperationSettings = + settings.updateCertificateMapOperationSettings.toBuilder(); + deleteCertificateMapSettings = settings.deleteCertificateMapSettings.toBuilder(); + deleteCertificateMapOperationSettings = + settings.deleteCertificateMapOperationSettings.toBuilder(); + listCertificateMapEntriesSettings = settings.listCertificateMapEntriesSettings.toBuilder(); + getCertificateMapEntrySettings = settings.getCertificateMapEntrySettings.toBuilder(); + createCertificateMapEntrySettings = settings.createCertificateMapEntrySettings.toBuilder(); + createCertificateMapEntryOperationSettings = + settings.createCertificateMapEntryOperationSettings.toBuilder(); + updateCertificateMapEntrySettings = settings.updateCertificateMapEntrySettings.toBuilder(); + updateCertificateMapEntryOperationSettings = + settings.updateCertificateMapEntryOperationSettings.toBuilder(); + deleteCertificateMapEntrySettings = settings.deleteCertificateMapEntrySettings.toBuilder(); + deleteCertificateMapEntryOperationSettings = + settings.deleteCertificateMapEntryOperationSettings.toBuilder(); + listDnsAuthorizationsSettings = settings.listDnsAuthorizationsSettings.toBuilder(); + getDnsAuthorizationSettings = settings.getDnsAuthorizationSettings.toBuilder(); + createDnsAuthorizationSettings = settings.createDnsAuthorizationSettings.toBuilder(); + createDnsAuthorizationOperationSettings = + settings.createDnsAuthorizationOperationSettings.toBuilder(); + updateDnsAuthorizationSettings = settings.updateDnsAuthorizationSettings.toBuilder(); + updateDnsAuthorizationOperationSettings = + settings.updateDnsAuthorizationOperationSettings.toBuilder(); + deleteDnsAuthorizationSettings = settings.deleteDnsAuthorizationSettings.toBuilder(); + deleteDnsAuthorizationOperationSettings = + settings.deleteDnsAuthorizationOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listCertificatesSettings, + getCertificateSettings, + createCertificateSettings, + updateCertificateSettings, + deleteCertificateSettings, + listCertificateMapsSettings, + getCertificateMapSettings, + createCertificateMapSettings, + updateCertificateMapSettings, + deleteCertificateMapSettings, + listCertificateMapEntriesSettings, + getCertificateMapEntrySettings, + createCertificateMapEntrySettings, + updateCertificateMapEntrySettings, + deleteCertificateMapEntrySettings, + listDnsAuthorizationsSettings, + getDnsAuthorizationSettings, + createDnsAuthorizationSettings, + updateDnsAuthorizationSettings, + deleteDnsAuthorizationSettings); + } + + 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 + .listCertificatesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteCertificateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listCertificateMapsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getCertificateMapSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createCertificateMapSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateCertificateMapSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteCertificateMapSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listCertificateMapEntriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getCertificateMapEntrySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createCertificateMapEntrySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateCertificateMapEntrySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteCertificateMapEntrySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listDnsAuthorizationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDnsAuthorizationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createDnsAuthorizationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateDnsAuthorizationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteDnsAuthorizationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createCertificateOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Certificate.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 + .updateCertificateOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Certificate.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 + .deleteCertificateOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 + .createCertificateMapOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CertificateMap.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 + .updateCertificateMapOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CertificateMap.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 + .deleteCertificateMapOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 + .createCertificateMapEntryOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CertificateMapEntry.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 + .updateCertificateMapEntryOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CertificateMapEntry.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 + .deleteCertificateMapEntryOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 + .createDnsAuthorizationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DnsAuthorization.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 + .updateDnsAuthorizationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DnsAuthorization.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 + .deleteDnsAuthorizationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.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 listCertificates. */ + public PagedCallSettings.Builder< + ListCertificatesRequest, ListCertificatesResponse, ListCertificatesPagedResponse> + listCertificatesSettings() { + return listCertificatesSettings; + } + + /** Returns the builder for the settings used for calls to getCertificate. */ + public UnaryCallSettings.Builder getCertificateSettings() { + return getCertificateSettings; + } + + /** Returns the builder for the settings used for calls to createCertificate. */ + public UnaryCallSettings.Builder + createCertificateSettings() { + return createCertificateSettings; + } + + /** Returns the builder for the settings used for calls to createCertificate. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createCertificateOperationSettings() { + return createCertificateOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateCertificate. */ + public UnaryCallSettings.Builder + updateCertificateSettings() { + return updateCertificateSettings; + } + + /** Returns the builder for the settings used for calls to updateCertificate. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateCertificateOperationSettings() { + return updateCertificateOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteCertificate. */ + public UnaryCallSettings.Builder + deleteCertificateSettings() { + return deleteCertificateSettings; + } + + /** Returns the builder for the settings used for calls to deleteCertificate. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteCertificateOperationSettings() { + return deleteCertificateOperationSettings; + } + + /** Returns the builder for the settings used for calls to listCertificateMaps. */ + public PagedCallSettings.Builder< + ListCertificateMapsRequest, + ListCertificateMapsResponse, + ListCertificateMapsPagedResponse> + listCertificateMapsSettings() { + return listCertificateMapsSettings; + } + + /** Returns the builder for the settings used for calls to getCertificateMap. */ + public UnaryCallSettings.Builder + getCertificateMapSettings() { + return getCertificateMapSettings; + } + + /** Returns the builder for the settings used for calls to createCertificateMap. */ + public UnaryCallSettings.Builder + createCertificateMapSettings() { + return createCertificateMapSettings; + } + + /** Returns the builder for the settings used for calls to createCertificateMap. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateCertificateMapRequest, CertificateMap, OperationMetadata> + createCertificateMapOperationSettings() { + return createCertificateMapOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateCertificateMap. */ + public UnaryCallSettings.Builder + updateCertificateMapSettings() { + return updateCertificateMapSettings; + } + + /** Returns the builder for the settings used for calls to updateCertificateMap. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateCertificateMapRequest, CertificateMap, OperationMetadata> + updateCertificateMapOperationSettings() { + return updateCertificateMapOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteCertificateMap. */ + public UnaryCallSettings.Builder + deleteCertificateMapSettings() { + return deleteCertificateMapSettings; + } + + /** Returns the builder for the settings used for calls to deleteCertificateMap. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteCertificateMapOperationSettings() { + return deleteCertificateMapOperationSettings; + } + + /** Returns the builder for the settings used for calls to listCertificateMapEntries. */ + public PagedCallSettings.Builder< + ListCertificateMapEntriesRequest, + ListCertificateMapEntriesResponse, + ListCertificateMapEntriesPagedResponse> + listCertificateMapEntriesSettings() { + return listCertificateMapEntriesSettings; + } + + /** Returns the builder for the settings used for calls to getCertificateMapEntry. */ + public UnaryCallSettings.Builder + getCertificateMapEntrySettings() { + return getCertificateMapEntrySettings; + } + + /** Returns the builder for the settings used for calls to createCertificateMapEntry. */ + public UnaryCallSettings.Builder + createCertificateMapEntrySettings() { + return createCertificateMapEntrySettings; + } + + /** Returns the builder for the settings used for calls to createCertificateMapEntry. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + createCertificateMapEntryOperationSettings() { + return createCertificateMapEntryOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateCertificateMapEntry. */ + public UnaryCallSettings.Builder + updateCertificateMapEntrySettings() { + return updateCertificateMapEntrySettings; + } + + /** Returns the builder for the settings used for calls to updateCertificateMapEntry. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + updateCertificateMapEntryOperationSettings() { + return updateCertificateMapEntryOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteCertificateMapEntry. */ + public UnaryCallSettings.Builder + deleteCertificateMapEntrySettings() { + return deleteCertificateMapEntrySettings; + } + + /** Returns the builder for the settings used for calls to deleteCertificateMapEntry. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteCertificateMapEntryOperationSettings() { + return deleteCertificateMapEntryOperationSettings; + } + + /** Returns the builder for the settings used for calls to listDnsAuthorizations. */ + public PagedCallSettings.Builder< + ListDnsAuthorizationsRequest, + ListDnsAuthorizationsResponse, + ListDnsAuthorizationsPagedResponse> + listDnsAuthorizationsSettings() { + return listDnsAuthorizationsSettings; + } + + /** Returns the builder for the settings used for calls to getDnsAuthorization. */ + public UnaryCallSettings.Builder + getDnsAuthorizationSettings() { + return getDnsAuthorizationSettings; + } + + /** Returns the builder for the settings used for calls to createDnsAuthorization. */ + public UnaryCallSettings.Builder + createDnsAuthorizationSettings() { + return createDnsAuthorizationSettings; + } + + /** Returns the builder for the settings used for calls to createDnsAuthorization. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> + createDnsAuthorizationOperationSettings() { + return createDnsAuthorizationOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateDnsAuthorization. */ + public UnaryCallSettings.Builder + updateDnsAuthorizationSettings() { + return updateDnsAuthorizationSettings; + } + + /** Returns the builder for the settings used for calls to updateDnsAuthorization. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> + updateDnsAuthorizationOperationSettings() { + return updateDnsAuthorizationOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDnsAuthorization. */ + public UnaryCallSettings.Builder + deleteDnsAuthorizationSettings() { + return deleteDnsAuthorizationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDnsAuthorization. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteDnsAuthorizationOperationSettings() { + return deleteDnsAuthorizationOperationSettings; + } + + @Override + public CertificateManagerStubSettings build() throws IOException { + return new CertificateManagerStubSettings(this); + } + } +} diff --git a/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerCallableFactory.java b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerCallableFactory.java new file mode 100644 index 0000000..316cebe --- /dev/null +++ b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.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 CertificateManager service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcCertificateManagerCallableFactory 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-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerStub.java b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerStub.java new file mode 100644 index 0000000..d59a1e7 --- /dev/null +++ b/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerStub.java @@ -0,0 +1,1075 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.v1.stub; + +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapEntriesPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapsPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse; + +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.certificatemanager.v1.Certificate; +import com.google.cloud.certificatemanager.v1.CertificateMap; +import com.google.cloud.certificatemanager.v1.CertificateMapEntry; +import com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.CreateCertificateRequest; +import com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest; +import com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.DeleteCertificateRequest; +import com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest; +import com.google.cloud.certificatemanager.v1.DnsAuthorization; +import com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.GetCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.GetCertificateRequest; +import com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest; +import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest; +import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse; +import com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest; +import com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse; +import com.google.cloud.certificatemanager.v1.ListCertificatesRequest; +import com.google.cloud.certificatemanager.v1.ListCertificatesResponse; +import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest; +import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse; +import com.google.cloud.certificatemanager.v1.OperationMetadata; +import com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest; +import com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest; +import com.google.cloud.certificatemanager.v1.UpdateCertificateRequest; +import com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the CertificateManager service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcCertificateManagerStub extends CertificateManagerStub { + private static final MethodDescriptor + listCertificatesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/ListCertificates") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCertificatesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCertificatesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/GetCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(GetCertificateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Certificate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/CreateCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCertificateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/UpdateCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCertificateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteCertificateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/DeleteCertificate") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteCertificateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listCertificateMapsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/ListCertificateMaps") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCertificateMapsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCertificateMapsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getCertificateMapMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/GetCertificateMap") + .setRequestMarshaller( + ProtoUtils.marshaller(GetCertificateMapRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(CertificateMap.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createCertificateMapMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/CreateCertificateMap") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCertificateMapRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateCertificateMapMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/UpdateCertificateMap") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCertificateMapRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteCertificateMapMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/DeleteCertificateMap") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteCertificateMapRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListCertificateMapEntriesRequest, ListCertificateMapEntriesResponse> + listCertificateMapEntriesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/ListCertificateMapEntries") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCertificateMapEntriesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCertificateMapEntriesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getCertificateMapEntryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/GetCertificateMapEntry") + .setRequestMarshaller( + ProtoUtils.marshaller(GetCertificateMapEntryRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CertificateMapEntry.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createCertificateMapEntryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/CreateCertificateMapEntry") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCertificateMapEntryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateCertificateMapEntryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/UpdateCertificateMapEntry") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCertificateMapEntryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteCertificateMapEntryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/DeleteCertificateMapEntry") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteCertificateMapEntryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDnsAuthorizationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/ListDnsAuthorizations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDnsAuthorizationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDnsAuthorizationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDnsAuthorizationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/GetDnsAuthorization") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDnsAuthorizationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DnsAuthorization.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createDnsAuthorizationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/CreateDnsAuthorization") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDnsAuthorizationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDnsAuthorizationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/UpdateDnsAuthorization") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDnsAuthorizationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDnsAuthorizationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.certificatemanager.v1.CertificateManager/DeleteDnsAuthorization") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDnsAuthorizationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + listCertificatesCallable; + private final UnaryCallable + listCertificatesPagedCallable; + private final UnaryCallable getCertificateCallable; + private final UnaryCallable createCertificateCallable; + private final OperationCallable + createCertificateOperationCallable; + private final UnaryCallable updateCertificateCallable; + private final OperationCallable + updateCertificateOperationCallable; + private final UnaryCallable deleteCertificateCallable; + private final OperationCallable + deleteCertificateOperationCallable; + private final UnaryCallable + listCertificateMapsCallable; + private final UnaryCallable + listCertificateMapsPagedCallable; + private final UnaryCallable getCertificateMapCallable; + private final UnaryCallable createCertificateMapCallable; + private final OperationCallable + createCertificateMapOperationCallable; + private final UnaryCallable updateCertificateMapCallable; + private final OperationCallable + updateCertificateMapOperationCallable; + private final UnaryCallable deleteCertificateMapCallable; + private final OperationCallable + deleteCertificateMapOperationCallable; + private final UnaryCallable + listCertificateMapEntriesCallable; + private final UnaryCallable< + ListCertificateMapEntriesRequest, ListCertificateMapEntriesPagedResponse> + listCertificateMapEntriesPagedCallable; + private final UnaryCallable + getCertificateMapEntryCallable; + private final UnaryCallable + createCertificateMapEntryCallable; + private final OperationCallable< + CreateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + createCertificateMapEntryOperationCallable; + private final UnaryCallable + updateCertificateMapEntryCallable; + private final OperationCallable< + UpdateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> + updateCertificateMapEntryOperationCallable; + private final UnaryCallable + deleteCertificateMapEntryCallable; + private final OperationCallable + deleteCertificateMapEntryOperationCallable; + private final UnaryCallable + listDnsAuthorizationsCallable; + private final UnaryCallable + listDnsAuthorizationsPagedCallable; + private final UnaryCallable + getDnsAuthorizationCallable; + private final UnaryCallable + createDnsAuthorizationCallable; + private final OperationCallable< + CreateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> + createDnsAuthorizationOperationCallable; + private final UnaryCallable + updateDnsAuthorizationCallable; + private final OperationCallable< + UpdateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> + updateDnsAuthorizationOperationCallable; + private final UnaryCallable + deleteDnsAuthorizationCallable; + private final OperationCallable + deleteDnsAuthorizationOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCertificateManagerStub create(CertificateManagerStubSettings settings) + throws IOException { + return new GrpcCertificateManagerStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCertificateManagerStub create(ClientContext clientContext) + throws IOException { + return new GrpcCertificateManagerStub( + CertificateManagerStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCertificateManagerStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCertificateManagerStub( + CertificateManagerStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcCertificateManagerStub, 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 GrpcCertificateManagerStub( + CertificateManagerStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcCertificateManagerCallableFactory()); + } + + /** + * Constructs an instance of GrpcCertificateManagerStub, 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 GrpcCertificateManagerStub( + CertificateManagerStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listCertificatesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCertificatesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCertificateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCertificateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCertificateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "certificate.name", String.valueOf(request.getCertificate().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteCertificateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteCertificateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listCertificateMapsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCertificateMapsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getCertificateMapTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCertificateMapMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createCertificateMapTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCertificateMapMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateCertificateMapTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCertificateMapMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "certificate_map.name", + String.valueOf(request.getCertificateMap().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteCertificateMapTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteCertificateMapMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listCertificateMapEntriesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listCertificateMapEntriesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + getCertificateMapEntryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCertificateMapEntryMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + createCertificateMapEntryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCertificateMapEntryMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateCertificateMapEntryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCertificateMapEntryMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "certificate_map_entry.name", + String.valueOf(request.getCertificateMapEntry().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + deleteCertificateMapEntryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteCertificateMapEntryMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listDnsAuthorizationsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listDnsAuthorizationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + getDnsAuthorizationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDnsAuthorizationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + createDnsAuthorizationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDnsAuthorizationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateDnsAuthorizationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDnsAuthorizationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "dns_authorization.name", + String.valueOf(request.getDnsAuthorization().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + deleteDnsAuthorizationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDnsAuthorizationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.listCertificatesCallable = + callableFactory.createUnaryCallable( + listCertificatesTransportSettings, settings.listCertificatesSettings(), clientContext); + this.listCertificatesPagedCallable = + callableFactory.createPagedCallable( + listCertificatesTransportSettings, settings.listCertificatesSettings(), clientContext); + this.getCertificateCallable = + callableFactory.createUnaryCallable( + getCertificateTransportSettings, settings.getCertificateSettings(), clientContext); + this.createCertificateCallable = + callableFactory.createUnaryCallable( + createCertificateTransportSettings, + settings.createCertificateSettings(), + clientContext); + this.createCertificateOperationCallable = + callableFactory.createOperationCallable( + createCertificateTransportSettings, + settings.createCertificateOperationSettings(), + clientContext, + operationsStub); + this.updateCertificateCallable = + callableFactory.createUnaryCallable( + updateCertificateTransportSettings, + settings.updateCertificateSettings(), + clientContext); + this.updateCertificateOperationCallable = + callableFactory.createOperationCallable( + updateCertificateTransportSettings, + settings.updateCertificateOperationSettings(), + clientContext, + operationsStub); + this.deleteCertificateCallable = + callableFactory.createUnaryCallable( + deleteCertificateTransportSettings, + settings.deleteCertificateSettings(), + clientContext); + this.deleteCertificateOperationCallable = + callableFactory.createOperationCallable( + deleteCertificateTransportSettings, + settings.deleteCertificateOperationSettings(), + clientContext, + operationsStub); + this.listCertificateMapsCallable = + callableFactory.createUnaryCallable( + listCertificateMapsTransportSettings, + settings.listCertificateMapsSettings(), + clientContext); + this.listCertificateMapsPagedCallable = + callableFactory.createPagedCallable( + listCertificateMapsTransportSettings, + settings.listCertificateMapsSettings(), + clientContext); + this.getCertificateMapCallable = + callableFactory.createUnaryCallable( + getCertificateMapTransportSettings, + settings.getCertificateMapSettings(), + clientContext); + this.createCertificateMapCallable = + callableFactory.createUnaryCallable( + createCertificateMapTransportSettings, + settings.createCertificateMapSettings(), + clientContext); + this.createCertificateMapOperationCallable = + callableFactory.createOperationCallable( + createCertificateMapTransportSettings, + settings.createCertificateMapOperationSettings(), + clientContext, + operationsStub); + this.updateCertificateMapCallable = + callableFactory.createUnaryCallable( + updateCertificateMapTransportSettings, + settings.updateCertificateMapSettings(), + clientContext); + this.updateCertificateMapOperationCallable = + callableFactory.createOperationCallable( + updateCertificateMapTransportSettings, + settings.updateCertificateMapOperationSettings(), + clientContext, + operationsStub); + this.deleteCertificateMapCallable = + callableFactory.createUnaryCallable( + deleteCertificateMapTransportSettings, + settings.deleteCertificateMapSettings(), + clientContext); + this.deleteCertificateMapOperationCallable = + callableFactory.createOperationCallable( + deleteCertificateMapTransportSettings, + settings.deleteCertificateMapOperationSettings(), + clientContext, + operationsStub); + this.listCertificateMapEntriesCallable = + callableFactory.createUnaryCallable( + listCertificateMapEntriesTransportSettings, + settings.listCertificateMapEntriesSettings(), + clientContext); + this.listCertificateMapEntriesPagedCallable = + callableFactory.createPagedCallable( + listCertificateMapEntriesTransportSettings, + settings.listCertificateMapEntriesSettings(), + clientContext); + this.getCertificateMapEntryCallable = + callableFactory.createUnaryCallable( + getCertificateMapEntryTransportSettings, + settings.getCertificateMapEntrySettings(), + clientContext); + this.createCertificateMapEntryCallable = + callableFactory.createUnaryCallable( + createCertificateMapEntryTransportSettings, + settings.createCertificateMapEntrySettings(), + clientContext); + this.createCertificateMapEntryOperationCallable = + callableFactory.createOperationCallable( + createCertificateMapEntryTransportSettings, + settings.createCertificateMapEntryOperationSettings(), + clientContext, + operationsStub); + this.updateCertificateMapEntryCallable = + callableFactory.createUnaryCallable( + updateCertificateMapEntryTransportSettings, + settings.updateCertificateMapEntrySettings(), + clientContext); + this.updateCertificateMapEntryOperationCallable = + callableFactory.createOperationCallable( + updateCertificateMapEntryTransportSettings, + settings.updateCertificateMapEntryOperationSettings(), + clientContext, + operationsStub); + this.deleteCertificateMapEntryCallable = + callableFactory.createUnaryCallable( + deleteCertificateMapEntryTransportSettings, + settings.deleteCertificateMapEntrySettings(), + clientContext); + this.deleteCertificateMapEntryOperationCallable = + callableFactory.createOperationCallable( + deleteCertificateMapEntryTransportSettings, + settings.deleteCertificateMapEntryOperationSettings(), + clientContext, + operationsStub); + this.listDnsAuthorizationsCallable = + callableFactory.createUnaryCallable( + listDnsAuthorizationsTransportSettings, + settings.listDnsAuthorizationsSettings(), + clientContext); + this.listDnsAuthorizationsPagedCallable = + callableFactory.createPagedCallable( + listDnsAuthorizationsTransportSettings, + settings.listDnsAuthorizationsSettings(), + clientContext); + this.getDnsAuthorizationCallable = + callableFactory.createUnaryCallable( + getDnsAuthorizationTransportSettings, + settings.getDnsAuthorizationSettings(), + clientContext); + this.createDnsAuthorizationCallable = + callableFactory.createUnaryCallable( + createDnsAuthorizationTransportSettings, + settings.createDnsAuthorizationSettings(), + clientContext); + this.createDnsAuthorizationOperationCallable = + callableFactory.createOperationCallable( + createDnsAuthorizationTransportSettings, + settings.createDnsAuthorizationOperationSettings(), + clientContext, + operationsStub); + this.updateDnsAuthorizationCallable = + callableFactory.createUnaryCallable( + updateDnsAuthorizationTransportSettings, + settings.updateDnsAuthorizationSettings(), + clientContext); + this.updateDnsAuthorizationOperationCallable = + callableFactory.createOperationCallable( + updateDnsAuthorizationTransportSettings, + settings.updateDnsAuthorizationOperationSettings(), + clientContext, + operationsStub); + this.deleteDnsAuthorizationCallable = + callableFactory.createUnaryCallable( + deleteDnsAuthorizationTransportSettings, + settings.deleteDnsAuthorizationSettings(), + clientContext); + this.deleteDnsAuthorizationOperationCallable = + callableFactory.createOperationCallable( + deleteDnsAuthorizationTransportSettings, + settings.deleteDnsAuthorizationOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listCertificatesCallable() { + return listCertificatesCallable; + } + + @Override + public UnaryCallable + listCertificatesPagedCallable() { + return listCertificatesPagedCallable; + } + + @Override + public UnaryCallable getCertificateCallable() { + return getCertificateCallable; + } + + @Override + public UnaryCallable createCertificateCallable() { + return createCertificateCallable; + } + + @Override + public OperationCallable + createCertificateOperationCallable() { + return createCertificateOperationCallable; + } + + @Override + public UnaryCallable updateCertificateCallable() { + return updateCertificateCallable; + } + + @Override + public OperationCallable + updateCertificateOperationCallable() { + return updateCertificateOperationCallable; + } + + @Override + public UnaryCallable deleteCertificateCallable() { + return deleteCertificateCallable; + } + + @Override + public OperationCallable + deleteCertificateOperationCallable() { + return deleteCertificateOperationCallable; + } + + @Override + public UnaryCallable + listCertificateMapsCallable() { + return listCertificateMapsCallable; + } + + @Override + public UnaryCallable + listCertificateMapsPagedCallable() { + return listCertificateMapsPagedCallable; + } + + @Override + public UnaryCallable getCertificateMapCallable() { + return getCertificateMapCallable; + } + + @Override + public UnaryCallable createCertificateMapCallable() { + return createCertificateMapCallable; + } + + @Override + public OperationCallable + createCertificateMapOperationCallable() { + return createCertificateMapOperationCallable; + } + + @Override + public UnaryCallable updateCertificateMapCallable() { + return updateCertificateMapCallable; + } + + @Override + public OperationCallable + updateCertificateMapOperationCallable() { + return updateCertificateMapOperationCallable; + } + + @Override + public UnaryCallable deleteCertificateMapCallable() { + return deleteCertificateMapCallable; + } + + @Override + public OperationCallable + deleteCertificateMapOperationCallable() { + return deleteCertificateMapOperationCallable; + } + + @Override + public UnaryCallable + listCertificateMapEntriesCallable() { + return listCertificateMapEntriesCallable; + } + + @Override + public UnaryCallable + listCertificateMapEntriesPagedCallable() { + return listCertificateMapEntriesPagedCallable; + } + + @Override + public UnaryCallable + getCertificateMapEntryCallable() { + return getCertificateMapEntryCallable; + } + + @Override + public UnaryCallable + createCertificateMapEntryCallable() { + return createCertificateMapEntryCallable; + } + + @Override + public OperationCallable + createCertificateMapEntryOperationCallable() { + return createCertificateMapEntryOperationCallable; + } + + @Override + public UnaryCallable + updateCertificateMapEntryCallable() { + return updateCertificateMapEntryCallable; + } + + @Override + public OperationCallable + updateCertificateMapEntryOperationCallable() { + return updateCertificateMapEntryOperationCallable; + } + + @Override + public UnaryCallable + deleteCertificateMapEntryCallable() { + return deleteCertificateMapEntryCallable; + } + + @Override + public OperationCallable + deleteCertificateMapEntryOperationCallable() { + return deleteCertificateMapEntryOperationCallable; + } + + @Override + public UnaryCallable + listDnsAuthorizationsCallable() { + return listDnsAuthorizationsCallable; + } + + @Override + public UnaryCallable + listDnsAuthorizationsPagedCallable() { + return listDnsAuthorizationsPagedCallable; + } + + @Override + public UnaryCallable getDnsAuthorizationCallable() { + return getDnsAuthorizationCallable; + } + + @Override + public UnaryCallable createDnsAuthorizationCallable() { + return createDnsAuthorizationCallable; + } + + @Override + public OperationCallable + createDnsAuthorizationOperationCallable() { + return createDnsAuthorizationOperationCallable; + } + + @Override + public UnaryCallable updateDnsAuthorizationCallable() { + return updateDnsAuthorizationCallable; + } + + @Override + public OperationCallable + updateDnsAuthorizationOperationCallable() { + return updateDnsAuthorizationOperationCallable; + } + + @Override + public UnaryCallable deleteDnsAuthorizationCallable() { + return deleteDnsAuthorizationCallable; + } + + @Override + public OperationCallable + deleteDnsAuthorizationOperationCallable() { + return deleteDnsAuthorizationOperationCallable; + } + + @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-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/CertificateManagerClientTest.java b/google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/CertificateManagerClientTest.java new file mode 100644 index 0000000..65dad88 --- /dev/null +++ b/google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/CertificateManagerClientTest.java @@ -0,0 +1,1906 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.v1; + +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapEntriesPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapsPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse; +import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class CertificateManagerClientTest { + private static MockCertificateManager mockCertificateManager; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private CertificateManagerClient client; + + @BeforeClass + public static void startStaticServer() { + mockCertificateManager = new MockCertificateManager(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockCertificateManager)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + CertificateManagerSettings settings = + CertificateManagerSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CertificateManagerClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listCertificatesTest() throws Exception { + Certificate responsesElement = Certificate.newBuilder().build(); + ListCertificatesResponse expectedResponse = + ListCertificatesResponse.newBuilder() + .setNextPageToken("") + .addAllCertificates(Arrays.asList(responsesElement)) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListCertificatesPagedResponse pagedListResponse = client.listCertificates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCertificatesList().get(0), resources.get(0)); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCertificatesRequest actualRequest = ((ListCertificatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCertificatesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listCertificates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCertificatesTest2() throws Exception { + Certificate responsesElement = Certificate.newBuilder().build(); + ListCertificatesResponse expectedResponse = + ListCertificatesResponse.newBuilder() + .setNextPageToken("") + .addAllCertificates(Arrays.asList(responsesElement)) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListCertificatesPagedResponse pagedListResponse = client.listCertificates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCertificatesList().get(0), resources.get(0)); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCertificatesRequest actualRequest = ((ListCertificatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCertificatesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listCertificates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCertificateTest() throws Exception { + Certificate expectedResponse = + Certificate.newBuilder() + .setName(CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllSanDnsnames(new ArrayList()) + .setPemCertificate("pemCertificate153491807") + .setExpireTime(Timestamp.newBuilder().build()) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]"); + + Certificate actualResponse = client.getCertificate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCertificateRequest actualRequest = ((GetCertificateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]"); + client.getCertificate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCertificateTest2() throws Exception { + Certificate expectedResponse = + Certificate.newBuilder() + .setName(CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllSanDnsnames(new ArrayList()) + .setPemCertificate("pemCertificate153491807") + .setExpireTime(Timestamp.newBuilder().build()) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + String name = "name3373707"; + + Certificate actualResponse = client.getCertificate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCertificateRequest actualRequest = ((GetCertificateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCertificateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String name = "name3373707"; + client.getCertificate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCertificateTest() throws Exception { + Certificate expectedResponse = + Certificate.newBuilder() + .setName(CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllSanDnsnames(new ArrayList()) + .setPemCertificate("pemCertificate153491807") + .setExpireTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCertificateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Certificate certificate = Certificate.newBuilder().build(); + String certificateId = "certificateId-644529902"; + + Certificate actualResponse = + client.createCertificateAsync(parent, certificate, certificateId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCertificateRequest actualRequest = ((CreateCertificateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(certificate, actualRequest.getCertificate()); + Assert.assertEquals(certificateId, actualRequest.getCertificateId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Certificate certificate = Certificate.newBuilder().build(); + String certificateId = "certificateId-644529902"; + client.createCertificateAsync(parent, certificate, certificateId).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 createCertificateTest2() throws Exception { + Certificate expectedResponse = + Certificate.newBuilder() + .setName(CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllSanDnsnames(new ArrayList()) + .setPemCertificate("pemCertificate153491807") + .setExpireTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCertificateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + String parent = "parent-995424086"; + Certificate certificate = Certificate.newBuilder().build(); + String certificateId = "certificateId-644529902"; + + Certificate actualResponse = + client.createCertificateAsync(parent, certificate, certificateId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCertificateRequest actualRequest = ((CreateCertificateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(certificate, actualRequest.getCertificate()); + Assert.assertEquals(certificateId, actualRequest.getCertificateId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCertificateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String parent = "parent-995424086"; + Certificate certificate = Certificate.newBuilder().build(); + String certificateId = "certificateId-644529902"; + client.createCertificateAsync(parent, certificate, certificateId).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 updateCertificateTest() throws Exception { + Certificate expectedResponse = + Certificate.newBuilder() + .setName(CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllSanDnsnames(new ArrayList()) + .setPemCertificate("pemCertificate153491807") + .setExpireTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateCertificateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + Certificate certificate = Certificate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Certificate actualResponse = client.updateCertificateAsync(certificate, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCertificateRequest actualRequest = ((UpdateCertificateRequest) actualRequests.get(0)); + + Assert.assertEquals(certificate, actualRequest.getCertificate()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + Certificate certificate = Certificate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCertificateAsync(certificate, 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 deleteCertificateTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCertificateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]"); + + client.deleteCertificateAsync(name).get(); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCertificateRequest actualRequest = ((DeleteCertificateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCertificateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE]"); + client.deleteCertificateAsync(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 deleteCertificateTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCertificateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteCertificateAsync(name).get(); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCertificateRequest actualRequest = ((DeleteCertificateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCertificateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String name = "name3373707"; + client.deleteCertificateAsync(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 listCertificateMapsTest() throws Exception { + CertificateMap responsesElement = CertificateMap.newBuilder().build(); + ListCertificateMapsResponse expectedResponse = + ListCertificateMapsResponse.newBuilder() + .setNextPageToken("") + .addAllCertificateMaps(Arrays.asList(responsesElement)) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListCertificateMapsPagedResponse pagedListResponse = client.listCertificateMaps(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCertificateMapsList().get(0), resources.get(0)); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCertificateMapsRequest actualRequest = ((ListCertificateMapsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCertificateMapsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listCertificateMaps(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCertificateMapsTest2() throws Exception { + CertificateMap responsesElement = CertificateMap.newBuilder().build(); + ListCertificateMapsResponse expectedResponse = + ListCertificateMapsResponse.newBuilder() + .setNextPageToken("") + .addAllCertificateMaps(Arrays.asList(responsesElement)) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListCertificateMapsPagedResponse pagedListResponse = client.listCertificateMaps(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCertificateMapsList().get(0), resources.get(0)); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCertificateMapsRequest actualRequest = ((ListCertificateMapsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCertificateMapsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listCertificateMaps(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCertificateMapTest() throws Exception { + CertificateMap expectedResponse = + CertificateMap.newBuilder() + .setName( + CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllGclbTargets(new ArrayList()) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + CertificateMapName name = CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]"); + + CertificateMap actualResponse = client.getCertificateMap(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCertificateMapRequest actualRequest = ((GetCertificateMapRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCertificateMapExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + CertificateMapName name = + CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]"); + client.getCertificateMap(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCertificateMapTest2() throws Exception { + CertificateMap expectedResponse = + CertificateMap.newBuilder() + .setName( + CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllGclbTargets(new ArrayList()) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + String name = "name3373707"; + + CertificateMap actualResponse = client.getCertificateMap(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCertificateMapRequest actualRequest = ((GetCertificateMapRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCertificateMapExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String name = "name3373707"; + client.getCertificateMap(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCertificateMapTest() throws Exception { + CertificateMap expectedResponse = + CertificateMap.newBuilder() + .setName( + CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllGclbTargets(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCertificateMapTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + CertificateMap certificateMap = CertificateMap.newBuilder().build(); + String certificateMapId = "certificateMapId1612184640"; + + CertificateMap actualResponse = + client.createCertificateMapAsync(parent, certificateMap, certificateMapId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCertificateMapRequest actualRequest = + ((CreateCertificateMapRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(certificateMap, actualRequest.getCertificateMap()); + Assert.assertEquals(certificateMapId, actualRequest.getCertificateMapId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCertificateMapExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + CertificateMap certificateMap = CertificateMap.newBuilder().build(); + String certificateMapId = "certificateMapId1612184640"; + client.createCertificateMapAsync(parent, certificateMap, certificateMapId).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 createCertificateMapTest2() throws Exception { + CertificateMap expectedResponse = + CertificateMap.newBuilder() + .setName( + CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllGclbTargets(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCertificateMapTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + String parent = "parent-995424086"; + CertificateMap certificateMap = CertificateMap.newBuilder().build(); + String certificateMapId = "certificateMapId1612184640"; + + CertificateMap actualResponse = + client.createCertificateMapAsync(parent, certificateMap, certificateMapId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCertificateMapRequest actualRequest = + ((CreateCertificateMapRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(certificateMap, actualRequest.getCertificateMap()); + Assert.assertEquals(certificateMapId, actualRequest.getCertificateMapId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCertificateMapExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String parent = "parent-995424086"; + CertificateMap certificateMap = CertificateMap.newBuilder().build(); + String certificateMapId = "certificateMapId1612184640"; + client.createCertificateMapAsync(parent, certificateMap, certificateMapId).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 updateCertificateMapTest() throws Exception { + CertificateMap expectedResponse = + CertificateMap.newBuilder() + .setName( + CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllGclbTargets(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateCertificateMapTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + CertificateMap certificateMap = CertificateMap.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + CertificateMap actualResponse = + client.updateCertificateMapAsync(certificateMap, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCertificateMapRequest actualRequest = + ((UpdateCertificateMapRequest) actualRequests.get(0)); + + Assert.assertEquals(certificateMap, actualRequest.getCertificateMap()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateCertificateMapExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + CertificateMap certificateMap = CertificateMap.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCertificateMapAsync(certificateMap, 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 deleteCertificateMapTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCertificateMapTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + CertificateMapName name = CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]"); + + client.deleteCertificateMapAsync(name).get(); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCertificateMapRequest actualRequest = + ((DeleteCertificateMapRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCertificateMapExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + CertificateMapName name = + CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]"); + client.deleteCertificateMapAsync(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 deleteCertificateMapTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCertificateMapTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteCertificateMapAsync(name).get(); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCertificateMapRequest actualRequest = + ((DeleteCertificateMapRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCertificateMapExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String name = "name3373707"; + client.deleteCertificateMapAsync(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 listCertificateMapEntriesTest() throws Exception { + CertificateMapEntry responsesElement = CertificateMapEntry.newBuilder().build(); + ListCertificateMapEntriesResponse expectedResponse = + ListCertificateMapEntriesResponse.newBuilder() + .setNextPageToken("") + .addAllCertificateMapEntries(Arrays.asList(responsesElement)) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + CertificateMapName parent = + CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]"); + + ListCertificateMapEntriesPagedResponse pagedListResponse = + client.listCertificateMapEntries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCertificateMapEntriesList().get(0), resources.get(0)); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCertificateMapEntriesRequest actualRequest = + ((ListCertificateMapEntriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCertificateMapEntriesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + CertificateMapName parent = + CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]"); + client.listCertificateMapEntries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCertificateMapEntriesTest2() throws Exception { + CertificateMapEntry responsesElement = CertificateMapEntry.newBuilder().build(); + ListCertificateMapEntriesResponse expectedResponse = + ListCertificateMapEntriesResponse.newBuilder() + .setNextPageToken("") + .addAllCertificateMapEntries(Arrays.asList(responsesElement)) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListCertificateMapEntriesPagedResponse pagedListResponse = + client.listCertificateMapEntries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCertificateMapEntriesList().get(0), resources.get(0)); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCertificateMapEntriesRequest actualRequest = + ((ListCertificateMapEntriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCertificateMapEntriesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listCertificateMapEntries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCertificateMapEntryTest() throws Exception { + CertificateMapEntry expectedResponse = + CertificateMapEntry.newBuilder() + .setName( + CertificateMapEntryName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllCertificates(new ArrayList()) + .setState(ServingState.forNumber(0)) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + CertificateMapEntryName name = + CertificateMapEntryName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]"); + + CertificateMapEntry actualResponse = client.getCertificateMapEntry(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCertificateMapEntryRequest actualRequest = + ((GetCertificateMapEntryRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCertificateMapEntryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + CertificateMapEntryName name = + CertificateMapEntryName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]"); + client.getCertificateMapEntry(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCertificateMapEntryTest2() throws Exception { + CertificateMapEntry expectedResponse = + CertificateMapEntry.newBuilder() + .setName( + CertificateMapEntryName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllCertificates(new ArrayList()) + .setState(ServingState.forNumber(0)) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + String name = "name3373707"; + + CertificateMapEntry actualResponse = client.getCertificateMapEntry(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCertificateMapEntryRequest actualRequest = + ((GetCertificateMapEntryRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCertificateMapEntryExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String name = "name3373707"; + client.getCertificateMapEntry(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCertificateMapEntryTest() throws Exception { + CertificateMapEntry expectedResponse = + CertificateMapEntry.newBuilder() + .setName( + CertificateMapEntryName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllCertificates(new ArrayList()) + .setState(ServingState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCertificateMapEntryTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + CertificateMapName parent = + CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]"); + CertificateMapEntry certificateMapEntry = CertificateMapEntry.newBuilder().build(); + String certificateMapEntryId = "certificateMapEntryId-859079384"; + + CertificateMapEntry actualResponse = + client + .createCertificateMapEntryAsync(parent, certificateMapEntry, certificateMapEntryId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCertificateMapEntryRequest actualRequest = + ((CreateCertificateMapEntryRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(certificateMapEntry, actualRequest.getCertificateMapEntry()); + Assert.assertEquals(certificateMapEntryId, actualRequest.getCertificateMapEntryId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCertificateMapEntryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + CertificateMapName parent = + CertificateMapName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]"); + CertificateMapEntry certificateMapEntry = CertificateMapEntry.newBuilder().build(); + String certificateMapEntryId = "certificateMapEntryId-859079384"; + client + .createCertificateMapEntryAsync(parent, certificateMapEntry, certificateMapEntryId) + .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 createCertificateMapEntryTest2() throws Exception { + CertificateMapEntry expectedResponse = + CertificateMapEntry.newBuilder() + .setName( + CertificateMapEntryName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllCertificates(new ArrayList()) + .setState(ServingState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCertificateMapEntryTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + String parent = "parent-995424086"; + CertificateMapEntry certificateMapEntry = CertificateMapEntry.newBuilder().build(); + String certificateMapEntryId = "certificateMapEntryId-859079384"; + + CertificateMapEntry actualResponse = + client + .createCertificateMapEntryAsync(parent, certificateMapEntry, certificateMapEntryId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCertificateMapEntryRequest actualRequest = + ((CreateCertificateMapEntryRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(certificateMapEntry, actualRequest.getCertificateMapEntry()); + Assert.assertEquals(certificateMapEntryId, actualRequest.getCertificateMapEntryId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCertificateMapEntryExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String parent = "parent-995424086"; + CertificateMapEntry certificateMapEntry = CertificateMapEntry.newBuilder().build(); + String certificateMapEntryId = "certificateMapEntryId-859079384"; + client + .createCertificateMapEntryAsync(parent, certificateMapEntry, certificateMapEntryId) + .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 updateCertificateMapEntryTest() throws Exception { + CertificateMapEntry expectedResponse = + CertificateMapEntry.newBuilder() + .setName( + CertificateMapEntryName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllCertificates(new ArrayList()) + .setState(ServingState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateCertificateMapEntryTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + CertificateMapEntry certificateMapEntry = CertificateMapEntry.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + CertificateMapEntry actualResponse = + client.updateCertificateMapEntryAsync(certificateMapEntry, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCertificateMapEntryRequest actualRequest = + ((UpdateCertificateMapEntryRequest) actualRequests.get(0)); + + Assert.assertEquals(certificateMapEntry, actualRequest.getCertificateMapEntry()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateCertificateMapEntryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + CertificateMapEntry certificateMapEntry = CertificateMapEntry.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCertificateMapEntryAsync(certificateMapEntry, 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 deleteCertificateMapEntryTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCertificateMapEntryTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + CertificateMapEntryName name = + CertificateMapEntryName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]"); + + client.deleteCertificateMapEntryAsync(name).get(); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCertificateMapEntryRequest actualRequest = + ((DeleteCertificateMapEntryRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCertificateMapEntryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + CertificateMapEntryName name = + CertificateMapEntryName.of( + "[PROJECT]", "[LOCATION]", "[CERTIFICATE_MAP]", "[CERTIFICATE_MAP_ENTRY]"); + client.deleteCertificateMapEntryAsync(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 deleteCertificateMapEntryTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCertificateMapEntryTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteCertificateMapEntryAsync(name).get(); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCertificateMapEntryRequest actualRequest = + ((DeleteCertificateMapEntryRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCertificateMapEntryExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String name = "name3373707"; + client.deleteCertificateMapEntryAsync(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 listDnsAuthorizationsTest() throws Exception { + DnsAuthorization responsesElement = DnsAuthorization.newBuilder().build(); + ListDnsAuthorizationsResponse expectedResponse = + ListDnsAuthorizationsResponse.newBuilder() + .setNextPageToken("") + .addAllDnsAuthorizations(Arrays.asList(responsesElement)) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDnsAuthorizationsPagedResponse pagedListResponse = client.listDnsAuthorizations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDnsAuthorizationsList().get(0), resources.get(0)); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDnsAuthorizationsRequest actualRequest = + ((ListDnsAuthorizationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDnsAuthorizationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDnsAuthorizations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDnsAuthorizationsTest2() throws Exception { + DnsAuthorization responsesElement = DnsAuthorization.newBuilder().build(); + ListDnsAuthorizationsResponse expectedResponse = + ListDnsAuthorizationsResponse.newBuilder() + .setNextPageToken("") + .addAllDnsAuthorizations(Arrays.asList(responsesElement)) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDnsAuthorizationsPagedResponse pagedListResponse = client.listDnsAuthorizations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDnsAuthorizationsList().get(0), resources.get(0)); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDnsAuthorizationsRequest actualRequest = + ((ListDnsAuthorizationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDnsAuthorizationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDnsAuthorizations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDnsAuthorizationTest() throws Exception { + DnsAuthorization expectedResponse = + DnsAuthorization.newBuilder() + .setName( + DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setDomain("domain-1326197564") + .setDnsResourceRecord(DnsAuthorization.DnsResourceRecord.newBuilder().build()) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + DnsAuthorizationName name = + DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]"); + + DnsAuthorization actualResponse = client.getDnsAuthorization(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDnsAuthorizationRequest actualRequest = ((GetDnsAuthorizationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDnsAuthorizationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + DnsAuthorizationName name = + DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]"); + client.getDnsAuthorization(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDnsAuthorizationTest2() throws Exception { + DnsAuthorization expectedResponse = + DnsAuthorization.newBuilder() + .setName( + DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setDomain("domain-1326197564") + .setDnsResourceRecord(DnsAuthorization.DnsResourceRecord.newBuilder().build()) + .build(); + mockCertificateManager.addResponse(expectedResponse); + + String name = "name3373707"; + + DnsAuthorization actualResponse = client.getDnsAuthorization(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDnsAuthorizationRequest actualRequest = ((GetDnsAuthorizationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDnsAuthorizationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String name = "name3373707"; + client.getDnsAuthorization(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDnsAuthorizationTest() throws Exception { + DnsAuthorization expectedResponse = + DnsAuthorization.newBuilder() + .setName( + DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setDomain("domain-1326197564") + .setDnsResourceRecord(DnsAuthorization.DnsResourceRecord.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDnsAuthorizationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DnsAuthorization dnsAuthorization = DnsAuthorization.newBuilder().build(); + String dnsAuthorizationId = "dnsAuthorizationId-2054763765"; + + DnsAuthorization actualResponse = + client.createDnsAuthorizationAsync(parent, dnsAuthorization, dnsAuthorizationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDnsAuthorizationRequest actualRequest = + ((CreateDnsAuthorizationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dnsAuthorization, actualRequest.getDnsAuthorization()); + Assert.assertEquals(dnsAuthorizationId, actualRequest.getDnsAuthorizationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDnsAuthorizationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DnsAuthorization dnsAuthorization = DnsAuthorization.newBuilder().build(); + String dnsAuthorizationId = "dnsAuthorizationId-2054763765"; + client.createDnsAuthorizationAsync(parent, dnsAuthorization, dnsAuthorizationId).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 createDnsAuthorizationTest2() throws Exception { + DnsAuthorization expectedResponse = + DnsAuthorization.newBuilder() + .setName( + DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setDomain("domain-1326197564") + .setDnsResourceRecord(DnsAuthorization.DnsResourceRecord.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDnsAuthorizationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + String parent = "parent-995424086"; + DnsAuthorization dnsAuthorization = DnsAuthorization.newBuilder().build(); + String dnsAuthorizationId = "dnsAuthorizationId-2054763765"; + + DnsAuthorization actualResponse = + client.createDnsAuthorizationAsync(parent, dnsAuthorization, dnsAuthorizationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDnsAuthorizationRequest actualRequest = + ((CreateDnsAuthorizationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dnsAuthorization, actualRequest.getDnsAuthorization()); + Assert.assertEquals(dnsAuthorizationId, actualRequest.getDnsAuthorizationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDnsAuthorizationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String parent = "parent-995424086"; + DnsAuthorization dnsAuthorization = DnsAuthorization.newBuilder().build(); + String dnsAuthorizationId = "dnsAuthorizationId-2054763765"; + client.createDnsAuthorizationAsync(parent, dnsAuthorization, dnsAuthorizationId).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 updateDnsAuthorizationTest() throws Exception { + DnsAuthorization expectedResponse = + DnsAuthorization.newBuilder() + .setName( + DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setDomain("domain-1326197564") + .setDnsResourceRecord(DnsAuthorization.DnsResourceRecord.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDnsAuthorizationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + DnsAuthorization dnsAuthorization = DnsAuthorization.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DnsAuthorization actualResponse = + client.updateDnsAuthorizationAsync(dnsAuthorization, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDnsAuthorizationRequest actualRequest = + ((UpdateDnsAuthorizationRequest) actualRequests.get(0)); + + Assert.assertEquals(dnsAuthorization, actualRequest.getDnsAuthorization()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDnsAuthorizationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + DnsAuthorization dnsAuthorization = DnsAuthorization.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDnsAuthorizationAsync(dnsAuthorization, 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 deleteDnsAuthorizationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDnsAuthorizationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + DnsAuthorizationName name = + DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]"); + + client.deleteDnsAuthorizationAsync(name).get(); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDnsAuthorizationRequest actualRequest = + ((DeleteDnsAuthorizationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDnsAuthorizationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + DnsAuthorizationName name = + DnsAuthorizationName.of("[PROJECT]", "[LOCATION]", "[DNS_AUTHORIZATION]"); + client.deleteDnsAuthorizationAsync(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 deleteDnsAuthorizationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDnsAuthorizationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCertificateManager.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteDnsAuthorizationAsync(name).get(); + + List actualRequests = mockCertificateManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDnsAuthorizationRequest actualRequest = + ((DeleteDnsAuthorizationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDnsAuthorizationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCertificateManager.addException(exception); + + try { + String name = "name3373707"; + client.deleteDnsAuthorizationAsync(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()); + } + } +} diff --git a/google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/MockCertificateManager.java b/google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/MockCertificateManager.java new file mode 100644 index 0000000..52cd1df --- /dev/null +++ b/google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/MockCertificateManager.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.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 MockCertificateManager implements MockGrpcService { + private final MockCertificateManagerImpl serviceImpl; + + public MockCertificateManager() { + serviceImpl = new MockCertificateManagerImpl(); + } + + @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-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/MockCertificateManagerImpl.java b/google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/MockCertificateManagerImpl.java new file mode 100644 index 0000000..b747f6f --- /dev/null +++ b/google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/MockCertificateManagerImpl.java @@ -0,0 +1,484 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.certificatemanager.v1.CertificateManagerGrpc.CertificateManagerImplBase; +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 MockCertificateManagerImpl extends CertificateManagerImplBase { + private List requests; + private Queue responses; + + public MockCertificateManagerImpl() { + 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 listCertificates( + ListCertificatesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListCertificatesResponse) { + requests.add(request); + responseObserver.onNext(((ListCertificatesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListCertificates, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListCertificatesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCertificate( + GetCertificateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Certificate) { + requests.add(request); + responseObserver.onNext(((Certificate) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetCertificate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Certificate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createCertificate( + CreateCertificateRequest 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 CreateCertificate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateCertificate( + UpdateCertificateRequest 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 UpdateCertificate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteCertificate( + DeleteCertificateRequest 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 DeleteCertificate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listCertificateMaps( + ListCertificateMapsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListCertificateMapsResponse) { + requests.add(request); + responseObserver.onNext(((ListCertificateMapsResponse) 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 ListCertificateMaps, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListCertificateMapsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCertificateMap( + GetCertificateMapRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CertificateMap) { + requests.add(request); + responseObserver.onNext(((CertificateMap) 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 GetCertificateMap, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CertificateMap.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createCertificateMap( + CreateCertificateMapRequest 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 CreateCertificateMap, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateCertificateMap( + UpdateCertificateMapRequest 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 UpdateCertificateMap, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteCertificateMap( + DeleteCertificateMapRequest 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 DeleteCertificateMap, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listCertificateMapEntries( + ListCertificateMapEntriesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListCertificateMapEntriesResponse) { + requests.add(request); + responseObserver.onNext(((ListCertificateMapEntriesResponse) 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 ListCertificateMapEntries, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListCertificateMapEntriesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCertificateMapEntry( + GetCertificateMapEntryRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CertificateMapEntry) { + requests.add(request); + responseObserver.onNext(((CertificateMapEntry) 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 GetCertificateMapEntry, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CertificateMapEntry.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createCertificateMapEntry( + CreateCertificateMapEntryRequest 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 CreateCertificateMapEntry, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateCertificateMapEntry( + UpdateCertificateMapEntryRequest 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 UpdateCertificateMapEntry, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteCertificateMapEntry( + DeleteCertificateMapEntryRequest 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 DeleteCertificateMapEntry, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDnsAuthorizations( + ListDnsAuthorizationsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDnsAuthorizationsResponse) { + requests.add(request); + responseObserver.onNext(((ListDnsAuthorizationsResponse) 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 ListDnsAuthorizations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDnsAuthorizationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDnsAuthorization( + GetDnsAuthorizationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DnsAuthorization) { + requests.add(request); + responseObserver.onNext(((DnsAuthorization) 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 GetDnsAuthorization, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DnsAuthorization.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDnsAuthorization( + CreateDnsAuthorizationRequest 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 CreateDnsAuthorization, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDnsAuthorization( + UpdateDnsAuthorizationRequest 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 UpdateDnsAuthorization, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDnsAuthorization( + DeleteDnsAuthorizationRequest 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 DeleteDnsAuthorization, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/grpc-google-cloud-certificate-manager-v1/pom.xml b/grpc-google-cloud-certificate-manager-v1/pom.xml new file mode 100644 index 0000000..e630d16 --- /dev/null +++ b/grpc-google-cloud-certificate-manager-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-certificate-manager-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-certificate-manager-v1 + GRPC library for google-cloud-certificate-manager + + com.google.cloud + google-cloud-certificate-manager-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-certificate-manager-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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerGrpc.java b/grpc-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerGrpc.java new file mode 100644 index 0000000..27f616e --- /dev/null +++ b/grpc-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerGrpc.java @@ -0,0 +1,2783 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.certificatemanager.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * API Overview
+ * Certificates Manager API allows customers to see and manage all their TLS
+ * certificates.
+ * Certificates Manager API service provides methods to manage certificates,
+ * group them into collections, and create serving configuration that can be
+ * easily applied to other Cloud resources e.g. Target Proxies.
+ * Data Model
+ * The Certificates Manager service exposes the following resources:
+ * * `Certificate` which describes a single TLS certificate.
+ * * `CertificateMap` which describes a collection of certificates that can be
+ * attached to a target resource.
+ * * `CertificateMapEntry` which describes a single configuration entry that
+ * consists of a SNI and a group of certificates. It's a subresource of
+ * CertificateMap.
+ * Certificate, CertificateMap and CertificateMapEntry IDs
+ * have to match "^[a-z0-9-]{1,63}$" regexp, which means that
+ * - only lower case letters, digits, and hyphen are allowed
+ * - length of the resource ID has to be in [1,63] range.
+ * Provides methods to manage Cloud Certificate Manager entities.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/certificatemanager/v1/certificate_manager.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class CertificateManagerGrpc { + + private CertificateManagerGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.certificatemanager.v1.CertificateManager"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListCertificatesRequest, + com.google.cloud.certificatemanager.v1.ListCertificatesResponse> + getListCertificatesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCertificates", + requestType = com.google.cloud.certificatemanager.v1.ListCertificatesRequest.class, + responseType = com.google.cloud.certificatemanager.v1.ListCertificatesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListCertificatesRequest, + com.google.cloud.certificatemanager.v1.ListCertificatesResponse> + getListCertificatesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListCertificatesRequest, + com.google.cloud.certificatemanager.v1.ListCertificatesResponse> + getListCertificatesMethod; + if ((getListCertificatesMethod = CertificateManagerGrpc.getListCertificatesMethod) == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getListCertificatesMethod = CertificateManagerGrpc.getListCertificatesMethod) + == null) { + CertificateManagerGrpc.getListCertificatesMethod = + getListCertificatesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCertificates")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.ListCertificatesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.ListCertificatesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("ListCertificates")) + .build(); + } + } + } + return getListCertificatesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetCertificateRequest, + com.google.cloud.certificatemanager.v1.Certificate> + getGetCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCertificate", + requestType = com.google.cloud.certificatemanager.v1.GetCertificateRequest.class, + responseType = com.google.cloud.certificatemanager.v1.Certificate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetCertificateRequest, + com.google.cloud.certificatemanager.v1.Certificate> + getGetCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetCertificateRequest, + com.google.cloud.certificatemanager.v1.Certificate> + getGetCertificateMethod; + if ((getGetCertificateMethod = CertificateManagerGrpc.getGetCertificateMethod) == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getGetCertificateMethod = CertificateManagerGrpc.getGetCertificateMethod) == null) { + CertificateManagerGrpc.getGetCertificateMethod = + getGetCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.GetCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.Certificate + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("GetCertificate")) + .build(); + } + } + } + return getGetCertificateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateCertificateRequest, + com.google.longrunning.Operation> + getCreateCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCertificate", + requestType = com.google.cloud.certificatemanager.v1.CreateCertificateRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateCertificateRequest, + com.google.longrunning.Operation> + getCreateCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateCertificateRequest, + com.google.longrunning.Operation> + getCreateCertificateMethod; + if ((getCreateCertificateMethod = CertificateManagerGrpc.getCreateCertificateMethod) == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getCreateCertificateMethod = CertificateManagerGrpc.getCreateCertificateMethod) + == null) { + CertificateManagerGrpc.getCreateCertificateMethod = + getCreateCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.CreateCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("CreateCertificate")) + .build(); + } + } + } + return getCreateCertificateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest, + com.google.longrunning.Operation> + getUpdateCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCertificate", + requestType = com.google.cloud.certificatemanager.v1.UpdateCertificateRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest, + com.google.longrunning.Operation> + getUpdateCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest, + com.google.longrunning.Operation> + getUpdateCertificateMethod; + if ((getUpdateCertificateMethod = CertificateManagerGrpc.getUpdateCertificateMethod) == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getUpdateCertificateMethod = CertificateManagerGrpc.getUpdateCertificateMethod) + == null) { + CertificateManagerGrpc.getUpdateCertificateMethod = + getUpdateCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("UpdateCertificate")) + .build(); + } + } + } + return getUpdateCertificateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest, + com.google.longrunning.Operation> + getDeleteCertificateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCertificate", + requestType = com.google.cloud.certificatemanager.v1.DeleteCertificateRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest, + com.google.longrunning.Operation> + getDeleteCertificateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest, + com.google.longrunning.Operation> + getDeleteCertificateMethod; + if ((getDeleteCertificateMethod = CertificateManagerGrpc.getDeleteCertificateMethod) == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getDeleteCertificateMethod = CertificateManagerGrpc.getDeleteCertificateMethod) + == null) { + CertificateManagerGrpc.getDeleteCertificateMethod = + getDeleteCertificateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCertificate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("DeleteCertificate")) + .build(); + } + } + } + return getDeleteCertificateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest, + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse> + getListCertificateMapsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCertificateMaps", + requestType = com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest.class, + responseType = com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest, + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse> + getListCertificateMapsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest, + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse> + getListCertificateMapsMethod; + if ((getListCertificateMapsMethod = CertificateManagerGrpc.getListCertificateMapsMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getListCertificateMapsMethod = CertificateManagerGrpc.getListCertificateMapsMethod) + == null) { + CertificateManagerGrpc.getListCertificateMapsMethod = + getListCertificateMapsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListCertificateMaps")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("ListCertificateMaps")) + .build(); + } + } + } + return getListCertificateMapsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest, + com.google.cloud.certificatemanager.v1.CertificateMap> + getGetCertificateMapMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCertificateMap", + requestType = com.google.cloud.certificatemanager.v1.GetCertificateMapRequest.class, + responseType = com.google.cloud.certificatemanager.v1.CertificateMap.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest, + com.google.cloud.certificatemanager.v1.CertificateMap> + getGetCertificateMapMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest, + com.google.cloud.certificatemanager.v1.CertificateMap> + getGetCertificateMapMethod; + if ((getGetCertificateMapMethod = CertificateManagerGrpc.getGetCertificateMapMethod) == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getGetCertificateMapMethod = CertificateManagerGrpc.getGetCertificateMapMethod) + == null) { + CertificateManagerGrpc.getGetCertificateMapMethod = + getGetCertificateMapMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCertificateMap")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.CertificateMap + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("GetCertificateMap")) + .build(); + } + } + } + return getGetCertificateMapMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest, + com.google.longrunning.Operation> + getCreateCertificateMapMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCertificateMap", + requestType = com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest, + com.google.longrunning.Operation> + getCreateCertificateMapMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest, + com.google.longrunning.Operation> + getCreateCertificateMapMethod; + if ((getCreateCertificateMapMethod = CertificateManagerGrpc.getCreateCertificateMapMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getCreateCertificateMapMethod = CertificateManagerGrpc.getCreateCertificateMapMethod) + == null) { + CertificateManagerGrpc.getCreateCertificateMapMethod = + getCreateCertificateMapMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateCertificateMap")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("CreateCertificateMap")) + .build(); + } + } + } + return getCreateCertificateMapMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest, + com.google.longrunning.Operation> + getUpdateCertificateMapMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCertificateMap", + requestType = com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest, + com.google.longrunning.Operation> + getUpdateCertificateMapMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest, + com.google.longrunning.Operation> + getUpdateCertificateMapMethod; + if ((getUpdateCertificateMapMethod = CertificateManagerGrpc.getUpdateCertificateMapMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getUpdateCertificateMapMethod = CertificateManagerGrpc.getUpdateCertificateMapMethod) + == null) { + CertificateManagerGrpc.getUpdateCertificateMapMethod = + getUpdateCertificateMapMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateCertificateMap")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("UpdateCertificateMap")) + .build(); + } + } + } + return getUpdateCertificateMapMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest, + com.google.longrunning.Operation> + getDeleteCertificateMapMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCertificateMap", + requestType = com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest, + com.google.longrunning.Operation> + getDeleteCertificateMapMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest, + com.google.longrunning.Operation> + getDeleteCertificateMapMethod; + if ((getDeleteCertificateMapMethod = CertificateManagerGrpc.getDeleteCertificateMapMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getDeleteCertificateMapMethod = CertificateManagerGrpc.getDeleteCertificateMapMethod) + == null) { + CertificateManagerGrpc.getDeleteCertificateMapMethod = + getDeleteCertificateMapMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteCertificateMap")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("DeleteCertificateMap")) + .build(); + } + } + } + return getDeleteCertificateMapMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest, + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse> + getListCertificateMapEntriesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCertificateMapEntries", + requestType = com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest.class, + responseType = com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest, + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse> + getListCertificateMapEntriesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest, + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse> + getListCertificateMapEntriesMethod; + if ((getListCertificateMapEntriesMethod = + CertificateManagerGrpc.getListCertificateMapEntriesMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getListCertificateMapEntriesMethod = + CertificateManagerGrpc.getListCertificateMapEntriesMethod) + == null) { + CertificateManagerGrpc.getListCertificateMapEntriesMethod = + getListCertificateMapEntriesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListCertificateMapEntries")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1 + .ListCertificateMapEntriesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1 + .ListCertificateMapEntriesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier( + "ListCertificateMapEntries")) + .build(); + } + } + } + return getListCertificateMapEntriesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest, + com.google.cloud.certificatemanager.v1.CertificateMapEntry> + getGetCertificateMapEntryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCertificateMapEntry", + requestType = com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest.class, + responseType = com.google.cloud.certificatemanager.v1.CertificateMapEntry.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest, + com.google.cloud.certificatemanager.v1.CertificateMapEntry> + getGetCertificateMapEntryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest, + com.google.cloud.certificatemanager.v1.CertificateMapEntry> + getGetCertificateMapEntryMethod; + if ((getGetCertificateMapEntryMethod = CertificateManagerGrpc.getGetCertificateMapEntryMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getGetCertificateMapEntryMethod = + CertificateManagerGrpc.getGetCertificateMapEntryMethod) + == null) { + CertificateManagerGrpc.getGetCertificateMapEntryMethod = + getGetCertificateMapEntryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetCertificateMapEntry")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.CertificateMapEntry + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("GetCertificateMapEntry")) + .build(); + } + } + } + return getGetCertificateMapEntryMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest, + com.google.longrunning.Operation> + getCreateCertificateMapEntryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCertificateMapEntry", + requestType = com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest, + com.google.longrunning.Operation> + getCreateCertificateMapEntryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest, + com.google.longrunning.Operation> + getCreateCertificateMapEntryMethod; + if ((getCreateCertificateMapEntryMethod = + CertificateManagerGrpc.getCreateCertificateMapEntryMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getCreateCertificateMapEntryMethod = + CertificateManagerGrpc.getCreateCertificateMapEntryMethod) + == null) { + CertificateManagerGrpc.getCreateCertificateMapEntryMethod = + getCreateCertificateMapEntryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateCertificateMapEntry")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1 + .CreateCertificateMapEntryRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier( + "CreateCertificateMapEntry")) + .build(); + } + } + } + return getCreateCertificateMapEntryMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest, + com.google.longrunning.Operation> + getUpdateCertificateMapEntryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCertificateMapEntry", + requestType = com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest, + com.google.longrunning.Operation> + getUpdateCertificateMapEntryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest, + com.google.longrunning.Operation> + getUpdateCertificateMapEntryMethod; + if ((getUpdateCertificateMapEntryMethod = + CertificateManagerGrpc.getUpdateCertificateMapEntryMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getUpdateCertificateMapEntryMethod = + CertificateManagerGrpc.getUpdateCertificateMapEntryMethod) + == null) { + CertificateManagerGrpc.getUpdateCertificateMapEntryMethod = + getUpdateCertificateMapEntryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateCertificateMapEntry")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1 + .UpdateCertificateMapEntryRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier( + "UpdateCertificateMapEntry")) + .build(); + } + } + } + return getUpdateCertificateMapEntryMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest, + com.google.longrunning.Operation> + getDeleteCertificateMapEntryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCertificateMapEntry", + requestType = com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest, + com.google.longrunning.Operation> + getDeleteCertificateMapEntryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest, + com.google.longrunning.Operation> + getDeleteCertificateMapEntryMethod; + if ((getDeleteCertificateMapEntryMethod = + CertificateManagerGrpc.getDeleteCertificateMapEntryMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getDeleteCertificateMapEntryMethod = + CertificateManagerGrpc.getDeleteCertificateMapEntryMethod) + == null) { + CertificateManagerGrpc.getDeleteCertificateMapEntryMethod = + getDeleteCertificateMapEntryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteCertificateMapEntry")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1 + .DeleteCertificateMapEntryRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier( + "DeleteCertificateMapEntry")) + .build(); + } + } + } + return getDeleteCertificateMapEntryMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest, + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse> + getListDnsAuthorizationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDnsAuthorizations", + requestType = com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest.class, + responseType = com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest, + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse> + getListDnsAuthorizationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest, + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse> + getListDnsAuthorizationsMethod; + if ((getListDnsAuthorizationsMethod = CertificateManagerGrpc.getListDnsAuthorizationsMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getListDnsAuthorizationsMethod = CertificateManagerGrpc.getListDnsAuthorizationsMethod) + == null) { + CertificateManagerGrpc.getListDnsAuthorizationsMethod = + getListDnsAuthorizationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListDnsAuthorizations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("ListDnsAuthorizations")) + .build(); + } + } + } + return getListDnsAuthorizationsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest, + com.google.cloud.certificatemanager.v1.DnsAuthorization> + getGetDnsAuthorizationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDnsAuthorization", + requestType = com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest.class, + responseType = com.google.cloud.certificatemanager.v1.DnsAuthorization.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest, + com.google.cloud.certificatemanager.v1.DnsAuthorization> + getGetDnsAuthorizationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest, + com.google.cloud.certificatemanager.v1.DnsAuthorization> + getGetDnsAuthorizationMethod; + if ((getGetDnsAuthorizationMethod = CertificateManagerGrpc.getGetDnsAuthorizationMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getGetDnsAuthorizationMethod = CertificateManagerGrpc.getGetDnsAuthorizationMethod) + == null) { + CertificateManagerGrpc.getGetDnsAuthorizationMethod = + getGetDnsAuthorizationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetDnsAuthorization")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.DnsAuthorization + .getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("GetDnsAuthorization")) + .build(); + } + } + } + return getGetDnsAuthorizationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest, + com.google.longrunning.Operation> + getCreateDnsAuthorizationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDnsAuthorization", + requestType = com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest, + com.google.longrunning.Operation> + getCreateDnsAuthorizationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest, + com.google.longrunning.Operation> + getCreateDnsAuthorizationMethod; + if ((getCreateDnsAuthorizationMethod = CertificateManagerGrpc.getCreateDnsAuthorizationMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getCreateDnsAuthorizationMethod = + CertificateManagerGrpc.getCreateDnsAuthorizationMethod) + == null) { + CertificateManagerGrpc.getCreateDnsAuthorizationMethod = + getCreateDnsAuthorizationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateDnsAuthorization")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("CreateDnsAuthorization")) + .build(); + } + } + } + return getCreateDnsAuthorizationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest, + com.google.longrunning.Operation> + getUpdateDnsAuthorizationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDnsAuthorization", + requestType = com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest, + com.google.longrunning.Operation> + getUpdateDnsAuthorizationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest, + com.google.longrunning.Operation> + getUpdateDnsAuthorizationMethod; + if ((getUpdateDnsAuthorizationMethod = CertificateManagerGrpc.getUpdateDnsAuthorizationMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getUpdateDnsAuthorizationMethod = + CertificateManagerGrpc.getUpdateDnsAuthorizationMethod) + == null) { + CertificateManagerGrpc.getUpdateDnsAuthorizationMethod = + getUpdateDnsAuthorizationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateDnsAuthorization")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("UpdateDnsAuthorization")) + .build(); + } + } + } + return getUpdateDnsAuthorizationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest, + com.google.longrunning.Operation> + getDeleteDnsAuthorizationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDnsAuthorization", + requestType = com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest, + com.google.longrunning.Operation> + getDeleteDnsAuthorizationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest, + com.google.longrunning.Operation> + getDeleteDnsAuthorizationMethod; + if ((getDeleteDnsAuthorizationMethod = CertificateManagerGrpc.getDeleteDnsAuthorizationMethod) + == null) { + synchronized (CertificateManagerGrpc.class) { + if ((getDeleteDnsAuthorizationMethod = + CertificateManagerGrpc.getDeleteDnsAuthorizationMethod) + == null) { + CertificateManagerGrpc.getDeleteDnsAuthorizationMethod = + getDeleteDnsAuthorizationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteDnsAuthorization")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CertificateManagerMethodDescriptorSupplier("DeleteDnsAuthorization")) + .build(); + } + } + } + return getDeleteDnsAuthorizationMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CertificateManagerStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CertificateManagerStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateManagerStub(channel, callOptions); + } + }; + return CertificateManagerStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CertificateManagerBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CertificateManagerBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateManagerBlockingStub(channel, callOptions); + } + }; + return CertificateManagerBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CertificateManagerFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CertificateManagerFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateManagerFutureStub(channel, callOptions); + } + }; + return CertificateManagerFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * API Overview
+   * Certificates Manager API allows customers to see and manage all their TLS
+   * certificates.
+   * Certificates Manager API service provides methods to manage certificates,
+   * group them into collections, and create serving configuration that can be
+   * easily applied to other Cloud resources e.g. Target Proxies.
+   * Data Model
+   * The Certificates Manager service exposes the following resources:
+   * * `Certificate` which describes a single TLS certificate.
+   * * `CertificateMap` which describes a collection of certificates that can be
+   * attached to a target resource.
+   * * `CertificateMapEntry` which describes a single configuration entry that
+   * consists of a SNI and a group of certificates. It's a subresource of
+   * CertificateMap.
+   * Certificate, CertificateMap and CertificateMapEntry IDs
+   * have to match "^[a-z0-9-]{1,63}$" regexp, which means that
+   * - only lower case letters, digits, and hyphen are allowed
+   * - length of the resource ID has to be in [1,63] range.
+   * Provides methods to manage Cloud Certificate Manager entities.
+   * 
+ */ + public abstract static class CertificateManagerImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists Certificates in a given project and location.
+     * 
+ */ + public void listCertificates( + com.google.cloud.certificatemanager.v1.ListCertificatesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListCertificatesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Certificate.
+     * 
+ */ + public void getCertificate( + com.google.cloud.certificatemanager.v1.GetCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetCertificateMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Certificate in a given project and location.
+     * 
+ */ + public void createCertificate( + com.google.cloud.certificatemanager.v1.CreateCertificateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateCertificateMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a Certificate.
+     * 
+ */ + public void updateCertificate( + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateCertificateMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Certificate.
+     * 
+ */ + public void deleteCertificate( + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteCertificateMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists CertificateMaps in a given project and location.
+     * 
+ */ + public void listCertificateMaps( + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListCertificateMapsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single CertificateMap.
+     * 
+ */ + public void getCertificateMap( + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetCertificateMapMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new CertificateMap in a given project and location.
+     * 
+ */ + public void createCertificateMap( + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateCertificateMapMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a CertificateMap.
+     * 
+ */ + public void updateCertificateMap( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateCertificateMapMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single CertificateMap. A Certificate Map can't be deleted
+     * if it contains Certificate Map Entries. Remove all the entries from
+     * the map before calling this method.
+     * 
+ */ + public void deleteCertificateMap( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteCertificateMapMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists CertificateMapEntries in a given project and location.
+     * 
+ */ + public void listCertificateMapEntries( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListCertificateMapEntriesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single CertificateMapEntry.
+     * 
+ */ + public void getCertificateMapEntry( + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetCertificateMapEntryMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new CertificateMapEntry in a given project and location.
+     * 
+ */ + public void createCertificateMapEntry( + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateCertificateMapEntryMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a CertificateMapEntry.
+     * 
+ */ + public void updateCertificateMapEntry( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateCertificateMapEntryMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single CertificateMapEntry.
+     * 
+ */ + public void deleteCertificateMapEntry( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteCertificateMapEntryMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists DnsAuthorizations in a given project and location.
+     * 
+ */ + public void listDnsAuthorizations( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDnsAuthorizationsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single DnsAuthorization.
+     * 
+ */ + public void getDnsAuthorization( + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDnsAuthorizationMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new DnsAuthorization in a given project and location.
+     * 
+ */ + public void createDnsAuthorization( + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDnsAuthorizationMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a DnsAuthorization.
+     * 
+ */ + public void updateDnsAuthorization( + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDnsAuthorizationMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single DnsAuthorization.
+     * 
+ */ + public void deleteDnsAuthorization( + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDnsAuthorizationMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListCertificatesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.ListCertificatesRequest, + com.google.cloud.certificatemanager.v1.ListCertificatesResponse>( + this, METHODID_LIST_CERTIFICATES))) + .addMethod( + getGetCertificateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.GetCertificateRequest, + com.google.cloud.certificatemanager.v1.Certificate>( + this, METHODID_GET_CERTIFICATE))) + .addMethod( + getCreateCertificateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.CreateCertificateRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_CERTIFICATE))) + .addMethod( + getUpdateCertificateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_CERTIFICATE))) + .addMethod( + getDeleteCertificateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_CERTIFICATE))) + .addMethod( + getListCertificateMapsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest, + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse>( + this, METHODID_LIST_CERTIFICATE_MAPS))) + .addMethod( + getGetCertificateMapMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest, + com.google.cloud.certificatemanager.v1.CertificateMap>( + this, METHODID_GET_CERTIFICATE_MAP))) + .addMethod( + getCreateCertificateMapMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_CERTIFICATE_MAP))) + .addMethod( + getUpdateCertificateMapMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_CERTIFICATE_MAP))) + .addMethod( + getDeleteCertificateMapMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_CERTIFICATE_MAP))) + .addMethod( + getListCertificateMapEntriesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest, + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse>( + this, METHODID_LIST_CERTIFICATE_MAP_ENTRIES))) + .addMethod( + getGetCertificateMapEntryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest, + com.google.cloud.certificatemanager.v1.CertificateMapEntry>( + this, METHODID_GET_CERTIFICATE_MAP_ENTRY))) + .addMethod( + getCreateCertificateMapEntryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest, + com.google.longrunning.Operation>( + this, METHODID_CREATE_CERTIFICATE_MAP_ENTRY))) + .addMethod( + getUpdateCertificateMapEntryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest, + com.google.longrunning.Operation>( + this, METHODID_UPDATE_CERTIFICATE_MAP_ENTRY))) + .addMethod( + getDeleteCertificateMapEntryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest, + com.google.longrunning.Operation>( + this, METHODID_DELETE_CERTIFICATE_MAP_ENTRY))) + .addMethod( + getListDnsAuthorizationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest, + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse>( + this, METHODID_LIST_DNS_AUTHORIZATIONS))) + .addMethod( + getGetDnsAuthorizationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest, + com.google.cloud.certificatemanager.v1.DnsAuthorization>( + this, METHODID_GET_DNS_AUTHORIZATION))) + .addMethod( + getCreateDnsAuthorizationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_DNS_AUTHORIZATION))) + .addMethod( + getUpdateDnsAuthorizationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_DNS_AUTHORIZATION))) + .addMethod( + getDeleteDnsAuthorizationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_DNS_AUTHORIZATION))) + .build(); + } + } + + /** + * + * + *
+   * API Overview
+   * Certificates Manager API allows customers to see and manage all their TLS
+   * certificates.
+   * Certificates Manager API service provides methods to manage certificates,
+   * group them into collections, and create serving configuration that can be
+   * easily applied to other Cloud resources e.g. Target Proxies.
+   * Data Model
+   * The Certificates Manager service exposes the following resources:
+   * * `Certificate` which describes a single TLS certificate.
+   * * `CertificateMap` which describes a collection of certificates that can be
+   * attached to a target resource.
+   * * `CertificateMapEntry` which describes a single configuration entry that
+   * consists of a SNI and a group of certificates. It's a subresource of
+   * CertificateMap.
+   * Certificate, CertificateMap and CertificateMapEntry IDs
+   * have to match "^[a-z0-9-]{1,63}$" regexp, which means that
+   * - only lower case letters, digits, and hyphen are allowed
+   * - length of the resource ID has to be in [1,63] range.
+   * Provides methods to manage Cloud Certificate Manager entities.
+   * 
+ */ + public static final class CertificateManagerStub + extends io.grpc.stub.AbstractAsyncStub { + private CertificateManagerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CertificateManagerStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateManagerStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Certificates in a given project and location.
+     * 
+ */ + public void listCertificates( + com.google.cloud.certificatemanager.v1.ListCertificatesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListCertificatesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Certificate.
+     * 
+ */ + public void getCertificate( + com.google.cloud.certificatemanager.v1.GetCertificateRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Certificate in a given project and location.
+     * 
+ */ + public void createCertificate( + com.google.cloud.certificatemanager.v1.CreateCertificateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a Certificate.
+     * 
+ */ + public void updateCertificate( + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Certificate.
+     * 
+ */ + public void deleteCertificate( + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteCertificateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists CertificateMaps in a given project and location.
+     * 
+ */ + public void listCertificateMaps( + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListCertificateMapsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single CertificateMap.
+     * 
+ */ + public void getCertificateMap( + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetCertificateMapMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new CertificateMap in a given project and location.
+     * 
+ */ + public void createCertificateMap( + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateCertificateMapMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a CertificateMap.
+     * 
+ */ + public void updateCertificateMap( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateCertificateMapMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single CertificateMap. A Certificate Map can't be deleted
+     * if it contains Certificate Map Entries. Remove all the entries from
+     * the map before calling this method.
+     * 
+ */ + public void deleteCertificateMap( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteCertificateMapMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists CertificateMapEntries in a given project and location.
+     * 
+ */ + public void listCertificateMapEntries( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListCertificateMapEntriesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single CertificateMapEntry.
+     * 
+ */ + public void getCertificateMapEntry( + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetCertificateMapEntryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new CertificateMapEntry in a given project and location.
+     * 
+ */ + public void createCertificateMapEntry( + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateCertificateMapEntryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a CertificateMapEntry.
+     * 
+ */ + public void updateCertificateMapEntry( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateCertificateMapEntryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single CertificateMapEntry.
+     * 
+ */ + public void deleteCertificateMapEntry( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteCertificateMapEntryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists DnsAuthorizations in a given project and location.
+     * 
+ */ + public void listDnsAuthorizations( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDnsAuthorizationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single DnsAuthorization.
+     * 
+ */ + public void getDnsAuthorization( + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDnsAuthorizationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new DnsAuthorization in a given project and location.
+     * 
+ */ + public void createDnsAuthorization( + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDnsAuthorizationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a DnsAuthorization.
+     * 
+ */ + public void updateDnsAuthorization( + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDnsAuthorizationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single DnsAuthorization.
+     * 
+ */ + public void deleteDnsAuthorization( + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDnsAuthorizationMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * API Overview
+   * Certificates Manager API allows customers to see and manage all their TLS
+   * certificates.
+   * Certificates Manager API service provides methods to manage certificates,
+   * group them into collections, and create serving configuration that can be
+   * easily applied to other Cloud resources e.g. Target Proxies.
+   * Data Model
+   * The Certificates Manager service exposes the following resources:
+   * * `Certificate` which describes a single TLS certificate.
+   * * `CertificateMap` which describes a collection of certificates that can be
+   * attached to a target resource.
+   * * `CertificateMapEntry` which describes a single configuration entry that
+   * consists of a SNI and a group of certificates. It's a subresource of
+   * CertificateMap.
+   * Certificate, CertificateMap and CertificateMapEntry IDs
+   * have to match "^[a-z0-9-]{1,63}$" regexp, which means that
+   * - only lower case letters, digits, and hyphen are allowed
+   * - length of the resource ID has to be in [1,63] range.
+   * Provides methods to manage Cloud Certificate Manager entities.
+   * 
+ */ + public static final class CertificateManagerBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CertificateManagerBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CertificateManagerBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateManagerBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Certificates in a given project and location.
+     * 
+ */ + public com.google.cloud.certificatemanager.v1.ListCertificatesResponse listCertificates( + com.google.cloud.certificatemanager.v1.ListCertificatesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListCertificatesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Certificate.
+     * 
+ */ + public com.google.cloud.certificatemanager.v1.Certificate getCertificate( + com.google.cloud.certificatemanager.v1.GetCertificateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetCertificateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Certificate in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createCertificate( + com.google.cloud.certificatemanager.v1.CreateCertificateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateCertificateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a Certificate.
+     * 
+ */ + public com.google.longrunning.Operation updateCertificate( + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateCertificateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Certificate.
+     * 
+ */ + public com.google.longrunning.Operation deleteCertificate( + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteCertificateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists CertificateMaps in a given project and location.
+     * 
+ */ + public com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse listCertificateMaps( + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListCertificateMapsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single CertificateMap.
+     * 
+ */ + public com.google.cloud.certificatemanager.v1.CertificateMap getCertificateMap( + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetCertificateMapMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new CertificateMap in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createCertificateMap( + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateCertificateMapMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a CertificateMap.
+     * 
+ */ + public com.google.longrunning.Operation updateCertificateMap( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateCertificateMapMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single CertificateMap. A Certificate Map can't be deleted
+     * if it contains Certificate Map Entries. Remove all the entries from
+     * the map before calling this method.
+     * 
+ */ + public com.google.longrunning.Operation deleteCertificateMap( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteCertificateMapMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists CertificateMapEntries in a given project and location.
+     * 
+ */ + public com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse + listCertificateMapEntries( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListCertificateMapEntriesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single CertificateMapEntry.
+     * 
+ */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntry getCertificateMapEntry( + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetCertificateMapEntryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new CertificateMapEntry in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createCertificateMapEntry( + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateCertificateMapEntryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a CertificateMapEntry.
+     * 
+ */ + public com.google.longrunning.Operation updateCertificateMapEntry( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateCertificateMapEntryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single CertificateMapEntry.
+     * 
+ */ + public com.google.longrunning.Operation deleteCertificateMapEntry( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteCertificateMapEntryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DnsAuthorizations in a given project and location.
+     * 
+ */ + public com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse + listDnsAuthorizations( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDnsAuthorizationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single DnsAuthorization.
+     * 
+ */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization getDnsAuthorization( + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDnsAuthorizationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new DnsAuthorization in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createDnsAuthorization( + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDnsAuthorizationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a DnsAuthorization.
+     * 
+ */ + public com.google.longrunning.Operation updateDnsAuthorization( + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDnsAuthorizationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single DnsAuthorization.
+     * 
+ */ + public com.google.longrunning.Operation deleteDnsAuthorization( + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDnsAuthorizationMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * API Overview
+   * Certificates Manager API allows customers to see and manage all their TLS
+   * certificates.
+   * Certificates Manager API service provides methods to manage certificates,
+   * group them into collections, and create serving configuration that can be
+   * easily applied to other Cloud resources e.g. Target Proxies.
+   * Data Model
+   * The Certificates Manager service exposes the following resources:
+   * * `Certificate` which describes a single TLS certificate.
+   * * `CertificateMap` which describes a collection of certificates that can be
+   * attached to a target resource.
+   * * `CertificateMapEntry` which describes a single configuration entry that
+   * consists of a SNI and a group of certificates. It's a subresource of
+   * CertificateMap.
+   * Certificate, CertificateMap and CertificateMapEntry IDs
+   * have to match "^[a-z0-9-]{1,63}$" regexp, which means that
+   * - only lower case letters, digits, and hyphen are allowed
+   * - length of the resource ID has to be in [1,63] range.
+   * Provides methods to manage Cloud Certificate Manager entities.
+   * 
+ */ + public static final class CertificateManagerFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CertificateManagerFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CertificateManagerFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CertificateManagerFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Certificates in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.certificatemanager.v1.ListCertificatesResponse> + listCertificates(com.google.cloud.certificatemanager.v1.ListCertificatesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListCertificatesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Certificate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.certificatemanager.v1.Certificate> + getCertificate(com.google.cloud.certificatemanager.v1.GetCertificateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetCertificateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Certificate in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCertificate(com.google.cloud.certificatemanager.v1.CreateCertificateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateCertificateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a Certificate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCertificate(com.google.cloud.certificatemanager.v1.UpdateCertificateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateCertificateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Certificate.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCertificate(com.google.cloud.certificatemanager.v1.DeleteCertificateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteCertificateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists CertificateMaps in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse> + listCertificateMaps( + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListCertificateMapsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single CertificateMap.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.certificatemanager.v1.CertificateMap> + getCertificateMap(com.google.cloud.certificatemanager.v1.GetCertificateMapRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetCertificateMapMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new CertificateMap in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCertificateMap( + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateCertificateMapMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a CertificateMap.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCertificateMap( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateCertificateMapMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single CertificateMap. A Certificate Map can't be deleted
+     * if it contains Certificate Map Entries. Remove all the entries from
+     * the map before calling this method.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCertificateMap( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteCertificateMapMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists CertificateMapEntries in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse> + listCertificateMapEntries( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListCertificateMapEntriesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single CertificateMapEntry.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.certificatemanager.v1.CertificateMapEntry> + getCertificateMapEntry( + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetCertificateMapEntryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new CertificateMapEntry in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCertificateMapEntry( + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateCertificateMapEntryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a CertificateMapEntry.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCertificateMapEntry( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateCertificateMapEntryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single CertificateMapEntry.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCertificateMapEntry( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteCertificateMapEntryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists DnsAuthorizations in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse> + listDnsAuthorizations( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDnsAuthorizationsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single DnsAuthorization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.certificatemanager.v1.DnsAuthorization> + getDnsAuthorization( + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDnsAuthorizationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new DnsAuthorization in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDnsAuthorization( + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDnsAuthorizationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a DnsAuthorization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDnsAuthorization( + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDnsAuthorizationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single DnsAuthorization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDnsAuthorization( + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDnsAuthorizationMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_CERTIFICATES = 0; + private static final int METHODID_GET_CERTIFICATE = 1; + private static final int METHODID_CREATE_CERTIFICATE = 2; + private static final int METHODID_UPDATE_CERTIFICATE = 3; + private static final int METHODID_DELETE_CERTIFICATE = 4; + private static final int METHODID_LIST_CERTIFICATE_MAPS = 5; + private static final int METHODID_GET_CERTIFICATE_MAP = 6; + private static final int METHODID_CREATE_CERTIFICATE_MAP = 7; + private static final int METHODID_UPDATE_CERTIFICATE_MAP = 8; + private static final int METHODID_DELETE_CERTIFICATE_MAP = 9; + private static final int METHODID_LIST_CERTIFICATE_MAP_ENTRIES = 10; + private static final int METHODID_GET_CERTIFICATE_MAP_ENTRY = 11; + private static final int METHODID_CREATE_CERTIFICATE_MAP_ENTRY = 12; + private static final int METHODID_UPDATE_CERTIFICATE_MAP_ENTRY = 13; + private static final int METHODID_DELETE_CERTIFICATE_MAP_ENTRY = 14; + private static final int METHODID_LIST_DNS_AUTHORIZATIONS = 15; + private static final int METHODID_GET_DNS_AUTHORIZATION = 16; + private static final int METHODID_CREATE_DNS_AUTHORIZATION = 17; + private static final int METHODID_UPDATE_DNS_AUTHORIZATION = 18; + private static final int METHODID_DELETE_DNS_AUTHORIZATION = 19; + + 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 CertificateManagerImplBase serviceImpl; + private final int methodId; + + MethodHandlers(CertificateManagerImplBase 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_CERTIFICATES: + serviceImpl.listCertificates( + (com.google.cloud.certificatemanager.v1.ListCertificatesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.certificatemanager.v1.ListCertificatesResponse>) + responseObserver); + break; + case METHODID_GET_CERTIFICATE: + serviceImpl.getCertificate( + (com.google.cloud.certificatemanager.v1.GetCertificateRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_CERTIFICATE: + serviceImpl.createCertificate( + (com.google.cloud.certificatemanager.v1.CreateCertificateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CERTIFICATE: + serviceImpl.updateCertificate( + (com.google.cloud.certificatemanager.v1.UpdateCertificateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CERTIFICATE: + serviceImpl.deleteCertificate( + (com.google.cloud.certificatemanager.v1.DeleteCertificateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CERTIFICATE_MAPS: + serviceImpl.listCertificateMaps( + (com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse>) + responseObserver); + break; + case METHODID_GET_CERTIFICATE_MAP: + serviceImpl.getCertificateMap( + (com.google.cloud.certificatemanager.v1.GetCertificateMapRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_CERTIFICATE_MAP: + serviceImpl.createCertificateMap( + (com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CERTIFICATE_MAP: + serviceImpl.updateCertificateMap( + (com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CERTIFICATE_MAP: + serviceImpl.deleteCertificateMap( + (com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CERTIFICATE_MAP_ENTRIES: + serviceImpl.listCertificateMapEntries( + (com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse>) + responseObserver); + break; + case METHODID_GET_CERTIFICATE_MAP_ENTRY: + serviceImpl.getCertificateMapEntry( + (com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.certificatemanager.v1.CertificateMapEntry>) + responseObserver); + break; + case METHODID_CREATE_CERTIFICATE_MAP_ENTRY: + serviceImpl.createCertificateMapEntry( + (com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CERTIFICATE_MAP_ENTRY: + serviceImpl.updateCertificateMapEntry( + (com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CERTIFICATE_MAP_ENTRY: + serviceImpl.deleteCertificateMapEntry( + (com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DNS_AUTHORIZATIONS: + serviceImpl.listDnsAuthorizations( + (com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse>) + responseObserver); + break; + case METHODID_GET_DNS_AUTHORIZATION: + serviceImpl.getDnsAuthorization( + (com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_DNS_AUTHORIZATION: + serviceImpl.createDnsAuthorization( + (com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DNS_AUTHORIZATION: + serviceImpl.updateDnsAuthorization( + (com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DNS_AUTHORIZATION: + serviceImpl.deleteDnsAuthorization( + (com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest) 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 CertificateManagerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CertificateManagerBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CertificateManager"); + } + } + + private static final class CertificateManagerFileDescriptorSupplier + extends CertificateManagerBaseDescriptorSupplier { + CertificateManagerFileDescriptorSupplier() {} + } + + private static final class CertificateManagerMethodDescriptorSupplier + extends CertificateManagerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + CertificateManagerMethodDescriptorSupplier(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 (CertificateManagerGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CertificateManagerFileDescriptorSupplier()) + .addMethod(getListCertificatesMethod()) + .addMethod(getGetCertificateMethod()) + .addMethod(getCreateCertificateMethod()) + .addMethod(getUpdateCertificateMethod()) + .addMethod(getDeleteCertificateMethod()) + .addMethod(getListCertificateMapsMethod()) + .addMethod(getGetCertificateMapMethod()) + .addMethod(getCreateCertificateMapMethod()) + .addMethod(getUpdateCertificateMapMethod()) + .addMethod(getDeleteCertificateMapMethod()) + .addMethod(getListCertificateMapEntriesMethod()) + .addMethod(getGetCertificateMapEntryMethod()) + .addMethod(getCreateCertificateMapEntryMethod()) + .addMethod(getUpdateCertificateMapEntryMethod()) + .addMethod(getDeleteCertificateMapEntryMethod()) + .addMethod(getListDnsAuthorizationsMethod()) + .addMethod(getGetDnsAuthorizationMethod()) + .addMethod(getCreateDnsAuthorizationMethod()) + .addMethod(getUpdateDnsAuthorizationMethod()) + .addMethod(getDeleteDnsAuthorizationMethod()) + .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..38da519 --- /dev/null +++ b/pom.xml @@ -0,0 +1,188 @@ + + + 4.0.0 + com.google.cloud + google-cloud-certificate-manager-parent + pom + 0.0.1-SNAPSHOT + Google Certificate Manager Parent + https://github.com/googleapis/java-certificate-manager + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 1.2.1 + + + + + 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-certificate-manager.git + scm:git:git@github.com:googleapis/java-certificate-manager.git + https://github.com/googleapis/java-certificate-manager + HEAD + + + https://github.com/googleapis/java-certificate-manager/issues + GitHub Issues + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-certificate-manager-parent + + + + + + com.google.cloud + google-cloud-certificate-manager + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-certificate-manager-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-certificate-manager-v1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 2.4.0 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-certificate-manager + grpc-google-cloud-certificate-manager-v1 + proto-google-cloud-certificate-manager-v1 + google-cloud-certificate-manager-bom + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.1.1 + + + + index + dependency-info + team + ci-management + issue-management + licenses + scm + dependency-management + distribution-management + summary + modules + + + + + true + ${site.installationModule} + jar + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + html + + aggregate + javadoc + + + + + none + protected + true + ${project.build.directory}/javadoc + + + Test helpers packages + com.google.cloud.testing + + + SPI packages + com.google.cloud.spi* + + + + + https://grpc.io/grpc-java/javadoc/ + https://developers.google.com/protocol-buffers/docs/reference/java/ + https://googleapis.dev/java/google-auth-library/latest/ + https://googleapis.dev/java/gax/latest/ + https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/ + + + + + + diff --git a/proto-google-cloud-certificate-manager-v1/clirr-ignored-differences.xml b/proto-google-cloud-certificate-manager-v1/clirr-ignored-differences.xml new file mode 100644 index 0000000..6fe2e97 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/certificatemanager/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/certificatemanager/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/certificatemanager/v1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-certificate-manager-v1/pom.xml b/proto-google-cloud-certificate-manager-v1/pom.xml new file mode 100644 index 0000000..f0de5d3 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-certificate-manager-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-certificate-manager-v1 + Proto library for google-cloud-certificate-manager + + com.google.cloud + google-cloud-certificate-manager-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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/Certificate.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/Certificate.java new file mode 100644 index 0000000..34d5f74 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/Certificate.java @@ -0,0 +1,9938 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Defines TLS certificate.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.Certificate} + */ +public final class Certificate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.Certificate) + CertificateOrBuilder { + private static final long serialVersionUID = 0L; + // Use Certificate.newBuilder() to construct. + private Certificate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Certificate() { + name_ = ""; + description_ = ""; + sanDnsnames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + pemCertificate_ = ""; + scope_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Certificate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Certificate( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + 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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 42: + { + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.Builder + subBuilder = null; + if (typeCase_ == 5) { + subBuilder = + ((com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) + type_) + .toBuilder(); + } + type_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) + type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 5; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + sanDnsnames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + sanDnsnames_.add(s); + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expireTime_ != null) { + subBuilder = expireTime_.toBuilder(); + } + expireTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expireTime_); + expireTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + pemCertificate_ = s; + break; + } + case 90: + { + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.Builder + subBuilder = null; + if (typeCase_ == 11) { + subBuilder = + ((com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) type_) + .toBuilder(); + } + type_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 11; + break; + } + case 96: + { + int rawValue = input.readEnum(); + + scope_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + sanDnsnames_ = sanDnsnames_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.Certificate.class, + com.google.cloud.certificatemanager.v1.Certificate.Builder.class); + } + + /** + * + * + *
+   * Certificate scope.
+   * 
+ * + * Protobuf enum {@code google.cloud.certificatemanager.v1.Certificate.Scope} + */ + public enum Scope implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Certificates with default scope are served from core Google data centers.
+     * If unsure, choose this option.
+     * 
+ * + * DEFAULT = 0; + */ + DEFAULT(0), + /** + * + * + *
+     * Certificates with scope EDGE_CACHE are special-purposed certificates,
+     * served from non-core Google data centers.
+     * 
+ * + * EDGE_CACHE = 1; + */ + EDGE_CACHE(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Certificates with default scope are served from core Google data centers.
+     * If unsure, choose this option.
+     * 
+ * + * DEFAULT = 0; + */ + public static final int DEFAULT_VALUE = 0; + /** + * + * + *
+     * Certificates with scope EDGE_CACHE are special-purposed certificates,
+     * served from non-core Google data centers.
+     * 
+ * + * EDGE_CACHE = 1; + */ + public static final int EDGE_CACHE_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 Scope valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Scope forNumber(int value) { + switch (value) { + case 0: + return DEFAULT; + case 1: + return EDGE_CACHE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Scope findValueByNumber(int number) { + return Scope.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.Certificate.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Scope[] VALUES = values(); + + public static Scope valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Scope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.certificatemanager.v1.Certificate.Scope) + } + + public interface SelfManagedCertificateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Input only. The PEM-encoded certificate chain.
+     * Leaf certificate comes first, followed by intermediate ones if any.
+     * 
+ * + * string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The pemCertificate. + */ + java.lang.String getPemCertificate(); + /** + * + * + *
+     * Input only. The PEM-encoded certificate chain.
+     * Leaf certificate comes first, followed by intermediate ones if any.
+     * 
+ * + * string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + com.google.protobuf.ByteString getPemCertificateBytes(); + + /** + * + * + *
+     * Input only. The PEM-encoded private key of the leaf certificate.
+     * 
+ * + * string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The pemPrivateKey. + */ + java.lang.String getPemPrivateKey(); + /** + * + * + *
+     * Input only. The PEM-encoded private key of the leaf certificate.
+     * 
+ * + * string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for pemPrivateKey. + */ + com.google.protobuf.ByteString getPemPrivateKeyBytes(); + } + /** + * + * + *
+   * Certificate data for a SelfManaged Certificate.
+   * SelfManaged Certificates are uploaded by the user. Updating such
+   * certificates before they expire remains the user's responsibility.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate} + */ + public static final class SelfManagedCertificate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) + SelfManagedCertificateOrBuilder { + private static final long serialVersionUID = 0L; + // Use SelfManagedCertificate.newBuilder() to construct. + private SelfManagedCertificate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SelfManagedCertificate() { + pemCertificate_ = ""; + pemPrivateKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SelfManagedCertificate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SelfManagedCertificate( + 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(); + + pemCertificate_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + pemPrivateKey_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_SelfManagedCertificate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_SelfManagedCertificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.class, + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.Builder + .class); + } + + public static final int PEM_CERTIFICATE_FIELD_NUMBER = 1; + private volatile java.lang.Object pemCertificate_; + /** + * + * + *
+     * Input only. The PEM-encoded certificate chain.
+     * Leaf certificate comes first, followed by intermediate ones if any.
+     * 
+ * + * string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The pemCertificate. + */ + @java.lang.Override + public java.lang.String getPemCertificate() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCertificate_ = s; + return s; + } + } + /** + * + * + *
+     * Input only. The PEM-encoded certificate chain.
+     * Leaf certificate comes first, followed by intermediate ones if any.
+     * 
+ * + * string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPemCertificateBytes() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEM_PRIVATE_KEY_FIELD_NUMBER = 2; + private volatile java.lang.Object pemPrivateKey_; + /** + * + * + *
+     * Input only. The PEM-encoded private key of the leaf certificate.
+     * 
+ * + * string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The pemPrivateKey. + */ + @java.lang.Override + public java.lang.String getPemPrivateKey() { + java.lang.Object ref = pemPrivateKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemPrivateKey_ = s; + return s; + } + } + /** + * + * + *
+     * Input only. The PEM-encoded private key of the leaf certificate.
+     * 
+ * + * string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for pemPrivateKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPemPrivateKeyBytes() { + java.lang.Object ref = pemPrivateKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemPrivateKey_ = 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(pemCertificate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pemCertificate_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pemPrivateKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pemPrivateKey_); + } + 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(pemCertificate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pemCertificate_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pemPrivateKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pemPrivateKey_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate other = + (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) obj; + + if (!getPemCertificate().equals(other.getPemCertificate())) return false; + if (!getPemPrivateKey().equals(other.getPemPrivateKey())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PEM_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getPemCertificate().hashCode(); + hash = (37 * hash) + PEM_PRIVATE_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPemPrivateKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Certificate data for a SelfManaged Certificate.
+     * SelfManaged Certificates are uploaded by the user. Updating such
+     * certificates before they expire remains the user's responsibility.
+     * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_SelfManagedCertificate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_SelfManagedCertificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.class, + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.Builder + .class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.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(); + pemCertificate_ = ""; + + pemPrivateKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_SelfManagedCertificate_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate build() { + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + buildPartial() { + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate result = + new com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate(this); + result.pemCertificate_ = pemCertificate_; + result.pemPrivateKey_ = pemPrivateKey_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate other) { + if (other + == com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + .getDefaultInstance()) return this; + if (!other.getPemCertificate().isEmpty()) { + pemCertificate_ = other.pemCertificate_; + onChanged(); + } + if (!other.getPemPrivateKey().isEmpty()) { + pemPrivateKey_ = other.pemPrivateKey_; + 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.certificatemanager.v1.Certificate.SelfManagedCertificate parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object pemCertificate_ = ""; + /** + * + * + *
+       * Input only. The PEM-encoded certificate chain.
+       * Leaf certificate comes first, followed by intermediate ones if any.
+       * 
+ * + * string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The pemCertificate. + */ + public java.lang.String getPemCertificate() { + java.lang.Object ref = pemCertificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCertificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Input only. The PEM-encoded certificate chain.
+       * Leaf certificate comes first, followed by intermediate ones if any.
+       * 
+ * + * string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + public com.google.protobuf.ByteString getPemCertificateBytes() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Input only. The PEM-encoded certificate chain.
+       * Leaf certificate comes first, followed by intermediate ones if any.
+       * 
+ * + * string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The pemCertificate to set. + * @return This builder for chaining. + */ + public Builder setPemCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pemCertificate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Input only. The PEM-encoded certificate chain.
+       * Leaf certificate comes first, followed by intermediate ones if any.
+       * 
+ * + * string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPemCertificate() { + + pemCertificate_ = getDefaultInstance().getPemCertificate(); + onChanged(); + return this; + } + /** + * + * + *
+       * Input only. The PEM-encoded certificate chain.
+       * Leaf certificate comes first, followed by intermediate ones if any.
+       * 
+ * + * string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The bytes for pemCertificate to set. + * @return This builder for chaining. + */ + public Builder setPemCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pemCertificate_ = value; + onChanged(); + return this; + } + + private java.lang.Object pemPrivateKey_ = ""; + /** + * + * + *
+       * Input only. The PEM-encoded private key of the leaf certificate.
+       * 
+ * + * string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The pemPrivateKey. + */ + public java.lang.String getPemPrivateKey() { + java.lang.Object ref = pemPrivateKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemPrivateKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Input only. The PEM-encoded private key of the leaf certificate.
+       * 
+ * + * string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for pemPrivateKey. + */ + public com.google.protobuf.ByteString getPemPrivateKeyBytes() { + java.lang.Object ref = pemPrivateKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemPrivateKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Input only. The PEM-encoded private key of the leaf certificate.
+       * 
+ * + * string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The pemPrivateKey to set. + * @return This builder for chaining. + */ + public Builder setPemPrivateKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pemPrivateKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Input only. The PEM-encoded private key of the leaf certificate.
+       * 
+ * + * string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPemPrivateKey() { + + pemPrivateKey_ = getDefaultInstance().getPemPrivateKey(); + onChanged(); + return this; + } + /** + * + * + *
+       * Input only. The PEM-encoded private key of the leaf certificate.
+       * 
+ * + * string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The bytes for pemPrivateKey to set. + * @return This builder for chaining. + */ + public Builder setPemPrivateKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pemPrivateKey_ = 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.certificatemanager.v1.Certificate.SelfManagedCertificate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) + private static final com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate(); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SelfManagedCertificate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SelfManagedCertificate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ManagedCertificateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Immutable. The domains for which a managed SSL certificate will be generated.
+     * Wildcard domains are only supported with DNS challenge resolution.
+     * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return A list containing the domains. + */ + java.util.List getDomainsList(); + /** + * + * + *
+     * Immutable. The domains for which a managed SSL certificate will be generated.
+     * Wildcard domains are only supported with DNS challenge resolution.
+     * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The count of domains. + */ + int getDomainsCount(); + /** + * + * + *
+     * Immutable. The domains for which a managed SSL certificate will be generated.
+     * Wildcard domains are only supported with DNS challenge resolution.
+     * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the element to return. + * @return The domains at the given index. + */ + java.lang.String getDomains(int index); + /** + * + * + *
+     * Immutable. The domains for which a managed SSL certificate will be generated.
+     * Wildcard domains are only supported with DNS challenge resolution.
+     * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the value to return. + * @return The bytes of the domains at the given index. + */ + com.google.protobuf.ByteString getDomainsBytes(int index); + + /** + * + * + *
+     * Immutable. Authorizations that will be used for performing domain authorization.
+     * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dnsAuthorizations. + */ + java.util.List getDnsAuthorizationsList(); + /** + * + * + *
+     * Immutable. Authorizations that will be used for performing domain authorization.
+     * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dnsAuthorizations. + */ + int getDnsAuthorizationsCount(); + /** + * + * + *
+     * Immutable. Authorizations that will be used for performing domain authorization.
+     * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dnsAuthorizations at the given index. + */ + java.lang.String getDnsAuthorizations(int index); + /** + * + * + *
+     * Immutable. Authorizations that will be used for performing domain authorization.
+     * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dnsAuthorizations at the given index. + */ + com.google.protobuf.ByteString getDnsAuthorizationsBytes(int index); + + /** + * + * + *
+     * Output only. State of the managed certificate resource.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * Output only. State of the managed certificate resource.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State getState(); + + /** + * + * + *
+     * Information about issues with provisioning a Managed Certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + * + * @return Whether the provisioningIssue field is set. + */ + boolean hasProvisioningIssue(); + /** + * + * + *
+     * Information about issues with provisioning a Managed Certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + * + * @return The provisioningIssue. + */ + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + getProvisioningIssue(); + /** + * + * + *
+     * Information about issues with provisioning a Managed Certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + */ + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssueOrBuilder + getProvisioningIssueOrBuilder(); + + /** + * + * + *
+     * Output only. Detailed state of the latest authorization attempt for each domain
+     * specified for managed certificate resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo> + getAuthorizationAttemptInfoList(); + /** + * + * + *
+     * Output only. Detailed state of the latest authorization attempt for each domain
+     * specified for managed certificate resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo + getAuthorizationAttemptInfo(int index); + /** + * + * + *
+     * Output only. Detailed state of the latest authorization attempt for each domain
+     * specified for managed certificate resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getAuthorizationAttemptInfoCount(); + /** + * + * + *
+     * Output only. Detailed state of the latest authorization attempt for each domain
+     * specified for managed certificate resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfoOrBuilder> + getAuthorizationAttemptInfoOrBuilderList(); + /** + * + * + *
+     * Output only. Detailed state of the latest authorization attempt for each domain
+     * specified for managed certificate resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfoOrBuilder + getAuthorizationAttemptInfoOrBuilder(int index); + } + /** + * + * + *
+   * Configuration and state of a Managed Certificate.
+   * Certificate Manager provisions and renews Managed Certificates
+   * automatically, for as long as it's authorized to do so.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.Certificate.ManagedCertificate} + */ + public static final class ManagedCertificate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) + ManagedCertificateOrBuilder { + private static final long serialVersionUID = 0L; + // Use ManagedCertificate.newBuilder() to construct. + private ManagedCertificate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ManagedCertificate() { + domains_ = com.google.protobuf.LazyStringArrayList.EMPTY; + dnsAuthorizations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + state_ = 0; + authorizationAttemptInfo_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ManagedCertificate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ManagedCertificate( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + domains_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + domains_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + dnsAuthorizations_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + dnsAuthorizations_.add(s); + break; + } + case 26: + { + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Builder + subBuilder = null; + if (provisioningIssue_ != null) { + subBuilder = provisioningIssue_.toBuilder(); + } + provisioningIssue_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(provisioningIssue_); + provisioningIssue_ = subBuilder.buildPartial(); + } + + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + authorizationAttemptInfo_ = + new java.util.ArrayList< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo>(); + mutable_bitField0_ |= 0x00000004; + } + authorizationAttemptInfo_.add( + input.readMessage( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + domains_ = domains_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + dnsAuthorizations_ = dnsAuthorizations_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + authorizationAttemptInfo_ = + java.util.Collections.unmodifiableList(authorizationAttemptInfo_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.class, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.Builder.class); + } + + /** + * Protobuf enum {@code google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** STATE_UNSPECIFIED = 0; */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+       * Certificate Manager attempts to provision or renew the certificate.
+       * If the process takes longer than expected, consult the
+       * `provisioning_issue` field.
+       * 
+ * + * PROVISIONING = 1; + */ + PROVISIONING(1), + /** + * + * + *
+       * Multiple certificate provisioning attempts failed and Certificate
+       * Manager gave up. To try again, delete and create a new managed
+       * Certificate resource.
+       * For details see the `provisioning_issue` field.
+       * 
+ * + * FAILED = 2; + */ + FAILED(2), + /** + * + * + *
+       * The certificate management is working, and a certificate has been
+       * provisioned.
+       * 
+ * + * ACTIVE = 3; + */ + ACTIVE(3), + UNRECOGNIZED(-1), + ; + + /** STATE_UNSPECIFIED = 0; */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Certificate Manager attempts to provision or renew the certificate.
+       * If the process takes longer than expected, consult the
+       * `provisioning_issue` field.
+       * 
+ * + * PROVISIONING = 1; + */ + public static final int PROVISIONING_VALUE = 1; + /** + * + * + *
+       * Multiple certificate provisioning attempts failed and Certificate
+       * Manager gave up. To try again, delete and create a new managed
+       * Certificate resource.
+       * For details see the `provisioning_issue` field.
+       * 
+ * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + /** + * + * + *
+       * The certificate management is working, and a certificate has been
+       * provisioned.
+       * 
+ * + * ACTIVE = 3; + */ + public static final int ACTIVE_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static 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 PROVISIONING; + case 2: + return FAILED; + case 3: + return ACTIVE; + 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.certificatemanager.v1.Certificate.ManagedCertificate.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.certificatemanager.v1.Certificate.ManagedCertificate.State) + } + + public interface ProvisioningIssueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Reason for provisioning failures.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1; + * + * + * @return The enum numeric value on the wire for reason. + */ + int getReasonValue(); + /** + * + * + *
+       * Reason for provisioning failures.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1; + * + * + * @return The reason. + */ + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason + getReason(); + + /** + * + * + *
+       * Human readable explanation about the issue. Provided to help address
+       * the configuration issues.
+       * Not guaranteed to be stable. For programmatic access use Reason enum.
+       * 
+ * + * string details = 2; + * + * @return The details. + */ + java.lang.String getDetails(); + /** + * + * + *
+       * Human readable explanation about the issue. Provided to help address
+       * the configuration issues.
+       * Not guaranteed to be stable. For programmatic access use Reason enum.
+       * 
+ * + * string details = 2; + * + * @return The bytes for details. + */ + com.google.protobuf.ByteString getDetailsBytes(); + } + /** + * + * + *
+     * Information about issues with provisioning a Managed Certificate.
+     * 
+ * + * Protobuf type {@code + * google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue} + */ + public static final class ProvisioningIssue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue) + ProvisioningIssueOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProvisioningIssue.newBuilder() to construct. + private ProvisioningIssue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProvisioningIssue() { + reason_ = 0; + details_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProvisioningIssue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ProvisioningIssue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + reason_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + details_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_ProvisioningIssue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_ProvisioningIssue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.class, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason} + */ + public enum Reason implements com.google.protobuf.ProtocolMessageEnum { + /** REASON_UNSPECIFIED = 0; */ + REASON_UNSPECIFIED(0), + /** + * + * + *
+         * Certificate provisioning failed due to an issue with one or more of
+         * the domains on the certificate.
+         * For details of which domains failed, consult the
+         * `authorization_attempt_info` field.
+         * 
+ * + * AUTHORIZATION_ISSUE = 1; + */ + AUTHORIZATION_ISSUE(1), + /** + * + * + *
+         * Exceeded Certificate Authority quotas or internal rate limits of the
+         * system. Provisioning may take longer to complete.
+         * 
+ * + * RATE_LIMITED = 2; + */ + RATE_LIMITED(2), + UNRECOGNIZED(-1), + ; + + /** REASON_UNSPECIFIED = 0; */ + public static final int REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * Certificate provisioning failed due to an issue with one or more of
+         * the domains on the certificate.
+         * For details of which domains failed, consult the
+         * `authorization_attempt_info` field.
+         * 
+ * + * AUTHORIZATION_ISSUE = 1; + */ + public static final int AUTHORIZATION_ISSUE_VALUE = 1; + /** + * + * + *
+         * Exceeded Certificate Authority quotas or internal rate limits of the
+         * system. Provisioning may take longer to complete.
+         * 
+ * + * RATE_LIMITED = 2; + */ + public static final int RATE_LIMITED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Reason 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 Reason forNumber(int value) { + switch (value) { + case 0: + return REASON_UNSPECIFIED; + case 1: + return AUTHORIZATION_ISSUE; + case 2: + return RATE_LIMITED; + 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 Reason findValueByNumber(int number) { + return Reason.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.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Reason[] VALUES = values(); + + public static Reason 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 Reason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason) + } + + public static final int REASON_FIELD_NUMBER = 1; + private int reason_; + /** + * + * + *
+       * Reason for provisioning failures.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1; + * + * + * @return The enum numeric value on the wire for reason. + */ + @java.lang.Override + public int getReasonValue() { + return reason_; + } + /** + * + * + *
+       * Reason for provisioning failures.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1; + * + * + * @return The reason. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + .Reason + getReason() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + .Reason + result = + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Reason.valueOf(reason_); + return result == null + ? com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Reason.UNRECOGNIZED + : result; + } + + public static final int DETAILS_FIELD_NUMBER = 2; + private volatile java.lang.Object details_; + /** + * + * + *
+       * Human readable explanation about the issue. Provided to help address
+       * the configuration issues.
+       * Not guaranteed to be stable. For programmatic access use Reason enum.
+       * 
+ * + * string details = 2; + * + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + * + * + *
+       * Human readable explanation about the issue. Provided to help address
+       * the configuration issues.
+       * Not guaranteed to be stable. For programmatic access use Reason enum.
+       * 
+ * + * string details = 2; + * + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = 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 (reason_ + != com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Reason.REASON_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, reason_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (reason_ + != com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Reason.REASON_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, reason_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + other = + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue) + obj; + + if (reason_ != other.reason_) return false; + if (!getDetails().equals(other.getDetails())) 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) + REASON_FIELD_NUMBER; + hash = (53 * hash) + reason_; + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Information about issues with provisioning a Managed Certificate.
+       * 
+ * + * Protobuf type {@code + * google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue) + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_ProvisioningIssue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_ProvisioningIssue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.class, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.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(); + reason_ = 0; + + details_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_ProvisioningIssue_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + build() { + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + buildPartial() { + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + result = + new com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue(this); + result.reason_ = reason_; + result.details_ = details_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + other) { + if (other + == com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.getDefaultInstance()) return this; + if (other.reason_ != 0) { + setReasonValue(other.getReasonValue()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + 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.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int reason_ = 0; + /** + * + * + *
+         * Reason for provisioning failures.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1; + * + * + * @return The enum numeric value on the wire for reason. + */ + @java.lang.Override + public int getReasonValue() { + return reason_; + } + /** + * + * + *
+         * Reason for provisioning failures.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1; + * + * + * @param value The enum numeric value on the wire for reason to set. + * @return This builder for chaining. + */ + public Builder setReasonValue(int value) { + + reason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Reason for provisioning failures.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1; + * + * + * @return The reason. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Reason + getReason() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + .Reason + result = + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Reason.valueOf(reason_); + return result == null + ? com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Reason.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Reason for provisioning failures.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1; + * + * + * @param value The reason to set. + * @return This builder for chaining. + */ + public Builder setReason( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + .Reason + value) { + if (value == null) { + throw new NullPointerException(); + } + + reason_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Reason for provisioning failures.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason reason = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearReason() { + + reason_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + * + * + *
+         * Human readable explanation about the issue. Provided to help address
+         * the configuration issues.
+         * Not guaranteed to be stable. For programmatic access use Reason enum.
+         * 
+ * + * string details = 2; + * + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Human readable explanation about the issue. Provided to help address
+         * the configuration issues.
+         * Not guaranteed to be stable. For programmatic access use Reason enum.
+         * 
+ * + * string details = 2; + * + * @return The bytes for details. + */ + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Human readable explanation about the issue. Provided to help address
+         * the configuration issues.
+         * Not guaranteed to be stable. For programmatic access use Reason enum.
+         * 
+ * + * string details = 2; + * + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + details_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Human readable explanation about the issue. Provided to help address
+         * the configuration issues.
+         * Not guaranteed to be stable. For programmatic access use Reason enum.
+         * 
+ * + * string details = 2; + * + * @return This builder for chaining. + */ + public Builder clearDetails() { + + details_ = getDefaultInstance().getDetails(); + onChanged(); + return this; + } + /** + * + * + *
+         * Human readable explanation about the issue. Provided to help address
+         * the configuration issues.
+         * Not guaranteed to be stable. For programmatic access use Reason enum.
+         * 
+ * + * string details = 2; + * + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + details_ = 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.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue) + private static final com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue(); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProvisioningIssue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProvisioningIssue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AuthorizationAttemptInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Domain name of the authorization attempt.
+       * 
+ * + * string domain = 1; + * + * @return The domain. + */ + java.lang.String getDomain(); + /** + * + * + *
+       * Domain name of the authorization attempt.
+       * 
+ * + * string domain = 1; + * + * @return The bytes for domain. + */ + com.google.protobuf.ByteString getDomainBytes(); + + /** + * + * + *
+       * State of the domain for managed certificate issuance.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+       * State of the domain for managed certificate issuance.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2; + * + * + * @return The state. + */ + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo + .State + getState(); + + /** + * + * + *
+       * Output only. Reason for failure of the authorization attempt for the domain.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for failureReason. + */ + int getFailureReasonValue(); + /** + * + * + *
+       * Output only. Reason for failure of the authorization attempt for the domain.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The failureReason. + */ + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo + .FailureReason + getFailureReason(); + + /** + * + * + *
+       * Human readable explanation for reaching the state. Provided to help
+       * address the configuration issues.
+       * Not guaranteed to be stable. For programmatic access use Reason enum.
+       * 
+ * + * string details = 4; + * + * @return The details. + */ + java.lang.String getDetails(); + /** + * + * + *
+       * Human readable explanation for reaching the state. Provided to help
+       * address the configuration issues.
+       * Not guaranteed to be stable. For programmatic access use Reason enum.
+       * 
+ * + * string details = 4; + * + * @return The bytes for details. + */ + com.google.protobuf.ByteString getDetailsBytes(); + } + /** + * + * + *
+     * State of the latest attempt to authorize a domain for certificate
+     * issuance.
+     * 
+ * + * Protobuf type {@code + * google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo} + */ + public static final class AuthorizationAttemptInfo + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo) + AuthorizationAttemptInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthorizationAttemptInfo.newBuilder() to construct. + private AuthorizationAttemptInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AuthorizationAttemptInfo() { + domain_ = ""; + state_ = 0; + failureReason_ = 0; + details_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuthorizationAttemptInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AuthorizationAttemptInfo( + 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(); + + domain_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + failureReason_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + details_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_AuthorizationAttemptInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_AuthorizationAttemptInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.class, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder.class); + } + + /** + * Protobuf enum {@code + * google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** STATE_UNSPECIFIED = 0; */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+         * Certificate provisioning for this domain is under way. GCP will
+         * attempt to authorize the domain.
+         * 
+ * + * AUTHORIZING = 1; + */ + AUTHORIZING(1), + /** + * + * + *
+         * A managed certificate can be provisioned, no issues for this domain.
+         * 
+ * + * AUTHORIZED = 6; + */ + AUTHORIZED(6), + /** + * + * + *
+         * Attempt to authorize the domain failed. This prevents the Managed
+         * Certificate from being issued.
+         * See `failure_reason` and `details` fields for more information.
+         * 
+ * + * FAILED = 7; + */ + FAILED(7), + UNRECOGNIZED(-1), + ; + + /** STATE_UNSPECIFIED = 0; */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * Certificate provisioning for this domain is under way. GCP will
+         * attempt to authorize the domain.
+         * 
+ * + * AUTHORIZING = 1; + */ + public static final int AUTHORIZING_VALUE = 1; + /** + * + * + *
+         * A managed certificate can be provisioned, no issues for this domain.
+         * 
+ * + * AUTHORIZED = 6; + */ + public static final int AUTHORIZED_VALUE = 6; + /** + * + * + *
+         * Attempt to authorize the domain failed. This prevents the Managed
+         * Certificate from being issued.
+         * See `failure_reason` and `details` fields for more information.
+         * 
+ * + * FAILED = 7; + */ + public static final int FAILED_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return AUTHORIZING; + case 6: + return AUTHORIZED; + case 7: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public 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.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.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.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State) + } + + /** + * Protobuf enum {@code + * google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason} + */ + public enum FailureReason implements com.google.protobuf.ProtocolMessageEnum { + /** FAILURE_REASON_UNSPECIFIED = 0; */ + FAILURE_REASON_UNSPECIFIED(0), + /** + * + * + *
+         * There was a problem with the user's DNS or load balancer
+         * configuration for this domain.
+         * 
+ * + * CONFIG = 1; + */ + CONFIG(1), + /** + * + * + *
+         * Certificate issuance forbidden by an explicit CAA record for the
+         * domain or a failure to check CAA records for the domain.
+         * 
+ * + * CAA = 2; + */ + CAA(2), + /** + * + * + *
+         * Reached a CA or internal rate-limit for the domain,
+         * e.g. for certificates per top-level private domain.
+         * 
+ * + * RATE_LIMITED = 3; + */ + RATE_LIMITED(3), + UNRECOGNIZED(-1), + ; + + /** FAILURE_REASON_UNSPECIFIED = 0; */ + public static final int FAILURE_REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * There was a problem with the user's DNS or load balancer
+         * configuration for this domain.
+         * 
+ * + * CONFIG = 1; + */ + public static final int CONFIG_VALUE = 1; + /** + * + * + *
+         * Certificate issuance forbidden by an explicit CAA record for the
+         * domain or a failure to check CAA records for the domain.
+         * 
+ * + * CAA = 2; + */ + public static final int CAA_VALUE = 2; + /** + * + * + *
+         * Reached a CA or internal rate-limit for the domain,
+         * e.g. for certificates per top-level private domain.
+         * 
+ * + * RATE_LIMITED = 3; + */ + public static final int RATE_LIMITED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FailureReason 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 FailureReason forNumber(int value) { + switch (value) { + case 0: + return FAILURE_REASON_UNSPECIFIED; + case 1: + return CONFIG; + case 2: + return CAA; + case 3: + return RATE_LIMITED; + 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 FailureReason findValueByNumber(int number) { + return FailureReason.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.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final FailureReason[] VALUES = values(); + + public static FailureReason 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 FailureReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason) + } + + public static final int DOMAIN_FIELD_NUMBER = 1; + private volatile java.lang.Object domain_; + /** + * + * + *
+       * Domain name of the authorization attempt.
+       * 
+ * + * string domain = 1; + * + * @return The domain. + */ + @java.lang.Override + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } + } + /** + * + * + *
+       * Domain name of the authorization attempt.
+       * 
+ * + * string domain = 1; + * + * @return The bytes for domain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_; + /** + * + * + *
+       * State of the domain for managed certificate issuance.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * State of the domain for managed certificate issuance.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.State + getState() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.State + result = + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.State.valueOf(state_); + return result == null + ? com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.State.UNRECOGNIZED + : result; + } + + public static final int FAILURE_REASON_FIELD_NUMBER = 3; + private int failureReason_; + /** + * + * + *
+       * Output only. Reason for failure of the authorization attempt for the domain.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for failureReason. + */ + @java.lang.Override + public int getFailureReasonValue() { + return failureReason_; + } + /** + * + * + *
+       * Output only. Reason for failure of the authorization attempt for the domain.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The failureReason. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.FailureReason + getFailureReason() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.FailureReason + result = + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.FailureReason.valueOf(failureReason_); + return result == null + ? com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.FailureReason.UNRECOGNIZED + : result; + } + + public static final int DETAILS_FIELD_NUMBER = 4; + private volatile java.lang.Object details_; + /** + * + * + *
+       * Human readable explanation for reaching the state. Provided to help
+       * address the configuration issues.
+       * Not guaranteed to be stable. For programmatic access use Reason enum.
+       * 
+ * + * string details = 4; + * + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + * + * + *
+       * Human readable explanation for reaching the state. Provided to help
+       * address the configuration issues.
+       * Not guaranteed to be stable. For programmatic access use Reason enum.
+       * 
+ * + * string details = 4; + * + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = 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(domain_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, domain_); + } + if (state_ + != com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, state_); + } + if (failureReason_ + != com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.FailureReason.FAILURE_REASON_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, failureReason_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, details_); + } + 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(domain_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, domain_); + } + if (state_ + != com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (failureReason_ + != com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.FailureReason.FAILURE_REASON_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, failureReason_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, details_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + other = + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo) + obj; + + if (!getDomain().equals(other.getDomain())) return false; + if (state_ != other.state_) return false; + if (failureReason_ != other.failureReason_) return false; + if (!getDetails().equals(other.getDetails())) 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) + DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getDomain().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + FAILURE_REASON_FIELD_NUMBER; + hash = (53 * hash) + failureReason_; + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * State of the latest attempt to authorize a domain for certificate
+       * issuance.
+       * 
+ * + * Protobuf type {@code + * google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo) + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_AuthorizationAttemptInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_AuthorizationAttemptInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.class, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.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(); + domain_ = ""; + + state_ = 0; + + failureReason_ = 0; + + details_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_AuthorizationAttemptInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + build() { + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + buildPartial() { + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + result = + new com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo(this); + result.domain_ = domain_; + result.state_ = state_; + result.failureReason_ = failureReason_; + result.details_ = details_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + other) { + if (other + == com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.getDefaultInstance()) return this; + if (!other.getDomain().isEmpty()) { + domain_ = other.domain_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.failureReason_ != 0) { + setFailureReasonValue(other.getFailureReasonValue()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + 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.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object domain_ = ""; + /** + * + * + *
+         * Domain name of the authorization attempt.
+         * 
+ * + * string domain = 1; + * + * @return The domain. + */ + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Domain name of the authorization attempt.
+         * 
+ * + * string domain = 1; + * + * @return The bytes for domain. + */ + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Domain name of the authorization attempt.
+         * 
+ * + * string domain = 1; + * + * @param value The domain to set. + * @return This builder for chaining. + */ + public Builder setDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + domain_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Domain name of the authorization attempt.
+         * 
+ * + * string domain = 1; + * + * @return This builder for chaining. + */ + public Builder clearDomain() { + + domain_ = getDefaultInstance().getDomain(); + onChanged(); + return this; + } + /** + * + * + *
+         * Domain name of the authorization attempt.
+         * 
+ * + * string domain = 1; + * + * @param value The bytes for domain to set. + * @return This builder for chaining. + */ + public Builder setDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + domain_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+         * State of the domain for managed certificate issuance.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+         * State of the domain for managed certificate issuance.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2; + * + * + * @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; + } + /** + * + * + *
+         * State of the domain for managed certificate issuance.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.State + getState() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.State + result = + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.State.valueOf(state_); + return result == null + ? com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * State of the domain for managed certificate issuance.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.State + value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * State of the domain for managed certificate issuance.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State state = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private int failureReason_ = 0; + /** + * + * + *
+         * Output only. Reason for failure of the authorization attempt for the domain.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for failureReason. + */ + @java.lang.Override + public int getFailureReasonValue() { + return failureReason_; + } + /** + * + * + *
+         * Output only. Reason for failure of the authorization attempt for the domain.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for failureReason to set. + * @return This builder for chaining. + */ + public Builder setFailureReasonValue(int value) { + + failureReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Output only. Reason for failure of the authorization attempt for the domain.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The failureReason. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.FailureReason + getFailureReason() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.FailureReason + result = + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.FailureReason.valueOf(failureReason_); + return result == null + ? com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.FailureReason.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Output only. Reason for failure of the authorization attempt for the domain.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The failureReason to set. + * @return This builder for chaining. + */ + public Builder setFailureReason( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.FailureReason + value) { + if (value == null) { + throw new NullPointerException(); + } + + failureReason_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Output only. Reason for failure of the authorization attempt for the domain.
+         * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason failure_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearFailureReason() { + + failureReason_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + * + * + *
+         * Human readable explanation for reaching the state. Provided to help
+         * address the configuration issues.
+         * Not guaranteed to be stable. For programmatic access use Reason enum.
+         * 
+ * + * string details = 4; + * + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Human readable explanation for reaching the state. Provided to help
+         * address the configuration issues.
+         * Not guaranteed to be stable. For programmatic access use Reason enum.
+         * 
+ * + * string details = 4; + * + * @return The bytes for details. + */ + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Human readable explanation for reaching the state. Provided to help
+         * address the configuration issues.
+         * Not guaranteed to be stable. For programmatic access use Reason enum.
+         * 
+ * + * string details = 4; + * + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + details_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Human readable explanation for reaching the state. Provided to help
+         * address the configuration issues.
+         * Not guaranteed to be stable. For programmatic access use Reason enum.
+         * 
+ * + * string details = 4; + * + * @return This builder for chaining. + */ + public Builder clearDetails() { + + details_ = getDefaultInstance().getDetails(); + onChanged(); + return this; + } + /** + * + * + *
+         * Human readable explanation for reaching the state. Provided to help
+         * address the configuration issues.
+         * Not guaranteed to be stable. For programmatic access use Reason enum.
+         * 
+ * + * string details = 4; + * + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + details_ = 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.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo) + private static final com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo(); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthorizationAttemptInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AuthorizationAttemptInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DOMAINS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList domains_; + /** + * + * + *
+     * Immutable. The domains for which a managed SSL certificate will be generated.
+     * Wildcard domains are only supported with DNS challenge resolution.
+     * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return A list containing the domains. + */ + public com.google.protobuf.ProtocolStringList getDomainsList() { + return domains_; + } + /** + * + * + *
+     * Immutable. The domains for which a managed SSL certificate will be generated.
+     * Wildcard domains are only supported with DNS challenge resolution.
+     * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The count of domains. + */ + public int getDomainsCount() { + return domains_.size(); + } + /** + * + * + *
+     * Immutable. The domains for which a managed SSL certificate will be generated.
+     * Wildcard domains are only supported with DNS challenge resolution.
+     * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the element to return. + * @return The domains at the given index. + */ + public java.lang.String getDomains(int index) { + return domains_.get(index); + } + /** + * + * + *
+     * Immutable. The domains for which a managed SSL certificate will be generated.
+     * Wildcard domains are only supported with DNS challenge resolution.
+     * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the value to return. + * @return The bytes of the domains at the given index. + */ + public com.google.protobuf.ByteString getDomainsBytes(int index) { + return domains_.getByteString(index); + } + + public static final int DNS_AUTHORIZATIONS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList dnsAuthorizations_; + /** + * + * + *
+     * Immutable. Authorizations that will be used for performing domain authorization.
+     * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dnsAuthorizations. + */ + public com.google.protobuf.ProtocolStringList getDnsAuthorizationsList() { + return dnsAuthorizations_; + } + /** + * + * + *
+     * Immutable. Authorizations that will be used for performing domain authorization.
+     * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dnsAuthorizations. + */ + public int getDnsAuthorizationsCount() { + return dnsAuthorizations_.size(); + } + /** + * + * + *
+     * Immutable. Authorizations that will be used for performing domain authorization.
+     * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dnsAuthorizations at the given index. + */ + public java.lang.String getDnsAuthorizations(int index) { + return dnsAuthorizations_.get(index); + } + /** + * + * + *
+     * Immutable. Authorizations that will be used for performing domain authorization.
+     * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dnsAuthorizations at the given index. + */ + public com.google.protobuf.ByteString getDnsAuthorizationsBytes(int index) { + return dnsAuthorizations_.getByteString(index); + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+     * Output only. State of the managed certificate resource.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.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. State of the managed certificate resource.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State result = + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State.valueOf( + state_); + return result == null + ? com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State.UNRECOGNIZED + : result; + } + + public static final int PROVISIONING_ISSUE_FIELD_NUMBER = 3; + private com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + provisioningIssue_; + /** + * + * + *
+     * Information about issues with provisioning a Managed Certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + * + * @return Whether the provisioningIssue field is set. + */ + @java.lang.Override + public boolean hasProvisioningIssue() { + return provisioningIssue_ != null; + } + /** + * + * + *
+     * Information about issues with provisioning a Managed Certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + * + * @return The provisioningIssue. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + getProvisioningIssue() { + return provisioningIssue_ == null + ? com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + .getDefaultInstance() + : provisioningIssue_; + } + /** + * + * + *
+     * Information about issues with provisioning a Managed Certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssueOrBuilder + getProvisioningIssueOrBuilder() { + return getProvisioningIssue(); + } + + public static final int AUTHORIZATION_ATTEMPT_INFO_FIELD_NUMBER = 5; + private java.util.List< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo> + authorizationAttemptInfo_; + /** + * + * + *
+     * Output only. Detailed state of the latest authorization attempt for each domain
+     * specified for managed certificate resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo> + getAuthorizationAttemptInfoList() { + return authorizationAttemptInfo_; + } + /** + * + * + *
+     * Output only. Detailed state of the latest authorization attempt for each domain
+     * specified for managed certificate resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfoOrBuilder> + getAuthorizationAttemptInfoOrBuilderList() { + return authorizationAttemptInfo_; + } + /** + * + * + *
+     * Output only. Detailed state of the latest authorization attempt for each domain
+     * specified for managed certificate resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getAuthorizationAttemptInfoCount() { + return authorizationAttemptInfo_.size(); + } + /** + * + * + *
+     * Output only. Detailed state of the latest authorization attempt for each domain
+     * specified for managed certificate resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + getAuthorizationAttemptInfo(int index) { + return authorizationAttemptInfo_.get(index); + } + /** + * + * + *
+     * Output only. Detailed state of the latest authorization attempt for each domain
+     * specified for managed certificate resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfoOrBuilder + getAuthorizationAttemptInfoOrBuilder(int index) { + return authorizationAttemptInfo_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < domains_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, domains_.getRaw(i)); + } + for (int i = 0; i < dnsAuthorizations_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dnsAuthorizations_.getRaw(i)); + } + if (provisioningIssue_ != null) { + output.writeMessage(3, getProvisioningIssue()); + } + if (state_ + != com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + for (int i = 0; i < authorizationAttemptInfo_.size(); i++) { + output.writeMessage(5, authorizationAttemptInfo_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < domains_.size(); i++) { + dataSize += computeStringSizeNoTag(domains_.getRaw(i)); + } + size += dataSize; + size += 1 * getDomainsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < dnsAuthorizations_.size(); i++) { + dataSize += computeStringSizeNoTag(dnsAuthorizations_.getRaw(i)); + } + size += dataSize; + size += 1 * getDnsAuthorizationsList().size(); + } + if (provisioningIssue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProvisioningIssue()); + } + if (state_ + != com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + for (int i = 0; i < authorizationAttemptInfo_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, authorizationAttemptInfo_.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.certificatemanager.v1.Certificate.ManagedCertificate)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate other = + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) obj; + + if (!getDomainsList().equals(other.getDomainsList())) return false; + if (!getDnsAuthorizationsList().equals(other.getDnsAuthorizationsList())) return false; + if (state_ != other.state_) return false; + if (hasProvisioningIssue() != other.hasProvisioningIssue()) return false; + if (hasProvisioningIssue()) { + if (!getProvisioningIssue().equals(other.getProvisioningIssue())) return false; + } + if (!getAuthorizationAttemptInfoList().equals(other.getAuthorizationAttemptInfoList())) + 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 (getDomainsCount() > 0) { + hash = (37 * hash) + DOMAINS_FIELD_NUMBER; + hash = (53 * hash) + getDomainsList().hashCode(); + } + if (getDnsAuthorizationsCount() > 0) { + hash = (37 * hash) + DNS_AUTHORIZATIONS_FIELD_NUMBER; + hash = (53 * hash) + getDnsAuthorizationsList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasProvisioningIssue()) { + hash = (37 * hash) + PROVISIONING_ISSUE_FIELD_NUMBER; + hash = (53 * hash) + getProvisioningIssue().hashCode(); + } + if (getAuthorizationAttemptInfoCount() > 0) { + hash = (37 * hash) + AUTHORIZATION_ATTEMPT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizationAttemptInfoList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration and state of a Managed Certificate.
+     * Certificate Manager provisions and renews Managed Certificates
+     * automatically, for as long as it's authorized to do so.
+     * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.Certificate.ManagedCertificate} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.class, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.Builder + .class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAuthorizationAttemptInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + domains_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + dnsAuthorizations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + + if (provisioningIssueBuilder_ == null) { + provisioningIssue_ = null; + } else { + provisioningIssue_ = null; + provisioningIssueBuilder_ = null; + } + if (authorizationAttemptInfoBuilder_ == null) { + authorizationAttemptInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + authorizationAttemptInfoBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate build() { + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate buildPartial() { + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate result = + new com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + domains_ = domains_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.domains_ = domains_; + if (((bitField0_ & 0x00000002) != 0)) { + dnsAuthorizations_ = dnsAuthorizations_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.dnsAuthorizations_ = dnsAuthorizations_; + result.state_ = state_; + if (provisioningIssueBuilder_ == null) { + result.provisioningIssue_ = provisioningIssue_; + } else { + result.provisioningIssue_ = provisioningIssueBuilder_.build(); + } + if (authorizationAttemptInfoBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + authorizationAttemptInfo_ = + java.util.Collections.unmodifiableList(authorizationAttemptInfo_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.authorizationAttemptInfo_ = authorizationAttemptInfo_; + } else { + result.authorizationAttemptInfo_ = authorizationAttemptInfoBuilder_.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.certificatemanager.v1.Certificate.ManagedCertificate) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate other) { + if (other + == com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .getDefaultInstance()) return this; + if (!other.domains_.isEmpty()) { + if (domains_.isEmpty()) { + domains_ = other.domains_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDomainsIsMutable(); + domains_.addAll(other.domains_); + } + onChanged(); + } + if (!other.dnsAuthorizations_.isEmpty()) { + if (dnsAuthorizations_.isEmpty()) { + dnsAuthorizations_ = other.dnsAuthorizations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.addAll(other.dnsAuthorizations_); + } + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasProvisioningIssue()) { + mergeProvisioningIssue(other.getProvisioningIssue()); + } + if (authorizationAttemptInfoBuilder_ == null) { + if (!other.authorizationAttemptInfo_.isEmpty()) { + if (authorizationAttemptInfo_.isEmpty()) { + authorizationAttemptInfo_ = other.authorizationAttemptInfo_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAuthorizationAttemptInfoIsMutable(); + authorizationAttemptInfo_.addAll(other.authorizationAttemptInfo_); + } + onChanged(); + } + } else { + if (!other.authorizationAttemptInfo_.isEmpty()) { + if (authorizationAttemptInfoBuilder_.isEmpty()) { + authorizationAttemptInfoBuilder_.dispose(); + authorizationAttemptInfoBuilder_ = null; + authorizationAttemptInfo_ = other.authorizationAttemptInfo_; + bitField0_ = (bitField0_ & ~0x00000004); + authorizationAttemptInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAuthorizationAttemptInfoFieldBuilder() + : null; + } else { + authorizationAttemptInfoBuilder_.addAllMessages(other.authorizationAttemptInfo_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + 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.certificatemanager.v1.Certificate.ManagedCertificate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList domains_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDomainsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + domains_ = new com.google.protobuf.LazyStringArrayList(domains_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Immutable. The domains for which a managed SSL certificate will be generated.
+       * Wildcard domains are only supported with DNS challenge resolution.
+       * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return A list containing the domains. + */ + public com.google.protobuf.ProtocolStringList getDomainsList() { + return domains_.getUnmodifiableView(); + } + /** + * + * + *
+       * Immutable. The domains for which a managed SSL certificate will be generated.
+       * Wildcard domains are only supported with DNS challenge resolution.
+       * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The count of domains. + */ + public int getDomainsCount() { + return domains_.size(); + } + /** + * + * + *
+       * Immutable. The domains for which a managed SSL certificate will be generated.
+       * Wildcard domains are only supported with DNS challenge resolution.
+       * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the element to return. + * @return The domains at the given index. + */ + public java.lang.String getDomains(int index) { + return domains_.get(index); + } + /** + * + * + *
+       * Immutable. The domains for which a managed SSL certificate will be generated.
+       * Wildcard domains are only supported with DNS challenge resolution.
+       * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index of the value to return. + * @return The bytes of the domains at the given index. + */ + public com.google.protobuf.ByteString getDomainsBytes(int index) { + return domains_.getByteString(index); + } + /** + * + * + *
+       * Immutable. The domains for which a managed SSL certificate will be generated.
+       * Wildcard domains are only supported with DNS challenge resolution.
+       * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param index The index to set the value at. + * @param value The domains to set. + * @return This builder for chaining. + */ + public Builder setDomains(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainsIsMutable(); + domains_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. The domains for which a managed SSL certificate will be generated.
+       * Wildcard domains are only supported with DNS challenge resolution.
+       * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The domains to add. + * @return This builder for chaining. + */ + public Builder addDomains(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainsIsMutable(); + domains_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. The domains for which a managed SSL certificate will be generated.
+       * Wildcard domains are only supported with DNS challenge resolution.
+       * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param values The domains to add. + * @return This builder for chaining. + */ + public Builder addAllDomains(java.lang.Iterable values) { + ensureDomainsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, domains_); + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. The domains for which a managed SSL certificate will be generated.
+       * Wildcard domains are only supported with DNS challenge resolution.
+       * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearDomains() { + domains_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. The domains for which a managed SSL certificate will be generated.
+       * Wildcard domains are only supported with DNS challenge resolution.
+       * 
+ * + * repeated string domains = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes of the domains to add. + * @return This builder for chaining. + */ + public Builder addDomainsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDomainsIsMutable(); + domains_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList dnsAuthorizations_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDnsAuthorizationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + dnsAuthorizations_ = new com.google.protobuf.LazyStringArrayList(dnsAuthorizations_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * Immutable. Authorizations that will be used for performing domain authorization.
+       * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the dnsAuthorizations. + */ + public com.google.protobuf.ProtocolStringList getDnsAuthorizationsList() { + return dnsAuthorizations_.getUnmodifiableView(); + } + /** + * + * + *
+       * Immutable. Authorizations that will be used for performing domain authorization.
+       * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The count of dnsAuthorizations. + */ + public int getDnsAuthorizationsCount() { + return dnsAuthorizations_.size(); + } + /** + * + * + *
+       * Immutable. Authorizations that will be used for performing domain authorization.
+       * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The dnsAuthorizations at the given index. + */ + public java.lang.String getDnsAuthorizations(int index) { + return dnsAuthorizations_.get(index); + } + /** + * + * + *
+       * Immutable. Authorizations that will be used for performing domain authorization.
+       * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the dnsAuthorizations at the given index. + */ + public com.google.protobuf.ByteString getDnsAuthorizationsBytes(int index) { + return dnsAuthorizations_.getByteString(index); + } + /** + * + * + *
+       * Immutable. Authorizations that will be used for performing domain authorization.
+       * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The dnsAuthorizations to set. + * @return This builder for chaining. + */ + public Builder setDnsAuthorizations(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. Authorizations that will be used for performing domain authorization.
+       * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The dnsAuthorizations to add. + * @return This builder for chaining. + */ + public Builder addDnsAuthorizations(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. Authorizations that will be used for performing domain authorization.
+       * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param values The dnsAuthorizations to add. + * @return This builder for chaining. + */ + public Builder addAllDnsAuthorizations(java.lang.Iterable values) { + ensureDnsAuthorizationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dnsAuthorizations_); + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. Authorizations that will be used for performing domain authorization.
+       * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDnsAuthorizations() { + dnsAuthorizations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Immutable. Authorizations that will be used for performing domain authorization.
+       * 
+ * + * + * repeated string dns_authorizations = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the dnsAuthorizations to add. + * @return This builder for chaining. + */ + public Builder addDnsAuthorizationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.add(value); + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+       * Output only. State of the managed certificate resource.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.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. State of the managed certificate resource.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.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. State of the managed certificate resource.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State + getState() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State result = + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State.valueOf( + state_); + return result == null + ? com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Output only. State of the managed certificate resource.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. State of the managed certificate resource.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue + provisioningIssue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Builder, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssueOrBuilder> + provisioningIssueBuilder_; + /** + * + * + *
+       * Information about issues with provisioning a Managed Certificate.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + * + * @return Whether the provisioningIssue field is set. + */ + public boolean hasProvisioningIssue() { + return provisioningIssueBuilder_ != null || provisioningIssue_ != null; + } + /** + * + * + *
+       * Information about issues with provisioning a Managed Certificate.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + * + * @return The provisioningIssue. + */ + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + getProvisioningIssue() { + if (provisioningIssueBuilder_ == null) { + return provisioningIssue_ == null + ? com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.getDefaultInstance() + : provisioningIssue_; + } else { + return provisioningIssueBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Information about issues with provisioning a Managed Certificate.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + */ + public Builder setProvisioningIssue( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + value) { + if (provisioningIssueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provisioningIssue_ = value; + onChanged(); + } else { + provisioningIssueBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Information about issues with provisioning a Managed Certificate.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + */ + public Builder setProvisioningIssue( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + .Builder + builderForValue) { + if (provisioningIssueBuilder_ == null) { + provisioningIssue_ = builderForValue.build(); + onChanged(); + } else { + provisioningIssueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Information about issues with provisioning a Managed Certificate.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + */ + public Builder mergeProvisioningIssue( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + value) { + if (provisioningIssueBuilder_ == null) { + if (provisioningIssue_ != null) { + provisioningIssue_ = + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.newBuilder(provisioningIssue_) + .mergeFrom(value) + .buildPartial(); + } else { + provisioningIssue_ = value; + } + onChanged(); + } else { + provisioningIssueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Information about issues with provisioning a Managed Certificate.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + */ + public Builder clearProvisioningIssue() { + if (provisioningIssueBuilder_ == null) { + provisioningIssue_ = null; + onChanged(); + } else { + provisioningIssue_ = null; + provisioningIssueBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Information about issues with provisioning a Managed Certificate.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + */ + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue + .Builder + getProvisioningIssueBuilder() { + + onChanged(); + return getProvisioningIssueFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Information about issues with provisioning a Managed Certificate.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + */ + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssueOrBuilder + getProvisioningIssueOrBuilder() { + if (provisioningIssueBuilder_ != null) { + return provisioningIssueBuilder_.getMessageOrBuilder(); + } else { + return provisioningIssue_ == null + ? com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.getDefaultInstance() + : provisioningIssue_; + } + } + /** + * + * + *
+       * Information about issues with provisioning a Managed Certificate.
+       * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue provisioning_issue = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Builder, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssueOrBuilder> + getProvisioningIssueFieldBuilder() { + if (provisioningIssueBuilder_ == null) { + provisioningIssueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssue.Builder, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .ProvisioningIssueOrBuilder>( + getProvisioningIssue(), getParentForChildren(), isClean()); + provisioningIssue_ = null; + } + return provisioningIssueBuilder_; + } + + private java.util.List< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo> + authorizationAttemptInfo_ = java.util.Collections.emptyList(); + + private void ensureAuthorizationAttemptInfoIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + authorizationAttemptInfo_ = + new java.util.ArrayList< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo>(authorizationAttemptInfo_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfoOrBuilder> + authorizationAttemptInfoBuilder_; + + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo> + getAuthorizationAttemptInfoList() { + if (authorizationAttemptInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(authorizationAttemptInfo_); + } else { + return authorizationAttemptInfoBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getAuthorizationAttemptInfoCount() { + if (authorizationAttemptInfoBuilder_ == null) { + return authorizationAttemptInfo_.size(); + } else { + return authorizationAttemptInfoBuilder_.getCount(); + } + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + getAuthorizationAttemptInfo(int index) { + if (authorizationAttemptInfoBuilder_ == null) { + return authorizationAttemptInfo_.get(index); + } else { + return authorizationAttemptInfoBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAuthorizationAttemptInfo( + int index, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + value) { + if (authorizationAttemptInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizationAttemptInfoIsMutable(); + authorizationAttemptInfo_.set(index, value); + onChanged(); + } else { + authorizationAttemptInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAuthorizationAttemptInfo( + int index, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder + builderForValue) { + if (authorizationAttemptInfoBuilder_ == null) { + ensureAuthorizationAttemptInfoIsMutable(); + authorizationAttemptInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + authorizationAttemptInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAuthorizationAttemptInfo( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + value) { + if (authorizationAttemptInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizationAttemptInfoIsMutable(); + authorizationAttemptInfo_.add(value); + onChanged(); + } else { + authorizationAttemptInfoBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAuthorizationAttemptInfo( + int index, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo + value) { + if (authorizationAttemptInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizationAttemptInfoIsMutable(); + authorizationAttemptInfo_.add(index, value); + onChanged(); + } else { + authorizationAttemptInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAuthorizationAttemptInfo( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder + builderForValue) { + if (authorizationAttemptInfoBuilder_ == null) { + ensureAuthorizationAttemptInfoIsMutable(); + authorizationAttemptInfo_.add(builderForValue.build()); + onChanged(); + } else { + authorizationAttemptInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAuthorizationAttemptInfo( + int index, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder + builderForValue) { + if (authorizationAttemptInfoBuilder_ == null) { + ensureAuthorizationAttemptInfoIsMutable(); + authorizationAttemptInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + authorizationAttemptInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllAuthorizationAttemptInfo( + java.lang.Iterable< + ? extends + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo> + values) { + if (authorizationAttemptInfoBuilder_ == null) { + ensureAuthorizationAttemptInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, authorizationAttemptInfo_); + onChanged(); + } else { + authorizationAttemptInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAuthorizationAttemptInfo() { + if (authorizationAttemptInfoBuilder_ == null) { + authorizationAttemptInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + authorizationAttemptInfoBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeAuthorizationAttemptInfo(int index) { + if (authorizationAttemptInfoBuilder_ == null) { + ensureAuthorizationAttemptInfoIsMutable(); + authorizationAttemptInfo_.remove(index); + onChanged(); + } else { + authorizationAttemptInfoBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder + getAuthorizationAttemptInfoBuilder(int index) { + return getAuthorizationAttemptInfoFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfoOrBuilder + getAuthorizationAttemptInfoOrBuilder(int index) { + if (authorizationAttemptInfoBuilder_ == null) { + return authorizationAttemptInfo_.get(index); + } else { + return authorizationAttemptInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfoOrBuilder> + getAuthorizationAttemptInfoOrBuilderList() { + if (authorizationAttemptInfoBuilder_ != null) { + return authorizationAttemptInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(authorizationAttemptInfo_); + } + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder + addAuthorizationAttemptInfoBuilder() { + return getAuthorizationAttemptInfoFieldBuilder() + .addBuilder( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.getDefaultInstance()); + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder + addAuthorizationAttemptInfoBuilder(int index) { + return getAuthorizationAttemptInfoFieldBuilder() + .addBuilder( + index, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.getDefaultInstance()); + } + /** + * + * + *
+       * Output only. Detailed state of the latest authorization attempt for each domain
+       * specified for managed certificate resource.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo authorization_attempt_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder> + getAuthorizationAttemptInfoBuilderList() { + return getAuthorizationAttemptInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfoOrBuilder> + getAuthorizationAttemptInfoFieldBuilder() { + if (authorizationAttemptInfoBuilder_ == null) { + authorizationAttemptInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfo.Builder, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .AuthorizationAttemptInfoOrBuilder>( + authorizationAttemptInfo_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + authorizationAttemptInfo_ = null; + } + return authorizationAttemptInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) + private static final com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate(); + } + + public static com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ManagedCertificate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ManagedCertificate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public enum TypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SELF_MANAGED(5), + MANAGED(11), + TYPE_NOT_SET(0); + private final int value; + + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 5: + return SELF_MANAGED; + case 11: + return MANAGED; + case 0: + return TYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * A user-defined name of the certificate. Certificate names must be unique
+   * globally and match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * A user-defined name of the certificate. Certificate names must be unique
+   * globally and match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 8; + private volatile java.lang.Object description_; + /** + * + * + *
+   * One or more paragraphs of text description of a certificate.
+   * 
+ * + * string description = 8; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * One or more paragraphs of text description of a certificate.
+   * 
+ * + * string description = 8; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate.
+   * 
+ * + * .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. The creation timestamp of a Certificate.
+   * 
+ * + * .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. The creation timestamp of a Certificate.
+   * 
+ * + * .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. The last update timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The last update timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The last update timestamp of a Certificate.
+   * 
+ * + * .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 LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Set of labels associated with a Certificate.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Set of labels associated with a Certificate.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Set of labels associated with a Certificate.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Set of labels associated with a Certificate.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SELF_MANAGED_FIELD_NUMBER = 5; + /** + * + * + *
+   * If set, defines data of a self-managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + * + * @return Whether the selfManaged field is set. + */ + @java.lang.Override + public boolean hasSelfManaged() { + return typeCase_ == 5; + } + /** + * + * + *
+   * If set, defines data of a self-managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + * + * @return The selfManaged. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + getSelfManaged() { + if (typeCase_ == 5) { + return (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) type_; + } + return com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + .getDefaultInstance(); + } + /** + * + * + *
+   * If set, defines data of a self-managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificateOrBuilder + getSelfManagedOrBuilder() { + if (typeCase_ == 5) { + return (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) type_; + } + return com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + .getDefaultInstance(); + } + + public static final int MANAGED_FIELD_NUMBER = 11; + /** + * + * + *
+   * If set, contains configuration and state of a managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + * + * @return Whether the managed field is set. + */ + @java.lang.Override + public boolean hasManaged() { + return typeCase_ == 11; + } + /** + * + * + *
+   * If set, contains configuration and state of a managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + * + * @return The managed. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate getManaged() { + if (typeCase_ == 11) { + return (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) type_; + } + return com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .getDefaultInstance(); + } + /** + * + * + *
+   * If set, contains configuration and state of a managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificateOrBuilder + getManagedOrBuilder() { + if (typeCase_ == 11) { + return (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) type_; + } + return com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .getDefaultInstance(); + } + + public static final int SAN_DNSNAMES_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList sanDnsnames_; + /** + * + * + *
+   * Output only. The list of Subject Alternative Names of dnsName type defined in the
+   * certificate (see RFC 5280 4.2.1.6)
+   * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the sanDnsnames. + */ + public com.google.protobuf.ProtocolStringList getSanDnsnamesList() { + return sanDnsnames_; + } + /** + * + * + *
+   * Output only. The list of Subject Alternative Names of dnsName type defined in the
+   * certificate (see RFC 5280 4.2.1.6)
+   * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of sanDnsnames. + */ + public int getSanDnsnamesCount() { + return sanDnsnames_.size(); + } + /** + * + * + *
+   * Output only. The list of Subject Alternative Names of dnsName type defined in the
+   * certificate (see RFC 5280 4.2.1.6)
+   * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The sanDnsnames at the given index. + */ + public java.lang.String getSanDnsnames(int index) { + return sanDnsnames_.get(index); + } + /** + * + * + *
+   * Output only. The list of Subject Alternative Names of dnsName type defined in the
+   * certificate (see RFC 5280 4.2.1.6)
+   * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the sanDnsnames at the given index. + */ + public com.google.protobuf.ByteString getSanDnsnamesBytes(int index) { + return sanDnsnames_.getByteString(index); + } + + public static final int PEM_CERTIFICATE_FIELD_NUMBER = 9; + private volatile java.lang.Object pemCertificate_; + /** + * + * + *
+   * Output only. The PEM-encoded certificate chain.
+   * 
+ * + * string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCertificate. + */ + @java.lang.Override + public java.lang.String getPemCertificate() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCertificate_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The PEM-encoded certificate chain.
+   * 
+ * + * string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPemCertificateBytes() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * Output only. The expiry timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return expireTime_ != null; + } + /** + * + * + *
+   * Output only. The expiry timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * Output only. The expiry timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return getExpireTime(); + } + + public static final int SCOPE_FIELD_NUMBER = 12; + private int scope_; + /** + * + * + *
+   * Immutable. The scope of the certificate.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+   * Immutable. The scope of the certificate.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.Scope getScope() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.Certificate.Scope result = + com.google.cloud.certificatemanager.v1.Certificate.Scope.valueOf(scope_); + return result == null + ? com.google.cloud.certificatemanager.v1.Certificate.Scope.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()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (typeCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) type_); + } + for (int i = 0; i < sanDnsnames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sanDnsnames_.getRaw(i)); + } + if (expireTime_ != null) { + output.writeMessage(7, getExpireTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pemCertificate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, pemCertificate_); + } + if (typeCase_ == 11) { + output.writeMessage( + 11, (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) type_); + } + if (scope_ != com.google.cloud.certificatemanager.v1.Certificate.Scope.DEFAULT.getNumber()) { + output.writeEnum(12, scope_); + } + 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()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (typeCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) type_); + } + { + int dataSize = 0; + for (int i = 0; i < sanDnsnames_.size(); i++) { + dataSize += computeStringSizeNoTag(sanDnsnames_.getRaw(i)); + } + size += dataSize; + size += 1 * getSanDnsnamesList().size(); + } + if (expireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getExpireTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pemCertificate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, pemCertificate_); + } + if (typeCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) type_); + } + if (scope_ != com.google.cloud.certificatemanager.v1.Certificate.Scope.DEFAULT.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, scope_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.Certificate)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.Certificate other = + (com.google.cloud.certificatemanager.v1.Certificate) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getSanDnsnamesList().equals(other.getSanDnsnamesList())) return false; + if (!getPemCertificate().equals(other.getPemCertificate())) return false; + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) return false; + } + if (scope_ != other.scope_) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 5: + if (!getSelfManaged().equals(other.getSelfManaged())) return false; + break; + case 11: + if (!getManaged().equals(other.getManaged())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (getSanDnsnamesCount() > 0) { + hash = (37 * hash) + SAN_DNSNAMES_FIELD_NUMBER; + hash = (53 * hash) + getSanDnsnamesList().hashCode(); + } + hash = (37 * hash) + PEM_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getPemCertificate().hashCode(); + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + switch (typeCase_) { + case 5: + hash = (37 * hash) + SELF_MANAGED_FIELD_NUMBER; + hash = (53 * hash) + getSelfManaged().hashCode(); + break; + case 11: + hash = (37 * hash) + MANAGED_FIELD_NUMBER; + hash = (53 * hash) + getManaged().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.Certificate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.certificatemanager.v1.Certificate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines TLS certificate.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.Certificate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.Certificate) + com.google.cloud.certificatemanager.v1.CertificateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.Certificate.class, + com.google.cloud.certificatemanager.v1.Certificate.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.Certificate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + sanDnsnames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + pemCertificate_ = ""; + + if (expireTimeBuilder_ == null) { + expireTime_ = null; + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + scope_ = 0; + + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_Certificate_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.Certificate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate build() { + com.google.cloud.certificatemanager.v1.Certificate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate buildPartial() { + com.google.cloud.certificatemanager.v1.Certificate result = + new com.google.cloud.certificatemanager.v1.Certificate(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (typeCase_ == 5) { + if (selfManagedBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = selfManagedBuilder_.build(); + } + } + if (typeCase_ == 11) { + if (managedBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = managedBuilder_.build(); + } + } + if (((bitField0_ & 0x00000002) != 0)) { + sanDnsnames_ = sanDnsnames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.sanDnsnames_ = sanDnsnames_; + result.pemCertificate_ = pemCertificate_; + if (expireTimeBuilder_ == null) { + result.expireTime_ = expireTime_; + } else { + result.expireTime_ = expireTimeBuilder_.build(); + } + result.scope_ = scope_; + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.certificatemanager.v1.Certificate) { + return mergeFrom((com.google.cloud.certificatemanager.v1.Certificate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.certificatemanager.v1.Certificate other) { + if (other == com.google.cloud.certificatemanager.v1.Certificate.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (!other.sanDnsnames_.isEmpty()) { + if (sanDnsnames_.isEmpty()) { + sanDnsnames_ = other.sanDnsnames_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSanDnsnamesIsMutable(); + sanDnsnames_.addAll(other.sanDnsnames_); + } + onChanged(); + } + if (!other.getPemCertificate().isEmpty()) { + pemCertificate_ = other.pemCertificate_; + onChanged(); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + switch (other.getTypeCase()) { + case SELF_MANAGED: + { + mergeSelfManaged(other.getSelfManaged()); + break; + } + case MANAGED: + { + mergeManaged(other.getManaged()); + break; + } + case TYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.certificatemanager.v1.Certificate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.Certificate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * A user-defined name of the certificate. Certificate names must be unique
+     * globally and match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A user-defined name of the certificate. Certificate names must be unique
+     * globally and match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A user-defined name of the certificate. Certificate names must be unique
+     * globally and match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A user-defined name of the certificate. Certificate names must be unique
+     * globally and match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A user-defined name of the certificate. Certificate names must be unique
+     * globally and match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * One or more paragraphs of text description of a certificate.
+     * 
+ * + * string description = 8; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate.
+     * 
+ * + * string description = 8; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate.
+     * 
+ * + * string description = 8; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate.
+     * 
+ * + * string description = 8; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate.
+     * 
+ * + * string description = 8; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The creation timestamp of a Certificate.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate.
+     * 
+ * + * + * .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. The last update timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The last update timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The last update timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The last update timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The last update timestamp of a Certificate.
+     * 
+ * + * + * .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 com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Set of labels associated with a Certificate.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Set of labels associated with a Certificate.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Set of labels associated with a Certificate.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate, + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.Builder, + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificateOrBuilder> + selfManagedBuilder_; + /** + * + * + *
+     * If set, defines data of a self-managed certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + * + * @return Whether the selfManaged field is set. + */ + @java.lang.Override + public boolean hasSelfManaged() { + return typeCase_ == 5; + } + /** + * + * + *
+     * If set, defines data of a self-managed certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + * + * @return The selfManaged. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + getSelfManaged() { + if (selfManagedBuilder_ == null) { + if (typeCase_ == 5) { + return (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) type_; + } + return com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + .getDefaultInstance(); + } else { + if (typeCase_ == 5) { + return selfManagedBuilder_.getMessage(); + } + return com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + .getDefaultInstance(); + } + } + /** + * + * + *
+     * If set, defines data of a self-managed certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + */ + public Builder setSelfManaged( + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate value) { + if (selfManagedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + selfManagedBuilder_.setMessage(value); + } + typeCase_ = 5; + return this; + } + /** + * + * + *
+     * If set, defines data of a self-managed certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + */ + public Builder setSelfManaged( + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.Builder + builderForValue) { + if (selfManagedBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + selfManagedBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 5; + return this; + } + /** + * + * + *
+     * If set, defines data of a self-managed certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + */ + public Builder mergeSelfManaged( + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate value) { + if (selfManagedBuilder_ == null) { + if (typeCase_ == 5 + && type_ + != com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + .getDefaultInstance()) { + type_ = + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.newBuilder( + (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) + type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 5) { + selfManagedBuilder_.mergeFrom(value); + } + selfManagedBuilder_.setMessage(value); + } + typeCase_ = 5; + return this; + } + /** + * + * + *
+     * If set, defines data of a self-managed certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + */ + public Builder clearSelfManaged() { + if (selfManagedBuilder_ == null) { + if (typeCase_ == 5) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 5) { + typeCase_ = 0; + type_ = null; + } + selfManagedBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If set, defines data of a self-managed certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + */ + public com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.Builder + getSelfManagedBuilder() { + return getSelfManagedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If set, defines data of a self-managed certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificateOrBuilder + getSelfManagedOrBuilder() { + if ((typeCase_ == 5) && (selfManagedBuilder_ != null)) { + return selfManagedBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 5) { + return (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) type_; + } + return com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + .getDefaultInstance(); + } + } + /** + * + * + *
+     * If set, defines data of a self-managed certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate, + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.Builder, + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificateOrBuilder> + getSelfManagedFieldBuilder() { + if (selfManagedBuilder_ == null) { + if (!(typeCase_ == 5)) { + type_ = + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate + .getDefaultInstance(); + } + selfManagedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate, + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate.Builder, + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificateOrBuilder>( + (com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 5; + onChanged(); + ; + return selfManagedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.Builder, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificateOrBuilder> + managedBuilder_; + /** + * + * + *
+     * If set, contains configuration and state of a managed certificate.
+     * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + * + * @return Whether the managed field is set. + */ + @java.lang.Override + public boolean hasManaged() { + return typeCase_ == 11; + } + /** + * + * + *
+     * If set, contains configuration and state of a managed certificate.
+     * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + * + * @return The managed. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate getManaged() { + if (managedBuilder_ == null) { + if (typeCase_ == 11) { + return (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) type_; + } + return com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .getDefaultInstance(); + } else { + if (typeCase_ == 11) { + return managedBuilder_.getMessage(); + } + return com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .getDefaultInstance(); + } + } + /** + * + * + *
+     * If set, contains configuration and state of a managed certificate.
+     * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + */ + public Builder setManaged( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate value) { + if (managedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + managedBuilder_.setMessage(value); + } + typeCase_ = 11; + return this; + } + /** + * + * + *
+     * If set, contains configuration and state of a managed certificate.
+     * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + */ + public Builder setManaged( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.Builder + builderForValue) { + if (managedBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + managedBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 11; + return this; + } + /** + * + * + *
+     * If set, contains configuration and state of a managed certificate.
+     * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + */ + public Builder mergeManaged( + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate value) { + if (managedBuilder_ == null) { + if (typeCase_ == 11 + && type_ + != com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .getDefaultInstance()) { + type_ = + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.newBuilder( + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 11) { + managedBuilder_.mergeFrom(value); + } + managedBuilder_.setMessage(value); + } + typeCase_ = 11; + return this; + } + /** + * + * + *
+     * If set, contains configuration and state of a managed certificate.
+     * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + */ + public Builder clearManaged() { + if (managedBuilder_ == null) { + if (typeCase_ == 11) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 11) { + typeCase_ = 0; + type_ = null; + } + managedBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If set, contains configuration and state of a managed certificate.
+     * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + */ + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.Builder + getManagedBuilder() { + return getManagedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If set, contains configuration and state of a managed certificate.
+     * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificateOrBuilder + getManagedOrBuilder() { + if ((typeCase_ == 11) && (managedBuilder_ != null)) { + return managedBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 11) { + return (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) type_; + } + return com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .getDefaultInstance(); + } + } + /** + * + * + *
+     * If set, contains configuration and state of a managed certificate.
+     * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.Builder, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificateOrBuilder> + getManagedFieldBuilder() { + if (managedBuilder_ == null) { + if (!(typeCase_ == 11)) { + type_ = + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate + .getDefaultInstance(); + } + managedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.Builder, + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificateOrBuilder>( + (com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 11; + onChanged(); + ; + return managedBuilder_; + } + + private com.google.protobuf.LazyStringList sanDnsnames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSanDnsnamesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + sanDnsnames_ = new com.google.protobuf.LazyStringArrayList(sanDnsnames_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Output only. The list of Subject Alternative Names of dnsName type defined in the
+     * certificate (see RFC 5280 4.2.1.6)
+     * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the sanDnsnames. + */ + public com.google.protobuf.ProtocolStringList getSanDnsnamesList() { + return sanDnsnames_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. The list of Subject Alternative Names of dnsName type defined in the
+     * certificate (see RFC 5280 4.2.1.6)
+     * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of sanDnsnames. + */ + public int getSanDnsnamesCount() { + return sanDnsnames_.size(); + } + /** + * + * + *
+     * Output only. The list of Subject Alternative Names of dnsName type defined in the
+     * certificate (see RFC 5280 4.2.1.6)
+     * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The sanDnsnames at the given index. + */ + public java.lang.String getSanDnsnames(int index) { + return sanDnsnames_.get(index); + } + /** + * + * + *
+     * Output only. The list of Subject Alternative Names of dnsName type defined in the
+     * certificate (see RFC 5280 4.2.1.6)
+     * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the sanDnsnames at the given index. + */ + public com.google.protobuf.ByteString getSanDnsnamesBytes(int index) { + return sanDnsnames_.getByteString(index); + } + /** + * + * + *
+     * Output only. The list of Subject Alternative Names of dnsName type defined in the
+     * certificate (see RFC 5280 4.2.1.6)
+     * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The sanDnsnames to set. + * @return This builder for chaining. + */ + public Builder setSanDnsnames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSanDnsnamesIsMutable(); + sanDnsnames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of Subject Alternative Names of dnsName type defined in the
+     * certificate (see RFC 5280 4.2.1.6)
+     * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sanDnsnames to add. + * @return This builder for chaining. + */ + public Builder addSanDnsnames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSanDnsnamesIsMutable(); + sanDnsnames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of Subject Alternative Names of dnsName type defined in the
+     * certificate (see RFC 5280 4.2.1.6)
+     * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The sanDnsnames to add. + * @return This builder for chaining. + */ + public Builder addAllSanDnsnames(java.lang.Iterable values) { + ensureSanDnsnamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sanDnsnames_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of Subject Alternative Names of dnsName type defined in the
+     * certificate (see RFC 5280 4.2.1.6)
+     * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSanDnsnames() { + sanDnsnames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The list of Subject Alternative Names of dnsName type defined in the
+     * certificate (see RFC 5280 4.2.1.6)
+     * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the sanDnsnames to add. + * @return This builder for chaining. + */ + public Builder addSanDnsnamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSanDnsnamesIsMutable(); + sanDnsnames_.add(value); + onChanged(); + return this; + } + + private java.lang.Object pemCertificate_ = ""; + /** + * + * + *
+     * Output only. The PEM-encoded certificate chain.
+     * 
+ * + * string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCertificate. + */ + public java.lang.String getPemCertificate() { + java.lang.Object ref = pemCertificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pemCertificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The PEM-encoded certificate chain.
+     * 
+ * + * string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + public com.google.protobuf.ByteString getPemCertificateBytes() { + java.lang.Object ref = pemCertificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pemCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The PEM-encoded certificate chain.
+     * 
+ * + * string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pemCertificate to set. + * @return This builder for chaining. + */ + public Builder setPemCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pemCertificate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PEM-encoded certificate chain.
+     * 
+ * + * string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPemCertificate() { + + pemCertificate_ = getDefaultInstance().getPemCertificate(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PEM-encoded certificate chain.
+     * 
+ * + * string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pemCertificate to set. + * @return This builder for chaining. + */ + public Builder setPemCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pemCertificate_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * Output only. The expiry timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return expireTimeBuilder_ != null || expireTime_ != null; + } + /** + * + * + *
+     * Output only. The expiry timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The expiry timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + onChanged(); + } else { + expireTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The expiry timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + onChanged(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The expiry timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (expireTime_ != null) { + expireTime_ = + com.google.protobuf.Timestamp.newBuilder(expireTime_).mergeFrom(value).buildPartial(); + } else { + expireTime_ = value; + } + onChanged(); + } else { + expireTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The expiry timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpireTime() { + if (expireTimeBuilder_ == null) { + expireTime_ = null; + onChanged(); + } else { + expireTime_ = null; + expireTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The expiry timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The expiry timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * Output only. The expiry timestamp of a Certificate.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + private int scope_ = 0; + /** + * + * + *
+     * Immutable. The scope of the certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+     * Immutable. The scope of the certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + + scope_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The scope of the certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate.Scope getScope() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.Certificate.Scope result = + com.google.cloud.certificatemanager.v1.Certificate.Scope.valueOf(scope_); + return result == null + ? com.google.cloud.certificatemanager.v1.Certificate.Scope.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Immutable. The scope of the certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(com.google.cloud.certificatemanager.v1.Certificate.Scope value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The scope of the certificate.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = 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.certificatemanager.v1.Certificate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.Certificate) + private static final com.google.cloud.certificatemanager.v1.Certificate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.Certificate(); + } + + public static com.google.cloud.certificatemanager.v1.Certificate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Certificate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Certificate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerProto.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerProto.java new file mode 100644 index 0000000..8bb65f6 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerProto.java @@ -0,0 +1,975 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public final class CertificateManagerProto { + private CertificateManagerProto() {} + + 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_certificatemanager_v1_ListCertificatesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_ListCertificatesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_ListCertificatesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_ListCertificatesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_GetCertificateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_GetCertificateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_CreateCertificateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_CreateCertificateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_GetCertificateMapRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_GetCertificateMapRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_GetCertificateMapEntryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_GetCertificateMapEntryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapEntryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapEntryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapEntryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapEntryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapEntryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapEntryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_GetDnsAuthorizationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_GetDnsAuthorizationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_CreateDnsAuthorizationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_CreateDnsAuthorizationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_UpdateDnsAuthorizationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_UpdateDnsAuthorizationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_DeleteDnsAuthorizationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_DeleteDnsAuthorizationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_Certificate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_Certificate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_Certificate_SelfManagedCertificate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_Certificate_SelfManagedCertificate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_ProvisioningIssue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_ProvisioningIssue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_AuthorizationAttemptInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_AuthorizationAttemptInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_Certificate_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_Certificate_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_CertificateMap_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_CertificateMap_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_IpConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_IpConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_CertificateMap_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_CertificateMap_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_DnsResourceRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_DnsResourceRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n.goog" + + "le.cloud.certificatemanager.v1.Certifica" + + "teMap.LabelsEntry\022X\n\014gclb_targets\030\004 \003(\0132" + + "=.google.cloud.certificatemanager.v1.Cer" + + "tificateMap.GclbTargetB\003\340A\003\032\277\002\n\nGclbTarg" + + "et\022L\n\022target_https_proxy\030\001 \001(\tB.\372A+\n)com" + + "pute.googleapis.com/TargetHttpsProxiesH\000" + + "\022H\n\020target_ssl_proxy\030\003 \001(\tB,\372A)\n\'compute" + + ".googleapis.com/TargetSslProxiesH\000\022Z\n\nip" + + "_configs\030\002 \003(\0132F.google.cloud.certificat" + + "emanager.v1.CertificateMap.GclbTarget.Ip" + + "Config\032-\n\010IpConfig\022\022\n\nip_address\030\001 \001(\t\022\r" + + "\n\005ports\030\003 \003(\rB\016\n\014target_proxy\032-\n\013LabelsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\200\001\352" + + "A}\n0certificatemanager.googleapis.com/Ce" + + "rtificateMap\022Iprojects/{project}/locatio" + + "ns/{location}/certificateMaps/{certifica" + + "te_map}\"\221\006\n\023CertificateMapEntry\022\014\n\004name\030" + + "\001 \001(\t\022\023\n\013description\030\t \001(\t\0224\n\013create_tim" + + "e\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\022S\n\006labels\030\004 \003(\0132C.google." + + "cloud.certificatemanager.v1.CertificateM" + + "apEntry.LabelsEntry\022\022\n\010hostname\030\005 \001(\tH\000\022" + + "R\n\007matcher\030\n \001(\0162?.google.cloud.certific" + + "atemanager.v1.CertificateMapEntry.Matche" + + "rH\000\022H\n\014certificates\030\007 \003(\tB2\372A/\n-certific" + + "atemanager.googleapis.com/Certificate\022D\n" + + "\005state\030\010 \001(\01620.google.cloud.certificatem" + + "anager.v1.ServingStateB\003\340A\003\032-\n\013LabelsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"/\n\007Ma" + + "tcher\022\027\n\023MATCHER_UNSPECIFIED\020\000\022\013\n\007PRIMAR" + + "Y\020\001:\264\001\352A\260\001\n5certificatemanager.googleapi" + + "s.com/CertificateMapEntry\022wprojects/{pro" + + "ject}/locations/{location}/certificateMa" + + "ps/{certificate_map}/certificateMapEntri" + + "es/{certificate_map_entry}B\007\n\005match\"\374\004\n\020" + + "DnsAuthorization\022\014\n\004name\030\001 \001(\t\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.proto" + + "buf.TimestampB\003\340A\003\022P\n\006labels\030\004 \003(\0132@.goo" + + "gle.cloud.certificatemanager.v1.DnsAutho" + + "rization.LabelsEntry\022\023\n\013description\030\005 \001(" + + "\t\022\026\n\006domain\030\006 \001(\tB\006\340A\002\340A\005\022h\n\023dns_resourc" + + "e_record\030\n \001(\0132F.google.cloud.certificat" + + "emanager.v1.DnsAuthorization.DnsResource" + + "RecordB\003\340A\003\032L\n\021DnsResourceRecord\022\021\n\004name" + + "\030\001 \001(\tB\003\340A\003\022\021\n\004type\030\002 \001(\tB\003\340A\003\022\021\n\004data\030\003" + + " \001(\tB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\207\001\352A\203\001\n2certificatemana" + + "ger.googleapis.com/DnsAuthorization\022Mpro" + + "jects/{project}/locations/{location}/dns" + + "Authorizations/{dns_authorization}*F\n\014Se" + + "rvingState\022\035\n\031SERVING_STATE_UNSPECIFIED\020" + + "\000\022\n\n\006ACTIVE\020\001\022\013\n\007PENDING\020\0022\336(\n\022Certifica" + + "teManager\022\320\001\n\020ListCertificates\022;.google." + + "cloud.certificatemanager.v1.ListCertific" + + "atesRequest\032<.google.cloud.certificatema" + + "nager.v1.ListCertificatesResponse\"A\202\323\344\223\002" + + "2\0220/v1/{parent=projects/*/locations/*}/c" + + "ertificates\332A\006parent\022\275\001\n\016GetCertificate\022" + + "9.google.cloud.certificatemanager.v1.Get" + + "CertificateRequest\032/.google.cloud.certif" + + "icatemanager.v1.Certificate\"?\202\323\344\223\0022\0220/v1" + + "/{name=projects/*/locations/*/certificat" + + "es/*}\332A\004name\022\377\001\n\021CreateCertificate\022<.goo" + + "gle.cloud.certificatemanager.v1.CreateCe" + + "rtificateRequest\032\035.google.longrunning.Op" + + "eration\"\214\001\202\323\344\223\002?\"0/v1/{parent=projects/*" + + "/locations/*}/certificates:\013certificate\332" + + "A!parent,certificate,certificate_id\312A \n\013" + + "Certificate\022\021OperationMetadata\022\201\002\n\021Updat" + + "eCertificate\022<.google.cloud.certificatem" + + "anager.v1.UpdateCertificateRequest\032\035.goo" + + "gle.longrunning.Operation\"\216\001\202\323\344\223\002K2.google.cloud.certi" + + "ficatemanager.v1.ListCertificateMapsRequ" + + "est\032?.google.cloud.certificatemanager.v1" + + ".ListCertificateMapsResponse\"D\202\323\344\223\0025\0223/v" + + "1/{parent=projects/*/locations/*}/certif" + + "icateMaps\332A\006parent\022\311\001\n\021GetCertificateMap" + + "\022<.google.cloud.certificatemanager.v1.Ge" + + "tCertificateMapRequest\0322.google.cloud.ce" + + "rtificatemanager.v1.CertificateMap\"B\202\323\344\223" + + "\0025\0223/v1/{name=projects/*/locations/*/cer" + + "tificateMaps/*}\332A\004name\022\227\002\n\024CreateCertifi" + + "cateMap\022?.google.cloud.certificatemanage" + + "r.v1.CreateCertificateMapRequest\032\035.googl" + + "e.longrunning.Operation\"\236\001\202\323\344\223\002F\"3/v1/{p" + + "arent=projects/*/locations/*}/certificat" + + "eMaps:\017certificate_map\332A)parent,certific" + + "ate_map,certificate_map_id\312A#\n\016Certifica" + + "teMap\022\021OperationMetadata\022\231\002\n\024UpdateCerti" + + "ficateMap\022?.google.cloud.certificatemana" + + "ger.v1.UpdateCertificateMapRequest\032\035.goo" + + "gle.longrunning.Operation\"\240\001\202\323\344\223\002V2C/v1/" + + "{certificate_map.name=projects/*/locatio" + + "ns/*/certificateMaps/*}:\017certificate_map" + + "\332A\033certificate_map,update_mask\312A#\n\016Certi" + + "ficateMap\022\021OperationMetadata\022\347\001\n\024DeleteC" + + "ertificateMap\022?.google.cloud.certificate" + + "manager.v1.DeleteCertificateMapRequest\032\035" + + ".google.longrunning.Operation\"o\202\323\344\223\0025*3/" + + "v1/{name=projects/*/locations/*/certific" + + "ateMaps/*}\332A\004name\312A*\n\025google.protobuf.Em" + + "pty\022\021OperationMetadata\022\206\002\n\031ListCertifica" + + "teMapEntries\022D.google.cloud.certificatem" + + "anager.v1.ListCertificateMapEntriesReque" + + "st\032E.google.cloud.certificatemanager.v1." + + "ListCertificateMapEntriesResponse\"\\\202\323\344\223\002" + + "M\022K/v1/{parent=projects/*/locations/*/ce" + + "rtificateMaps/*}/certificateMapEntries\332A" + + "\006parent\022\360\001\n\026GetCertificateMapEntry\022A.goo" + + "gle.cloud.certificatemanager.v1.GetCerti" + + "ficateMapEntryRequest\0327.google.cloud.cer" + + "tificatemanager.v1.CertificateMapEntry\"Z" + + "\202\323\344\223\002M\022K/v1/{name=projects/*/locations/*" + + "/certificateMaps/*/certificateMapEntries" + + "/*}\332A\004name\022\320\002\n\031CreateCertificateMapEntry" + + "\022D.google.cloud.certificatemanager.v1.Cr" + + "eateCertificateMapEntryRequest\032\035.google." + + "longrunning.Operation\"\315\001\202\323\344\223\002d\"K/v1/{par" + + "ent=projects/*/locations/*/certificateMa" + + "ps/*}/certificateMapEntries:\025certificate" + + "_map_entry\332A5parent,certificate_map_entr" + + "y,certificate_map_entry_id\312A(\n\023Certifica" + + "teMapEntry\022\021OperationMetadata\022\322\002\n\031Update" + + "CertificateMapEntry\022D.google.cloud.certi" + + "ficatemanager.v1.UpdateCertificateMapEnt" + + "ryRequest\032\035.google.longrunning.Operation" + + "\"\317\001\202\323\344\223\002z2a/v1/{certificate_map_entry.na" + + "me=projects/*/locations/*/certificateMap" + + "s/*/certificateMapEntries/*}:\025certificat" + + "e_map_entry\332A!certificate_map_entry,upda" + + "te_mask\312A(\n\023CertificateMapEntry\022\021Operati" + + "onMetadata\022\212\002\n\031DeleteCertificateMapEntry" + + "\022D.google.cloud.certificatemanager.v1.De" + + "leteCertificateMapEntryRequest\032\035.google." + + "longrunning.Operation\"\207\001\202\323\344\223\002M*K/v1/{nam" + + "e=projects/*/locations/*/certificateMaps" + + "/*/certificateMapEntries/*}\332A\004name\312A*\n\025g" + + "oogle.protobuf.Empty\022\021OperationMetadata\022" + + "\344\001\n\025ListDnsAuthorizations\022@.google.cloud" + + ".certificatemanager.v1.ListDnsAuthorizat" + + "ionsRequest\032A.google.cloud.certificatema" + + "nager.v1.ListDnsAuthorizationsResponse\"F" + + "\202\323\344\223\0027\0225/v1/{parent=projects/*/locations" + + "/*}/dnsAuthorizations\332A\006parent\022\321\001\n\023GetDn" + + "sAuthorization\022>.google.cloud.certificat" + + "emanager.v1.GetDnsAuthorizationRequest\0324" + + ".google.cloud.certificatemanager.v1.DnsA" + + "uthorization\"D\202\323\344\223\0027\0225/v1/{name=projects" + + "/*/locations/*/dnsAuthorizations/*}\332A\004na" + + "me\022\245\002\n\026CreateDnsAuthorization\022A.google.c" + + "loud.certificatemanager.v1.CreateDnsAuth" + + "orizationRequest\032\035.google.longrunning.Op" + + "eration\"\250\001\202\323\344\223\002J\"5/v1/{parent=projects/*" + + "/locations/*}/dnsAuthorizations:\021dns_aut" + + "horization\332A-parent,dns_authorization,dn" + + "s_authorization_id\312A%\n\020DnsAuthorization\022" + + "\021OperationMetadata\022\247\002\n\026UpdateDnsAuthoriz" + + "ation\022A.google.cloud.certificatemanager." + + "v1.UpdateDnsAuthorizationRequest\032\035.googl" + + "e.longrunning.Operation\"\252\001\202\323\344\223\002\\2G/v1/{d" + + "ns_authorization.name=projects/*/locatio" + + "ns/*/dnsAuthorizations/*}:\021dns_authoriza" + + "tion\332A\035dns_authorization,update_mask\312A%\n" + + "\020DnsAuthorization\022\021OperationMetadata\022\355\001\n" + + "\026DeleteDnsAuthorization\022A.google.cloud.c" + + "ertificatemanager.v1.DeleteDnsAuthorizat" + + "ionRequest\032\035.google.longrunning.Operatio" + + "n\"q\202\323\344\223\0027*5/v1/{name=projects/*/location" + + "s/*/dnsAuthorizations/*}\332A\004name\312A*\n\025goog" + + "le.protobuf.Empty\022\021OperationMetadata\032U\312A" + + "!certificatemanager.googleapis.com\322A.htt" + + "ps://www.googleapis.com/auth/cloud-platf" + + "ormB\377\003\n&com.google.cloud.certificatemana" + + "ger.v1B\027CertificateManagerProtoP\001ZTgoogl" + + "e.golang.org/genproto/googleapis/cloud/c" + + "ertificatemanager/v1;certificatemanager\252" + + "\002\"Google.Cloud.CertificateManager.V1\312\002\"G" + + "oogle\\Cloud\\CertificateManager\\V1\352\002%Goog" + + "le::Cloud::CertificateManager::V1\352Az\n)co" + + "mpute.googleapis.com/TargetHttpsProxies\022" + + "Mprojects/{project}/locations/{location}" + + "/targetHttpsProxies/{targetHttpsProxy}\352A" + + "t\n\'compute.googleapis.com/TargetSslProxi" + + "es\022Iprojects/{project}/locations/{locati" + + "on}/targetSslProxies/{targetSslProxy}b\006p" + + "roto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_certificatemanager_v1_ListCertificatesRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_certificatemanager_v1_ListCertificatesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_ListCertificatesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_certificatemanager_v1_ListCertificatesResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_certificatemanager_v1_ListCertificatesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_ListCertificatesResponse_descriptor, + new java.lang.String[] { + "Certificates", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_certificatemanager_v1_GetCertificateRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_certificatemanager_v1_GetCertificateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_GetCertificateRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_certificatemanager_v1_CreateCertificateRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_certificatemanager_v1_CreateCertificateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_CreateCertificateRequest_descriptor, + new java.lang.String[] { + "Parent", "CertificateId", "Certificate", + }); + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateRequest_descriptor, + new java.lang.String[] { + "Certificate", "UpdateMask", + }); + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsResponse_descriptor, + new java.lang.String[] { + "CertificateMaps", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_certificatemanager_v1_GetCertificateMapRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_certificatemanager_v1_GetCertificateMapRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_GetCertificateMapRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapRequest_descriptor, + new java.lang.String[] { + "Parent", "CertificateMapId", "CertificateMap", + }); + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapRequest_descriptor, + new java.lang.String[] { + "CertificateMap", "UpdateMask", + }); + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesResponse_descriptor, + new java.lang.String[] { + "CertificateMapEntries", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_certificatemanager_v1_GetCertificateMapEntryRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_certificatemanager_v1_GetCertificateMapEntryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_GetCertificateMapEntryRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapEntryRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapEntryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapEntryRequest_descriptor, + new java.lang.String[] { + "Parent", "CertificateMapEntryId", "CertificateMapEntry", + }); + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapEntryRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapEntryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapEntryRequest_descriptor, + new java.lang.String[] { + "CertificateMapEntry", "UpdateMask", + }); + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapEntryRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapEntryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapEntryRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsResponse_descriptor, + new java.lang.String[] { + "DnsAuthorizations", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_certificatemanager_v1_GetDnsAuthorizationRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_certificatemanager_v1_GetDnsAuthorizationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_GetDnsAuthorizationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_certificatemanager_v1_CreateDnsAuthorizationRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_certificatemanager_v1_CreateDnsAuthorizationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_CreateDnsAuthorizationRequest_descriptor, + new java.lang.String[] { + "Parent", "DnsAuthorizationId", "DnsAuthorization", + }); + internal_static_google_cloud_certificatemanager_v1_UpdateDnsAuthorizationRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_certificatemanager_v1_UpdateDnsAuthorizationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_UpdateDnsAuthorizationRequest_descriptor, + new java.lang.String[] { + "DnsAuthorization", "UpdateMask", + }); + internal_static_google_cloud_certificatemanager_v1_DeleteDnsAuthorizationRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_certificatemanager_v1_DeleteDnsAuthorizationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_DeleteDnsAuthorizationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_certificatemanager_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_certificatemanager_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + internal_static_google_cloud_certificatemanager_v1_Certificate_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_certificatemanager_v1_Certificate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_Certificate_descriptor, + new java.lang.String[] { + "Name", + "Description", + "CreateTime", + "UpdateTime", + "Labels", + "SelfManaged", + "Managed", + "SanDnsnames", + "PemCertificate", + "ExpireTime", + "Scope", + "Type", + }); + internal_static_google_cloud_certificatemanager_v1_Certificate_SelfManagedCertificate_descriptor = + internal_static_google_cloud_certificatemanager_v1_Certificate_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_certificatemanager_v1_Certificate_SelfManagedCertificate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_Certificate_SelfManagedCertificate_descriptor, + new java.lang.String[] { + "PemCertificate", "PemPrivateKey", + }); + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_descriptor = + internal_static_google_cloud_certificatemanager_v1_Certificate_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_descriptor, + new java.lang.String[] { + "Domains", + "DnsAuthorizations", + "State", + "ProvisioningIssue", + "AuthorizationAttemptInfo", + }); + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_ProvisioningIssue_descriptor = + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_ProvisioningIssue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_ProvisioningIssue_descriptor, + new java.lang.String[] { + "Reason", "Details", + }); + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_AuthorizationAttemptInfo_descriptor = + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_AuthorizationAttemptInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_Certificate_ManagedCertificate_AuthorizationAttemptInfo_descriptor, + new java.lang.String[] { + "Domain", "State", "FailureReason", "Details", + }); + internal_static_google_cloud_certificatemanager_v1_Certificate_LabelsEntry_descriptor = + internal_static_google_cloud_certificatemanager_v1_Certificate_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_certificatemanager_v1_Certificate_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_Certificate_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_certificatemanager_v1_CertificateMap_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_certificatemanager_v1_CertificateMap_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_CertificateMap_descriptor, + new java.lang.String[] { + "Name", "Description", "CreateTime", "UpdateTime", "Labels", "GclbTargets", + }); + internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_descriptor = + internal_static_google_cloud_certificatemanager_v1_CertificateMap_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_descriptor, + new java.lang.String[] { + "TargetHttpsProxy", "TargetSslProxy", "IpConfigs", "TargetProxy", + }); + internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_IpConfig_descriptor = + internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_IpConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_IpConfig_descriptor, + new java.lang.String[] { + "IpAddress", "Ports", + }); + internal_static_google_cloud_certificatemanager_v1_CertificateMap_LabelsEntry_descriptor = + internal_static_google_cloud_certificatemanager_v1_CertificateMap_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_certificatemanager_v1_CertificateMap_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_CertificateMap_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_descriptor, + new java.lang.String[] { + "Name", + "Description", + "CreateTime", + "UpdateTime", + "Labels", + "Hostname", + "Matcher", + "Certificates", + "State", + "Match", + }); + internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_LabelsEntry_descriptor = + internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Description", + "Domain", + "DnsResourceRecord", + }); + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_DnsResourceRecord_descriptor = + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_DnsResourceRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_DnsResourceRecord_descriptor, + new java.lang.String[] { + "Name", "Type", "Data", + }); + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_LabelsEntry_descriptor = + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + 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.resourceDefinition); + 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMap.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMap.java new file mode 100644 index 0000000..56690bc --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMap.java @@ -0,0 +1,5060 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Defines a collection of certificate configurations.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CertificateMap} + */ +public final class CertificateMap extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.CertificateMap) + CertificateMapOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateMap.newBuilder() to construct. + private CertificateMap(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateMap() { + name_ = ""; + description_ = ""; + gclbTargets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateMap(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CertificateMap( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + gclbTargets_ = + new java.util.ArrayList< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget>(); + mutable_bitField0_ |= 0x00000002; + } + gclbTargets_.add( + input.readMessage( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.parser(), + extensionRegistry)); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + gclbTargets_ = java.util.Collections.unmodifiableList(gclbTargets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CertificateMap.class, + com.google.cloud.certificatemanager.v1.CertificateMap.Builder.class); + } + + public interface GclbTargetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.CertificateMap.GclbTarget) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetHttpsProxies/*`.
+     * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetHttpsProxy field is set. + */ + boolean hasTargetHttpsProxy(); + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetHttpsProxies/*`.
+     * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @return The targetHttpsProxy. + */ + java.lang.String getTargetHttpsProxy(); + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetHttpsProxies/*`.
+     * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetHttpsProxy. + */ + com.google.protobuf.ByteString getTargetHttpsProxyBytes(); + + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetSslProxies/*`.
+     * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetSslProxy field is set. + */ + boolean hasTargetSslProxy(); + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetSslProxies/*`.
+     * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @return The targetSslProxy. + */ + java.lang.String getTargetSslProxy(); + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetSslProxies/*`.
+     * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetSslProxy. + */ + com.google.protobuf.ByteString getTargetSslProxyBytes(); + + /** + * + * + *
+     * IP configurations for this Target Proxy where the
+     * Certificate Map is serving.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + java.util.List + getIpConfigsList(); + /** + * + * + *
+     * IP configurations for this Target Proxy where the
+     * Certificate Map is serving.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig getIpConfigs( + int index); + /** + * + * + *
+     * IP configurations for this Target Proxy where the
+     * Certificate Map is serving.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + int getIpConfigsCount(); + /** + * + * + *
+     * IP configurations for this Target Proxy where the
+     * Certificate Map is serving.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfigOrBuilder> + getIpConfigsOrBuilderList(); + /** + * + * + *
+     * IP configurations for this Target Proxy where the
+     * Certificate Map is serving.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfigOrBuilder + getIpConfigsOrBuilder(int index); + + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.TargetProxyCase + getTargetProxyCase(); + } + /** + * + * + *
+   * Describes a Target Proxy which uses this Certificate Map.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CertificateMap.GclbTarget} + */ + public static final class GclbTarget extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.CertificateMap.GclbTarget) + GclbTargetOrBuilder { + private static final long serialVersionUID = 0L; + // Use GclbTarget.newBuilder() to construct. + private GclbTarget(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GclbTarget() { + ipConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GclbTarget(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GclbTarget( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + targetProxyCase_ = 1; + targetProxy_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ipConfigs_ = + new java.util.ArrayList< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + .IpConfig>(); + mutable_bitField0_ |= 0x00000001; + } + ipConfigs_.add( + input.readMessage( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + .parser(), + extensionRegistry)); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + targetProxyCase_ = 3; + targetProxy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ipConfigs_ = java.util.Collections.unmodifiableList(ipConfigs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.class, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.Builder.class); + } + + public interface IpConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * An external IP address.
+       * 
+ * + * string ip_address = 1; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+       * An external IP address.
+       * 
+ * + * string ip_address = 1; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+       * Ports.
+       * 
+ * + * repeated uint32 ports = 3; + * + * @return A list containing the ports. + */ + java.util.List getPortsList(); + /** + * + * + *
+       * Ports.
+       * 
+ * + * repeated uint32 ports = 3; + * + * @return The count of ports. + */ + int getPortsCount(); + /** + * + * + *
+       * Ports.
+       * 
+ * + * repeated uint32 ports = 3; + * + * @param index The index of the element to return. + * @return The ports at the given index. + */ + int getPorts(int index); + } + /** + * + * + *
+     * Defines IP configuration where this Certificate Map is serving.
+     * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig} + */ + public static final class IpConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig) + IpConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use IpConfig.newBuilder() to construct. + private IpConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IpConfig() { + ipAddress_ = ""; + ports_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IpConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IpConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + ipAddress_ = s; + break; + } + case 24: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ports_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + ports_.addInt(input.readUInt32()); + break; + } + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + ports_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + ports_.addInt(input.readUInt32()); + } + input.popLimit(limit); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ports_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_IpConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_IpConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.class, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder + .class); + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object ipAddress_; + /** + * + * + *
+       * An external IP address.
+       * 
+ * + * string ip_address = 1; + * + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } + } + /** + * + * + *
+       * An external IP address.
+       * 
+ * + * string ip_address = 1; + * + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORTS_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.IntList ports_; + /** + * + * + *
+       * Ports.
+       * 
+ * + * repeated uint32 ports = 3; + * + * @return A list containing the ports. + */ + @java.lang.Override + public java.util.List getPortsList() { + return ports_; + } + /** + * + * + *
+       * Ports.
+       * 
+ * + * repeated uint32 ports = 3; + * + * @return The count of ports. + */ + public int getPortsCount() { + return ports_.size(); + } + /** + * + * + *
+       * Ports.
+       * 
+ * + * repeated uint32 ports = 3; + * + * @param index The index of the element to return. + * @return The ports at the given index. + */ + public int getPorts(int index) { + return ports_.getInt(index); + } + + private int portsMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_); + } + if (getPortsList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(portsMemoizedSerializedSize); + } + for (int i = 0; i < ports_.size(); i++) { + output.writeUInt32NoTag(ports_.getInt(i)); + } + 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(ipAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_); + } + { + int dataSize = 0; + for (int i = 0; i < ports_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(ports_.getInt(i)); + } + size += dataSize; + if (!getPortsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + portsMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig other = + (com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig) obj; + + if (!getIpAddress().equals(other.getIpAddress())) return false; + if (!getPortsList().equals(other.getPortsList())) 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) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + if (getPortsCount() > 0) { + hash = (37 * hash) + PORTS_FIELD_NUMBER; + hash = (53 * hash) + getPortsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Defines IP configuration where this Certificate Map is serving.
+       * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig) + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_IpConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_IpConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.class, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.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(); + ipAddress_ = ""; + + ports_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_IpConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig build() { + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + buildPartial() { + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig result = + new com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig(this); + int from_bitField0_ = bitField0_; + result.ipAddress_ = ipAddress_; + if (((bitField0_ & 0x00000001) != 0)) { + ports_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ports_ = ports_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig other) { + if (other + == com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + .getDefaultInstance()) return this; + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + onChanged(); + } + if (!other.ports_.isEmpty()) { + if (ports_.isEmpty()) { + ports_ = other.ports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePortsIsMutable(); + ports_.addAll(other.ports_); + } + 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.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object ipAddress_ = ""; + /** + * + * + *
+         * An external IP address.
+         * 
+ * + * string ip_address = 1; + * + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * An external IP address.
+         * 
+ * + * string ip_address = 1; + * + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * An external IP address.
+         * 
+ * + * string ip_address = 1; + * + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ipAddress_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * An external IP address.
+         * 
+ * + * string ip_address = 1; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + + ipAddress_ = getDefaultInstance().getIpAddress(); + onChanged(); + return this; + } + /** + * + * + *
+         * An external IP address.
+         * 
+ * + * string ip_address = 1; + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ipAddress_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList ports_ = emptyIntList(); + + private void ensurePortsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ports_ = mutableCopy(ports_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+         * Ports.
+         * 
+ * + * repeated uint32 ports = 3; + * + * @return A list containing the ports. + */ + public java.util.List getPortsList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(ports_) + : ports_; + } + /** + * + * + *
+         * Ports.
+         * 
+ * + * repeated uint32 ports = 3; + * + * @return The count of ports. + */ + public int getPortsCount() { + return ports_.size(); + } + /** + * + * + *
+         * Ports.
+         * 
+ * + * repeated uint32 ports = 3; + * + * @param index The index of the element to return. + * @return The ports at the given index. + */ + public int getPorts(int index) { + return ports_.getInt(index); + } + /** + * + * + *
+         * Ports.
+         * 
+ * + * repeated uint32 ports = 3; + * + * @param index The index to set the value at. + * @param value The ports to set. + * @return This builder for chaining. + */ + public Builder setPorts(int index, int value) { + ensurePortsIsMutable(); + ports_.setInt(index, value); + onChanged(); + return this; + } + /** + * + * + *
+         * Ports.
+         * 
+ * + * repeated uint32 ports = 3; + * + * @param value The ports to add. + * @return This builder for chaining. + */ + public Builder addPorts(int value) { + ensurePortsIsMutable(); + ports_.addInt(value); + onChanged(); + return this; + } + /** + * + * + *
+         * Ports.
+         * 
+ * + * repeated uint32 ports = 3; + * + * @param values The ports to add. + * @return This builder for chaining. + */ + public Builder addAllPorts(java.lang.Iterable values) { + ensurePortsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ports_); + onChanged(); + return this; + } + /** + * + * + *
+         * Ports.
+         * 
+ * + * repeated uint32 ports = 3; + * + * @return This builder for chaining. + */ + public Builder clearPorts() { + ports_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig) + private static final com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig(); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IpConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IpConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int targetProxyCase_ = 0; + private java.lang.Object targetProxy_; + + public enum TargetProxyCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TARGET_HTTPS_PROXY(1), + TARGET_SSL_PROXY(3), + TARGETPROXY_NOT_SET(0); + private final int value; + + private TargetProxyCase(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 TargetProxyCase valueOf(int value) { + return forNumber(value); + } + + public static TargetProxyCase forNumber(int value) { + switch (value) { + case 1: + return TARGET_HTTPS_PROXY; + case 3: + return TARGET_SSL_PROXY; + case 0: + return TARGETPROXY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetProxyCase getTargetProxyCase() { + return TargetProxyCase.forNumber(targetProxyCase_); + } + + public static final int TARGET_HTTPS_PROXY_FIELD_NUMBER = 1; + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetHttpsProxies/*`.
+     * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetHttpsProxy field is set. + */ + public boolean hasTargetHttpsProxy() { + return targetProxyCase_ == 1; + } + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetHttpsProxies/*`.
+     * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @return The targetHttpsProxy. + */ + public java.lang.String getTargetHttpsProxy() { + java.lang.Object ref = ""; + if (targetProxyCase_ == 1) { + ref = targetProxy_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetProxyCase_ == 1) { + targetProxy_ = s; + } + return s; + } + } + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetHttpsProxies/*`.
+     * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetHttpsProxy. + */ + public com.google.protobuf.ByteString getTargetHttpsProxyBytes() { + java.lang.Object ref = ""; + if (targetProxyCase_ == 1) { + ref = targetProxy_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetProxyCase_ == 1) { + targetProxy_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_SSL_PROXY_FIELD_NUMBER = 3; + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetSslProxies/*`.
+     * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetSslProxy field is set. + */ + public boolean hasTargetSslProxy() { + return targetProxyCase_ == 3; + } + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetSslProxies/*`.
+     * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @return The targetSslProxy. + */ + public java.lang.String getTargetSslProxy() { + java.lang.Object ref = ""; + if (targetProxyCase_ == 3) { + ref = targetProxy_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetProxyCase_ == 3) { + targetProxy_ = s; + } + return s; + } + } + /** + * + * + *
+     * A name must be in the format
+     * `projects/*/locations/*/targetSslProxies/*`.
+     * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetSslProxy. + */ + public com.google.protobuf.ByteString getTargetSslProxyBytes() { + java.lang.Object ref = ""; + if (targetProxyCase_ == 3) { + ref = targetProxy_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetProxyCase_ == 3) { + targetProxy_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_CONFIGS_FIELD_NUMBER = 2; + private java.util.List< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig> + ipConfigs_; + /** + * + * + *
+     * IP configurations for this Target Proxy where the
+     * Certificate Map is serving.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + @java.lang.Override + public java.util.List + getIpConfigsList() { + return ipConfigs_; + } + /** + * + * + *
+     * IP configurations for this Target Proxy where the
+     * Certificate Map is serving.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfigOrBuilder> + getIpConfigsOrBuilderList() { + return ipConfigs_; + } + /** + * + * + *
+     * IP configurations for this Target Proxy where the
+     * Certificate Map is serving.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + @java.lang.Override + public int getIpConfigsCount() { + return ipConfigs_.size(); + } + /** + * + * + *
+     * IP configurations for this Target Proxy where the
+     * Certificate Map is serving.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig getIpConfigs( + int index) { + return ipConfigs_.get(index); + } + /** + * + * + *
+     * IP configurations for this Target Proxy where the
+     * Certificate Map is serving.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfigOrBuilder + getIpConfigsOrBuilder(int index) { + return ipConfigs_.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 (targetProxyCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, targetProxy_); + } + for (int i = 0; i < ipConfigs_.size(); i++) { + output.writeMessage(2, ipConfigs_.get(i)); + } + if (targetProxyCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetProxy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetProxyCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, targetProxy_); + } + for (int i = 0; i < ipConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, ipConfigs_.get(i)); + } + if (targetProxyCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, targetProxy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget other = + (com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget) obj; + + if (!getIpConfigsList().equals(other.getIpConfigsList())) return false; + if (!getTargetProxyCase().equals(other.getTargetProxyCase())) return false; + switch (targetProxyCase_) { + case 1: + if (!getTargetHttpsProxy().equals(other.getTargetHttpsProxy())) return false; + break; + case 3: + if (!getTargetSslProxy().equals(other.getTargetSslProxy())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIpConfigsCount() > 0) { + hash = (37 * hash) + IP_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getIpConfigsList().hashCode(); + } + switch (targetProxyCase_) { + case 1: + hash = (37 * hash) + TARGET_HTTPS_PROXY_FIELD_NUMBER; + hash = (53 * hash) + getTargetHttpsProxy().hashCode(); + break; + case 3: + hash = (37 * hash) + TARGET_SSL_PROXY_FIELD_NUMBER; + hash = (53 * hash) + getTargetSslProxy().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Describes a Target Proxy which uses this Certificate Map.
+     * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CertificateMap.GclbTarget} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.CertificateMap.GclbTarget) + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.class, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIpConfigsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (ipConfigsBuilder_ == null) { + ipConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ipConfigsBuilder_.clear(); + } + targetProxyCase_ = 0; + targetProxy_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_GclbTarget_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget build() { + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget buildPartial() { + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget result = + new com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget(this); + int from_bitField0_ = bitField0_; + if (targetProxyCase_ == 1) { + result.targetProxy_ = targetProxy_; + } + if (targetProxyCase_ == 3) { + result.targetProxy_ = targetProxy_; + } + if (ipConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ipConfigs_ = java.util.Collections.unmodifiableList(ipConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ipConfigs_ = ipConfigs_; + } else { + result.ipConfigs_ = ipConfigsBuilder_.build(); + } + result.targetProxyCase_ = targetProxyCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget other) { + if (other + == com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + .getDefaultInstance()) return this; + if (ipConfigsBuilder_ == null) { + if (!other.ipConfigs_.isEmpty()) { + if (ipConfigs_.isEmpty()) { + ipConfigs_ = other.ipConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIpConfigsIsMutable(); + ipConfigs_.addAll(other.ipConfigs_); + } + onChanged(); + } + } else { + if (!other.ipConfigs_.isEmpty()) { + if (ipConfigsBuilder_.isEmpty()) { + ipConfigsBuilder_.dispose(); + ipConfigsBuilder_ = null; + ipConfigs_ = other.ipConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + ipConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIpConfigsFieldBuilder() + : null; + } else { + ipConfigsBuilder_.addAllMessages(other.ipConfigs_); + } + } + } + switch (other.getTargetProxyCase()) { + case TARGET_HTTPS_PROXY: + { + targetProxyCase_ = 1; + targetProxy_ = other.targetProxy_; + onChanged(); + break; + } + case TARGET_SSL_PROXY: + { + targetProxyCase_ = 3; + targetProxy_ = other.targetProxy_; + onChanged(); + break; + } + case TARGETPROXY_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.certificatemanager.v1.CertificateMap.GclbTarget parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int targetProxyCase_ = 0; + private java.lang.Object targetProxy_; + + public TargetProxyCase getTargetProxyCase() { + return TargetProxyCase.forNumber(targetProxyCase_); + } + + public Builder clearTargetProxy() { + targetProxyCase_ = 0; + targetProxy_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetHttpsProxies/*`.
+       * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetHttpsProxy field is set. + */ + @java.lang.Override + public boolean hasTargetHttpsProxy() { + return targetProxyCase_ == 1; + } + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetHttpsProxies/*`.
+       * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @return The targetHttpsProxy. + */ + @java.lang.Override + public java.lang.String getTargetHttpsProxy() { + java.lang.Object ref = ""; + if (targetProxyCase_ == 1) { + ref = targetProxy_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetProxyCase_ == 1) { + targetProxy_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetHttpsProxies/*`.
+       * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetHttpsProxy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetHttpsProxyBytes() { + java.lang.Object ref = ""; + if (targetProxyCase_ == 1) { + ref = targetProxy_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetProxyCase_ == 1) { + targetProxy_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetHttpsProxies/*`.
+       * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The targetHttpsProxy to set. + * @return This builder for chaining. + */ + public Builder setTargetHttpsProxy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetProxyCase_ = 1; + targetProxy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetHttpsProxies/*`.
+       * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTargetHttpsProxy() { + if (targetProxyCase_ == 1) { + targetProxyCase_ = 0; + targetProxy_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetHttpsProxies/*`.
+       * 
+ * + * string target_https_proxy = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for targetHttpsProxy to set. + * @return This builder for chaining. + */ + public Builder setTargetHttpsProxyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetProxyCase_ = 1; + targetProxy_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetSslProxies/*`.
+       * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @return Whether the targetSslProxy field is set. + */ + @java.lang.Override + public boolean hasTargetSslProxy() { + return targetProxyCase_ == 3; + } + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetSslProxies/*`.
+       * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @return The targetSslProxy. + */ + @java.lang.Override + public java.lang.String getTargetSslProxy() { + java.lang.Object ref = ""; + if (targetProxyCase_ == 3) { + ref = targetProxy_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetProxyCase_ == 3) { + targetProxy_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetSslProxies/*`.
+       * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for targetSslProxy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetSslProxyBytes() { + java.lang.Object ref = ""; + if (targetProxyCase_ == 3) { + ref = targetProxy_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetProxyCase_ == 3) { + targetProxy_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetSslProxies/*`.
+       * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The targetSslProxy to set. + * @return This builder for chaining. + */ + public Builder setTargetSslProxy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetProxyCase_ = 3; + targetProxy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetSslProxies/*`.
+       * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTargetSslProxy() { + if (targetProxyCase_ == 3) { + targetProxyCase_ = 0; + targetProxy_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * A name must be in the format
+       * `projects/*/locations/*/targetSslProxies/*`.
+       * 
+ * + * string target_ssl_proxy = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for targetSslProxy to set. + * @return This builder for chaining. + */ + public Builder setTargetSslProxyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetProxyCase_ = 3; + targetProxy_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig> + ipConfigs_ = java.util.Collections.emptyList(); + + private void ensureIpConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ipConfigs_ = + new java.util.ArrayList< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig>( + ipConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfigOrBuilder> + ipConfigsBuilder_; + + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public java.util.List< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig> + getIpConfigsList() { + if (ipConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(ipConfigs_); + } else { + return ipConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public int getIpConfigsCount() { + if (ipConfigsBuilder_ == null) { + return ipConfigs_.size(); + } else { + return ipConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig getIpConfigs( + int index) { + if (ipConfigsBuilder_ == null) { + return ipConfigs_.get(index); + } else { + return ipConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public Builder setIpConfigs( + int index, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig value) { + if (ipConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpConfigsIsMutable(); + ipConfigs_.set(index, value); + onChanged(); + } else { + ipConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public Builder setIpConfigs( + int index, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder + builderForValue) { + if (ipConfigsBuilder_ == null) { + ensureIpConfigsIsMutable(); + ipConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + ipConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public Builder addIpConfigs( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig value) { + if (ipConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpConfigsIsMutable(); + ipConfigs_.add(value); + onChanged(); + } else { + ipConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public Builder addIpConfigs( + int index, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig value) { + if (ipConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpConfigsIsMutable(); + ipConfigs_.add(index, value); + onChanged(); + } else { + ipConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public Builder addIpConfigs( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder + builderForValue) { + if (ipConfigsBuilder_ == null) { + ensureIpConfigsIsMutable(); + ipConfigs_.add(builderForValue.build()); + onChanged(); + } else { + ipConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public Builder addIpConfigs( + int index, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder + builderForValue) { + if (ipConfigsBuilder_ == null) { + ensureIpConfigsIsMutable(); + ipConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + ipConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public Builder addAllIpConfigs( + java.lang.Iterable< + ? extends + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig> + values) { + if (ipConfigsBuilder_ == null) { + ensureIpConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ipConfigs_); + onChanged(); + } else { + ipConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public Builder clearIpConfigs() { + if (ipConfigsBuilder_ == null) { + ipConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + ipConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public Builder removeIpConfigs(int index) { + if (ipConfigsBuilder_ == null) { + ensureIpConfigsIsMutable(); + ipConfigs_.remove(index); + onChanged(); + } else { + ipConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder + getIpConfigsBuilder(int index) { + return getIpConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfigOrBuilder + getIpConfigsOrBuilder(int index) { + if (ipConfigsBuilder_ == null) { + return ipConfigs_.get(index); + } else { + return ipConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + .IpConfigOrBuilder> + getIpConfigsOrBuilderList() { + if (ipConfigsBuilder_ != null) { + return ipConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ipConfigs_); + } + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder + addIpConfigsBuilder() { + return getIpConfigsFieldBuilder() + .addBuilder( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + .getDefaultInstance()); + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder + addIpConfigsBuilder(int index) { + return getIpConfigsFieldBuilder() + .addBuilder( + index, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig + .getDefaultInstance()); + } + /** + * + * + *
+       * IP configurations for this Target Proxy where the
+       * Certificate Map is serving.
+       * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig ip_configs = 2; + * + */ + public java.util.List< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder> + getIpConfigsBuilderList() { + return getIpConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfigOrBuilder> + getIpConfigsFieldBuilder() { + if (ipConfigsBuilder_ == null) { + ipConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig.Builder, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + .IpConfigOrBuilder>( + ipConfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + ipConfigs_ = null; + } + return ipConfigsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.CertificateMap.GclbTarget) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.CertificateMap.GclbTarget) + private static final com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget(); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GclbTarget parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GclbTarget(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * A user-defined name of the Certificate Map. Certificate Map names must be
+   * unique globally and match pattern
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * A user-defined name of the Certificate Map. Certificate Map names must be
+   * unique globally and match pattern
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + private volatile java.lang.Object description_; + /** + * + * + *
+   * One or more paragraphs of text description of a certificate map.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * One or more paragraphs of text description of a certificate map.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate Map.
+   * 
+ * + * .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. The creation timestamp of a Certificate Map.
+   * 
+ * + * .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. The creation timestamp of a Certificate Map.
+   * 
+ * + * .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 = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The update timestamp of a Certificate Map.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The update timestamp of a Certificate Map.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The update timestamp of a Certificate Map.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LABELS_FIELD_NUMBER = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Set of labels associated with a Certificate Map.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Set of labels associated with a Certificate Map.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Set of labels associated with a Certificate Map.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Set of labels associated with a Certificate Map.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int GCLB_TARGETS_FIELD_NUMBER = 4; + private java.util.List + gclbTargets_; + /** + * + * + *
+   * Output only. A list of GCLB targets which use this Certificate Map.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getGclbTargetsList() { + return gclbTargets_; + } + /** + * + * + *
+   * Output only. A list of GCLB targets which use this Certificate Map.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetOrBuilder> + getGclbTargetsOrBuilderList() { + return gclbTargets_; + } + /** + * + * + *
+   * Output only. A list of GCLB targets which use this Certificate Map.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getGclbTargetsCount() { + return gclbTargets_.size(); + } + /** + * + * + *
+   * Output only. A list of GCLB targets which use this Certificate Map.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget getGclbTargets( + int index) { + return gclbTargets_.get(index); + } + /** + * + * + *
+   * Output only. A list of GCLB targets which use this Certificate Map.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetOrBuilder + getGclbTargetsOrBuilder(int index) { + return gclbTargets_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + for (int i = 0; i < gclbTargets_.size(); i++) { + output.writeMessage(4, gclbTargets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + 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()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); + } + for (int i = 0; i < gclbTargets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, gclbTargets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.CertificateMap)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.CertificateMap other = + (com.google.cloud.certificatemanager.v1.CertificateMap) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getGclbTargetsList().equals(other.getGclbTargetsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (getGclbTargetsCount() > 0) { + hash = (37 * hash) + GCLB_TARGETS_FIELD_NUMBER; + hash = (53 * hash) + getGclbTargetsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.CertificateMap prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines a collection of certificate configurations.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CertificateMap} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.CertificateMap) + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CertificateMap.class, + com.google.cloud.certificatemanager.v1.CertificateMap.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.CertificateMap.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGclbTargetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + if (gclbTargetsBuilder_ == null) { + gclbTargets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + gclbTargetsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMap_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.CertificateMap.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap build() { + com.google.cloud.certificatemanager.v1.CertificateMap result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap buildPartial() { + com.google.cloud.certificatemanager.v1.CertificateMap result = + new com.google.cloud.certificatemanager.v1.CertificateMap(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (gclbTargetsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + gclbTargets_ = java.util.Collections.unmodifiableList(gclbTargets_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.gclbTargets_ = gclbTargets_; + } else { + result.gclbTargets_ = gclbTargetsBuilder_.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.certificatemanager.v1.CertificateMap) { + return mergeFrom((com.google.cloud.certificatemanager.v1.CertificateMap) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.certificatemanager.v1.CertificateMap other) { + if (other == com.google.cloud.certificatemanager.v1.CertificateMap.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (gclbTargetsBuilder_ == null) { + if (!other.gclbTargets_.isEmpty()) { + if (gclbTargets_.isEmpty()) { + gclbTargets_ = other.gclbTargets_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureGclbTargetsIsMutable(); + gclbTargets_.addAll(other.gclbTargets_); + } + onChanged(); + } + } else { + if (!other.gclbTargets_.isEmpty()) { + if (gclbTargetsBuilder_.isEmpty()) { + gclbTargetsBuilder_.dispose(); + gclbTargetsBuilder_ = null; + gclbTargets_ = other.gclbTargets_; + bitField0_ = (bitField0_ & ~0x00000002); + gclbTargetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGclbTargetsFieldBuilder() + : null; + } else { + gclbTargetsBuilder_.addAllMessages(other.gclbTargets_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + 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.certificatemanager.v1.CertificateMap parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.CertificateMap) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * A user-defined name of the Certificate Map. Certificate Map names must be
+     * unique globally and match pattern
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A user-defined name of the Certificate Map. Certificate Map names must be
+     * unique globally and match pattern
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A user-defined name of the Certificate Map. Certificate Map names must be
+     * unique globally and match pattern
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A user-defined name of the Certificate Map. Certificate Map names must be
+     * unique globally and match pattern
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A user-defined name of the Certificate Map. Certificate Map names must be
+     * unique globally and match pattern
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * One or more paragraphs of text description of a certificate map.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate map.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate map.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate map.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate map.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private 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 creation timestamp of a Certificate Map.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map.
+     * 
+ * + * + * .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. The update timestamp of a Certificate Map.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private java.util.List + gclbTargets_ = java.util.Collections.emptyList(); + + private void ensureGclbTargetsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + gclbTargets_ = + new java.util.ArrayList< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget>(gclbTargets_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.Builder, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetOrBuilder> + gclbTargetsBuilder_; + + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getGclbTargetsList() { + if (gclbTargetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(gclbTargets_); + } else { + return gclbTargetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getGclbTargetsCount() { + if (gclbTargetsBuilder_ == null) { + return gclbTargets_.size(); + } else { + return gclbTargetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget getGclbTargets( + int index) { + if (gclbTargetsBuilder_ == null) { + return gclbTargets_.get(index); + } else { + return gclbTargetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGclbTargets( + int index, com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget value) { + if (gclbTargetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGclbTargetsIsMutable(); + gclbTargets_.set(index, value); + onChanged(); + } else { + gclbTargetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGclbTargets( + int index, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.Builder builderForValue) { + if (gclbTargetsBuilder_ == null) { + ensureGclbTargetsIsMutable(); + gclbTargets_.set(index, builderForValue.build()); + onChanged(); + } else { + gclbTargetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addGclbTargets( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget value) { + if (gclbTargetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGclbTargetsIsMutable(); + gclbTargets_.add(value); + onChanged(); + } else { + gclbTargetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addGclbTargets( + int index, com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget value) { + if (gclbTargetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGclbTargetsIsMutable(); + gclbTargets_.add(index, value); + onChanged(); + } else { + gclbTargetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addGclbTargets( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.Builder builderForValue) { + if (gclbTargetsBuilder_ == null) { + ensureGclbTargetsIsMutable(); + gclbTargets_.add(builderForValue.build()); + onChanged(); + } else { + gclbTargetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addGclbTargets( + int index, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.Builder builderForValue) { + if (gclbTargetsBuilder_ == null) { + ensureGclbTargetsIsMutable(); + gclbTargets_.add(index, builderForValue.build()); + onChanged(); + } else { + gclbTargetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllGclbTargets( + java.lang.Iterable< + ? extends com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget> + values) { + if (gclbTargetsBuilder_ == null) { + ensureGclbTargetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, gclbTargets_); + onChanged(); + } else { + gclbTargetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearGclbTargets() { + if (gclbTargetsBuilder_ == null) { + gclbTargets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + gclbTargetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeGclbTargets(int index) { + if (gclbTargetsBuilder_ == null) { + ensureGclbTargetsIsMutable(); + gclbTargets_.remove(index); + onChanged(); + } else { + gclbTargetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.Builder + getGclbTargetsBuilder(int index) { + return getGclbTargetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetOrBuilder + getGclbTargetsOrBuilder(int index) { + if (gclbTargetsBuilder_ == null) { + return gclbTargets_.get(index); + } else { + return gclbTargetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetOrBuilder> + getGclbTargetsOrBuilderList() { + if (gclbTargetsBuilder_ != null) { + return gclbTargetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(gclbTargets_); + } + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.Builder + addGclbTargetsBuilder() { + return getGclbTargetsFieldBuilder() + .addBuilder( + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.Builder + addGclbTargetsBuilder(int index) { + return getGclbTargetsFieldBuilder() + .addBuilder( + index, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. A list of GCLB targets which use this Certificate Map.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getGclbTargetsBuilderList() { + return getGclbTargetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.Builder, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetOrBuilder> + getGclbTargetsFieldBuilder() { + if (gclbTargetsBuilder_ == null) { + gclbTargetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.Builder, + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetOrBuilder>( + gclbTargets_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + gclbTargets_ = null; + } + return gclbTargetsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.CertificateMap) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.CertificateMap) + private static final com.google.cloud.certificatemanager.v1.CertificateMap DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.CertificateMap(); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMap getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateMap parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CertificateMap(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntry.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntry.java new file mode 100644 index 0000000..c25a978 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntry.java @@ -0,0 +1,2887 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Defines a certificate map entry.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CertificateMapEntry} + */ +public final class CertificateMapEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.CertificateMapEntry) + CertificateMapEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateMapEntry.newBuilder() to construct. + private CertificateMapEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CertificateMapEntry() { + name_ = ""; + description_ = ""; + certificates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CertificateMapEntry(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CertificateMapEntry( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + matchCase_ = 5; + match_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + certificates_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + certificates_.add(s); + break; + } + case 64: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 80: + { + int rawValue = input.readEnum(); + matchCase_ = 10; + match_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + certificates_ = certificates_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CertificateMapEntry.class, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder.class); + } + + /** + * + * + *
+   * Defines predefined cases other than SNI-hostname match when this
+   * configuration should be applied.
+   * 
+ * + * Protobuf enum {@code google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher} + */ + public enum Matcher implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * A matcher has't been recognized.
+     * 
+ * + * MATCHER_UNSPECIFIED = 0; + */ + MATCHER_UNSPECIFIED(0), + /** + * + * + *
+     * A primary certificate that is served when SNI wasn't specified in the
+     * request or SNI couldn't be found in the map.
+     * 
+ * + * PRIMARY = 1; + */ + PRIMARY(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * A matcher has't been recognized.
+     * 
+ * + * MATCHER_UNSPECIFIED = 0; + */ + public static final int MATCHER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A primary certificate that is served when SNI wasn't specified in the
+     * request or SNI couldn't be found in the map.
+     * 
+ * + * PRIMARY = 1; + */ + public static final int PRIMARY_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 Matcher 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 Matcher forNumber(int value) { + switch (value) { + case 0: + return MATCHER_UNSPECIFIED; + case 1: + return PRIMARY; + 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 Matcher findValueByNumber(int number) { + return Matcher.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.certificatemanager.v1.CertificateMapEntry.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Matcher[] VALUES = values(); + + public static Matcher 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 Matcher(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher) + } + + private int matchCase_ = 0; + private java.lang.Object match_; + + public enum MatchCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + HOSTNAME(5), + MATCHER(10), + MATCH_NOT_SET(0); + private final int value; + + private MatchCase(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 MatchCase valueOf(int value) { + return forNumber(value); + } + + public static MatchCase forNumber(int value) { + switch (value) { + case 5: + return HOSTNAME; + case 10: + return MATCHER; + case 0: + return MATCH_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MatchCase getMatchCase() { + return MatchCase.forNumber(matchCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * A user-defined name of the Certificate Map Entry. Certificate Map Entry
+   * names must be unique globally and match pattern
+   * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * A user-defined name of the Certificate Map Entry. Certificate Map Entry
+   * names must be unique globally and match pattern
+   * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 9; + private volatile java.lang.Object description_; + /** + * + * + *
+   * One or more paragraphs of text description of a certificate map entry.
+   * 
+ * + * string description = 9; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * One or more paragraphs of text description of a certificate map entry.
+   * 
+ * + * string description = 9; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate Map Entry.
+   * 
+ * + * .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. The creation timestamp of a Certificate Map Entry.
+   * 
+ * + * .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. The creation timestamp of a Certificate Map Entry.
+   * 
+ * + * .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. The update timestamp of a Certificate Map Entry.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The update timestamp of a Certificate Map Entry.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The update timestamp of a Certificate Map Entry.
+   * 
+ * + * .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 LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Set of labels associated with a Certificate Map Entry.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Set of labels associated with a Certificate Map Entry.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Set of labels associated with a Certificate Map Entry.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Set of labels associated with a Certificate Map Entry.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int HOSTNAME_FIELD_NUMBER = 5; + /** + * + * + *
+   * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+   * (`*.example.com`) for a set of hostnames with common suffix. Used as
+   * Server Name Indication (SNI) for selecting a proper certificate.
+   * 
+ * + * string hostname = 5; + * + * @return Whether the hostname field is set. + */ + public boolean hasHostname() { + return matchCase_ == 5; + } + /** + * + * + *
+   * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+   * (`*.example.com`) for a set of hostnames with common suffix. Used as
+   * Server Name Indication (SNI) for selecting a proper certificate.
+   * 
+ * + * string hostname = 5; + * + * @return The hostname. + */ + public java.lang.String getHostname() { + java.lang.Object ref = ""; + if (matchCase_ == 5) { + ref = match_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (matchCase_ == 5) { + match_ = s; + } + return s; + } + } + /** + * + * + *
+   * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+   * (`*.example.com`) for a set of hostnames with common suffix. Used as
+   * Server Name Indication (SNI) for selecting a proper certificate.
+   * 
+ * + * string hostname = 5; + * + * @return The bytes for hostname. + */ + public com.google.protobuf.ByteString getHostnameBytes() { + java.lang.Object ref = ""; + if (matchCase_ == 5) { + ref = match_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (matchCase_ == 5) { + match_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCHER_FIELD_NUMBER = 10; + /** + * + * + *
+   * A predefined matcher for particular cases, other than SNI selection.
+   * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @return Whether the matcher field is set. + */ + public boolean hasMatcher() { + return matchCase_ == 10; + } + /** + * + * + *
+   * A predefined matcher for particular cases, other than SNI selection.
+   * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @return The enum numeric value on the wire for matcher. + */ + public int getMatcherValue() { + if (matchCase_ == 10) { + return (java.lang.Integer) match_; + } + return 0; + } + /** + * + * + *
+   * A predefined matcher for particular cases, other than SNI selection.
+   * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @return The matcher. + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher getMatcher() { + if (matchCase_ == 10) { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher result = + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher.valueOf( + (java.lang.Integer) match_); + return result == null + ? com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher.UNRECOGNIZED + : result; + } + return com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher.MATCHER_UNSPECIFIED; + } + + public static final int CERTIFICATES_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList certificates_; + /** + * + * + *
+   * A set of Certificates defines for the given `hostname`. There can be
+   * defined up to fifteen certificates in each Certificate Map Entry. Each
+   * certificate must match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the certificates. + */ + public com.google.protobuf.ProtocolStringList getCertificatesList() { + return certificates_; + } + /** + * + * + *
+   * A set of Certificates defines for the given `hostname`. There can be
+   * defined up to fifteen certificates in each Certificate Map Entry. Each
+   * certificate must match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @return The count of certificates. + */ + public int getCertificatesCount() { + return certificates_.size(); + } + /** + * + * + *
+   * A set of Certificates defines for the given `hostname`. There can be
+   * defined up to fifteen certificates in each Certificate Map Entry. Each
+   * certificate must match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The certificates at the given index. + */ + public java.lang.String getCertificates(int index) { + return certificates_.get(index); + } + /** + * + * + *
+   * A set of Certificates defines for the given `hostname`. There can be
+   * defined up to fifteen certificates in each Certificate Map Entry. Each
+   * certificate must match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the certificates at the given index. + */ + public com.google.protobuf.ByteString getCertificatesBytes(int index) { + return certificates_.getByteString(index); + } + + public static final int STATE_FIELD_NUMBER = 8; + private int state_; + /** + * + * + *
+   * Output only. A serving state of this Certificate Map Entry.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.ServingState 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. A serving state of this Certificate Map Entry.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.ServingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ServingState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.ServingState result = + com.google.cloud.certificatemanager.v1.ServingState.valueOf(state_); + return result == null + ? com.google.cloud.certificatemanager.v1.ServingState.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()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (matchCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, match_); + } + for (int i = 0; i < certificates_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, certificates_.getRaw(i)); + } + if (state_ + != com.google.cloud.certificatemanager.v1.ServingState.SERVING_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, description_); + } + if (matchCase_ == 10) { + output.writeEnum(10, ((java.lang.Integer) match_)); + } + 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()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (matchCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, match_); + } + { + int dataSize = 0; + for (int i = 0; i < certificates_.size(); i++) { + dataSize += computeStringSizeNoTag(certificates_.getRaw(i)); + } + size += dataSize; + size += 1 * getCertificatesList().size(); + } + if (state_ + != com.google.cloud.certificatemanager.v1.ServingState.SERVING_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, description_); + } + if (matchCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(10, ((java.lang.Integer) match_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.CertificateMapEntry)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.CertificateMapEntry other = + (com.google.cloud.certificatemanager.v1.CertificateMapEntry) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getCertificatesList().equals(other.getCertificatesList())) return false; + if (state_ != other.state_) return false; + if (!getMatchCase().equals(other.getMatchCase())) return false; + switch (matchCase_) { + case 5: + if (!getHostname().equals(other.getHostname())) return false; + break; + case 10: + if (getMatcherValue() != other.getMatcherValue()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (getCertificatesCount() > 0) { + hash = (37 * hash) + CERTIFICATES_FIELD_NUMBER; + hash = (53 * hash) + getCertificatesList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + switch (matchCase_) { + case 5: + hash = (37 * hash) + HOSTNAME_FIELD_NUMBER; + hash = (53 * hash) + getHostname().hashCode(); + break; + case 10: + hash = (37 * hash) + MATCHER_FIELD_NUMBER; + hash = (53 * hash) + getMatcherValue(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.CertificateMapEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines a certificate map entry.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CertificateMapEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.CertificateMapEntry) + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CertificateMapEntry.class, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.CertificateMapEntry.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + certificates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + + matchCase_ = 0; + match_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CertificateMapEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapEntry getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.CertificateMapEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapEntry build() { + com.google.cloud.certificatemanager.v1.CertificateMapEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapEntry buildPartial() { + com.google.cloud.certificatemanager.v1.CertificateMapEntry result = + new com.google.cloud.certificatemanager.v1.CertificateMapEntry(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (matchCase_ == 5) { + result.match_ = match_; + } + if (matchCase_ == 10) { + result.match_ = match_; + } + if (((bitField0_ & 0x00000002) != 0)) { + certificates_ = certificates_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.certificates_ = certificates_; + result.state_ = state_; + result.matchCase_ = matchCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.certificatemanager.v1.CertificateMapEntry) { + return mergeFrom((com.google.cloud.certificatemanager.v1.CertificateMapEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.certificatemanager.v1.CertificateMapEntry other) { + if (other == com.google.cloud.certificatemanager.v1.CertificateMapEntry.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (!other.certificates_.isEmpty()) { + if (certificates_.isEmpty()) { + certificates_ = other.certificates_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCertificatesIsMutable(); + certificates_.addAll(other.certificates_); + } + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + switch (other.getMatchCase()) { + case HOSTNAME: + { + matchCase_ = 5; + match_ = other.match_; + onChanged(); + break; + } + case MATCHER: + { + setMatcherValue(other.getMatcherValue()); + break; + } + case MATCH_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.certificatemanager.v1.CertificateMapEntry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.CertificateMapEntry) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int matchCase_ = 0; + private java.lang.Object match_; + + public MatchCase getMatchCase() { + return MatchCase.forNumber(matchCase_); + } + + public Builder clearMatch() { + matchCase_ = 0; + match_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * A user-defined name of the Certificate Map Entry. Certificate Map Entry
+     * names must be unique globally and match pattern
+     * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A user-defined name of the Certificate Map Entry. Certificate Map Entry
+     * names must be unique globally and match pattern
+     * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A user-defined name of the Certificate Map Entry. Certificate Map Entry
+     * names must be unique globally and match pattern
+     * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A user-defined name of the Certificate Map Entry. Certificate Map Entry
+     * names must be unique globally and match pattern
+     * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A user-defined name of the Certificate Map Entry. Certificate Map Entry
+     * names must be unique globally and match pattern
+     * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * One or more paragraphs of text description of a certificate map entry.
+     * 
+ * + * string description = 9; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate map entry.
+     * 
+ * + * string description = 9; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate map entry.
+     * 
+ * + * string description = 9; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate map entry.
+     * 
+ * + * string description = 9; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * One or more paragraphs of text description of a certificate map entry.
+     * 
+ * + * string description = 9; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The creation timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .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. The creation timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .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. The update timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The update timestamp of a Certificate Map Entry.
+     * 
+ * + * + * .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 com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map Entry.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map Entry.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map Entry.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map Entry.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map Entry.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map Entry.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Set of labels associated with a Certificate Map Entry.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + /** + * + * + *
+     * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+     * (`*.example.com`) for a set of hostnames with common suffix. Used as
+     * Server Name Indication (SNI) for selecting a proper certificate.
+     * 
+ * + * string hostname = 5; + * + * @return Whether the hostname field is set. + */ + @java.lang.Override + public boolean hasHostname() { + return matchCase_ == 5; + } + /** + * + * + *
+     * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+     * (`*.example.com`) for a set of hostnames with common suffix. Used as
+     * Server Name Indication (SNI) for selecting a proper certificate.
+     * 
+ * + * string hostname = 5; + * + * @return The hostname. + */ + @java.lang.Override + public java.lang.String getHostname() { + java.lang.Object ref = ""; + if (matchCase_ == 5) { + ref = match_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (matchCase_ == 5) { + match_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+     * (`*.example.com`) for a set of hostnames with common suffix. Used as
+     * Server Name Indication (SNI) for selecting a proper certificate.
+     * 
+ * + * string hostname = 5; + * + * @return The bytes for hostname. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostnameBytes() { + java.lang.Object ref = ""; + if (matchCase_ == 5) { + ref = match_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (matchCase_ == 5) { + match_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+     * (`*.example.com`) for a set of hostnames with common suffix. Used as
+     * Server Name Indication (SNI) for selecting a proper certificate.
+     * 
+ * + * string hostname = 5; + * + * @param value The hostname to set. + * @return This builder for chaining. + */ + public Builder setHostname(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + matchCase_ = 5; + match_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+     * (`*.example.com`) for a set of hostnames with common suffix. Used as
+     * Server Name Indication (SNI) for selecting a proper certificate.
+     * 
+ * + * string hostname = 5; + * + * @return This builder for chaining. + */ + public Builder clearHostname() { + if (matchCase_ == 5) { + matchCase_ = 0; + match_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+     * (`*.example.com`) for a set of hostnames with common suffix. Used as
+     * Server Name Indication (SNI) for selecting a proper certificate.
+     * 
+ * + * string hostname = 5; + * + * @param value The bytes for hostname to set. + * @return This builder for chaining. + */ + public Builder setHostnameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + matchCase_ = 5; + match_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * A predefined matcher for particular cases, other than SNI selection.
+     * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @return Whether the matcher field is set. + */ + @java.lang.Override + public boolean hasMatcher() { + return matchCase_ == 10; + } + /** + * + * + *
+     * A predefined matcher for particular cases, other than SNI selection.
+     * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @return The enum numeric value on the wire for matcher. + */ + @java.lang.Override + public int getMatcherValue() { + if (matchCase_ == 10) { + return ((java.lang.Integer) match_).intValue(); + } + return 0; + } + /** + * + * + *
+     * A predefined matcher for particular cases, other than SNI selection.
+     * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @param value The enum numeric value on the wire for matcher to set. + * @return This builder for chaining. + */ + public Builder setMatcherValue(int value) { + matchCase_ = 10; + match_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A predefined matcher for particular cases, other than SNI selection.
+     * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @return The matcher. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher getMatcher() { + if (matchCase_ == 10) { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher result = + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher.valueOf( + (java.lang.Integer) match_); + return result == null + ? com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher.UNRECOGNIZED + : result; + } + return com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher.MATCHER_UNSPECIFIED; + } + /** + * + * + *
+     * A predefined matcher for particular cases, other than SNI selection.
+     * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @param value The matcher to set. + * @return This builder for chaining. + */ + public Builder setMatcher( + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher value) { + if (value == null) { + throw new NullPointerException(); + } + matchCase_ = 10; + match_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * A predefined matcher for particular cases, other than SNI selection.
+     * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @return This builder for chaining. + */ + public Builder clearMatcher() { + if (matchCase_ == 10) { + matchCase_ = 0; + match_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.LazyStringList certificates_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCertificatesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + certificates_ = new com.google.protobuf.LazyStringArrayList(certificates_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A set of Certificates defines for the given `hostname`. There can be
+     * defined up to fifteen certificates in each Certificate Map Entry. Each
+     * certificate must match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the certificates. + */ + public com.google.protobuf.ProtocolStringList getCertificatesList() { + return certificates_.getUnmodifiableView(); + } + /** + * + * + *
+     * A set of Certificates defines for the given `hostname`. There can be
+     * defined up to fifteen certificates in each Certificate Map Entry. Each
+     * certificate must match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @return The count of certificates. + */ + public int getCertificatesCount() { + return certificates_.size(); + } + /** + * + * + *
+     * A set of Certificates defines for the given `hostname`. There can be
+     * defined up to fifteen certificates in each Certificate Map Entry. Each
+     * certificate must match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The certificates at the given index. + */ + public java.lang.String getCertificates(int index) { + return certificates_.get(index); + } + /** + * + * + *
+     * A set of Certificates defines for the given `hostname`. There can be
+     * defined up to fifteen certificates in each Certificate Map Entry. Each
+     * certificate must match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the certificates at the given index. + */ + public com.google.protobuf.ByteString getCertificatesBytes(int index) { + return certificates_.getByteString(index); + } + /** + * + * + *
+     * A set of Certificates defines for the given `hostname`. There can be
+     * defined up to fifteen certificates in each Certificate Map Entry. Each
+     * certificate must match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The certificates to set. + * @return This builder for chaining. + */ + public Builder setCertificates(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A set of Certificates defines for the given `hostname`. There can be
+     * defined up to fifteen certificates in each Certificate Map Entry. Each
+     * certificate must match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @param value The certificates to add. + * @return This builder for chaining. + */ + public Builder addCertificates(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A set of Certificates defines for the given `hostname`. There can be
+     * defined up to fifteen certificates in each Certificate Map Entry. Each
+     * certificate must match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @param values The certificates to add. + * @return This builder for chaining. + */ + public Builder addAllCertificates(java.lang.Iterable values) { + ensureCertificatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, certificates_); + onChanged(); + return this; + } + /** + * + * + *
+     * A set of Certificates defines for the given `hostname`. There can be
+     * defined up to fifteen certificates in each Certificate Map Entry. Each
+     * certificate must match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearCertificates() { + certificates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A set of Certificates defines for the given `hostname`. There can be
+     * defined up to fifteen certificates in each Certificate Map Entry. Each
+     * certificate must match pattern `projects/*/locations/*/certificates/*`.
+     * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the certificates to add. + * @return This builder for chaining. + */ + public Builder addCertificatesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCertificatesIsMutable(); + certificates_.add(value); + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. A serving state of this Certificate Map Entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.ServingState 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. A serving state of this Certificate Map Entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.ServingState 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. A serving state of this Certificate Map Entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.ServingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ServingState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.certificatemanager.v1.ServingState result = + com.google.cloud.certificatemanager.v1.ServingState.valueOf(state_); + return result == null + ? com.google.cloud.certificatemanager.v1.ServingState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. A serving state of this Certificate Map Entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.ServingState 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.certificatemanager.v1.ServingState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A serving state of this Certificate Map Entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.ServingState 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.certificatemanager.v1.CertificateMapEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.CertificateMapEntry) + private static final com.google.cloud.certificatemanager.v1.CertificateMapEntry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.CertificateMapEntry(); + } + + public static com.google.cloud.certificatemanager.v1.CertificateMapEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateMapEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CertificateMapEntry(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntryName.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntryName.java new file mode 100644 index 0000000..c58bd86 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntryName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.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 CertificateMapEntryName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CERTIFICATE_MAP_CERTIFICATE_MAP_ENTRY = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/certificateMaps/{certificate_map}/certificateMapEntries/{certificate_map_entry}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String certificateMap; + private final String certificateMapEntry; + + @Deprecated + protected CertificateMapEntryName() { + project = null; + location = null; + certificateMap = null; + certificateMapEntry = null; + } + + private CertificateMapEntryName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + certificateMap = Preconditions.checkNotNull(builder.getCertificateMap()); + certificateMapEntry = Preconditions.checkNotNull(builder.getCertificateMapEntry()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificateMap() { + return certificateMap; + } + + public String getCertificateMapEntry() { + return certificateMapEntry; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CertificateMapEntryName of( + String project, String location, String certificateMap, String certificateMapEntry) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificateMap(certificateMap) + .setCertificateMapEntry(certificateMapEntry) + .build(); + } + + public static String format( + String project, String location, String certificateMap, String certificateMapEntry) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificateMap(certificateMap) + .setCertificateMapEntry(certificateMapEntry) + .build() + .toString(); + } + + public static CertificateMapEntryName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CERTIFICATE_MAP_CERTIFICATE_MAP_ENTRY.validatedMatch( + formattedString, "CertificateMapEntryName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("certificate_map"), + matchMap.get("certificate_map_entry")); + } + + 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 (CertificateMapEntryName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CERTIFICATE_MAP_CERTIFICATE_MAP_ENTRY.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 (certificateMap != null) { + fieldMapBuilder.put("certificate_map", certificateMap); + } + if (certificateMapEntry != null) { + fieldMapBuilder.put("certificate_map_entry", certificateMapEntry); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CERTIFICATE_MAP_CERTIFICATE_MAP_ENTRY.instantiate( + "project", + project, + "location", + location, + "certificate_map", + certificateMap, + "certificate_map_entry", + certificateMapEntry); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + CertificateMapEntryName that = ((CertificateMapEntryName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.certificateMap, that.certificateMap) + && Objects.equals(this.certificateMapEntry, that.certificateMapEntry); + } + 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(certificateMap); + h *= 1000003; + h ^= Objects.hashCode(certificateMapEntry); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/certificateMaps/{certificate_map}/certificateMapEntries/{certificate_map_entry}. + */ + public static class Builder { + private String project; + private String location; + private String certificateMap; + private String certificateMapEntry; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificateMap() { + return certificateMap; + } + + public String getCertificateMapEntry() { + return certificateMapEntry; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCertificateMap(String certificateMap) { + this.certificateMap = certificateMap; + return this; + } + + public Builder setCertificateMapEntry(String certificateMapEntry) { + this.certificateMapEntry = certificateMapEntry; + return this; + } + + private Builder(CertificateMapEntryName certificateMapEntryName) { + this.project = certificateMapEntryName.project; + this.location = certificateMapEntryName.location; + this.certificateMap = certificateMapEntryName.certificateMap; + this.certificateMapEntry = certificateMapEntryName.certificateMapEntry; + } + + public CertificateMapEntryName build() { + return new CertificateMapEntryName(this); + } + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntryOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntryOrBuilder.java new file mode 100644 index 0000000..4a7bba6 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapEntryOrBuilder.java @@ -0,0 +1,379 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface CertificateMapEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.CertificateMapEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A user-defined name of the Certificate Map Entry. Certificate Map Entry
+   * names must be unique globally and match pattern
+   * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * A user-defined name of the Certificate Map Entry. Certificate Map Entry
+   * names must be unique globally and match pattern
+   * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * One or more paragraphs of text description of a certificate map entry.
+   * 
+ * + * string description = 9; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * One or more paragraphs of text description of a certificate map entry.
+   * 
+ * + * string description = 9; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate Map Entry.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate Map Entry.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate Map Entry.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The update timestamp of a Certificate Map Entry.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp of a Certificate Map Entry.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp of a Certificate Map Entry.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Set of labels associated with a Certificate Map Entry.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Set of labels associated with a Certificate Map Entry.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Set of labels associated with a Certificate Map Entry.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Set of labels associated with a Certificate Map Entry.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Set of labels associated with a Certificate Map Entry.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+   * (`*.example.com`) for a set of hostnames with common suffix. Used as
+   * Server Name Indication (SNI) for selecting a proper certificate.
+   * 
+ * + * string hostname = 5; + * + * @return Whether the hostname field is set. + */ + boolean hasHostname(); + /** + * + * + *
+   * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+   * (`*.example.com`) for a set of hostnames with common suffix. Used as
+   * Server Name Indication (SNI) for selecting a proper certificate.
+   * 
+ * + * string hostname = 5; + * + * @return The hostname. + */ + java.lang.String getHostname(); + /** + * + * + *
+   * A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression
+   * (`*.example.com`) for a set of hostnames with common suffix. Used as
+   * Server Name Indication (SNI) for selecting a proper certificate.
+   * 
+ * + * string hostname = 5; + * + * @return The bytes for hostname. + */ + com.google.protobuf.ByteString getHostnameBytes(); + + /** + * + * + *
+   * A predefined matcher for particular cases, other than SNI selection.
+   * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @return Whether the matcher field is set. + */ + boolean hasMatcher(); + /** + * + * + *
+   * A predefined matcher for particular cases, other than SNI selection.
+   * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @return The enum numeric value on the wire for matcher. + */ + int getMatcherValue(); + /** + * + * + *
+   * A predefined matcher for particular cases, other than SNI selection.
+   * 
+ * + * .google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher matcher = 10; + * + * @return The matcher. + */ + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher getMatcher(); + + /** + * + * + *
+   * A set of Certificates defines for the given `hostname`. There can be
+   * defined up to fifteen certificates in each Certificate Map Entry. Each
+   * certificate must match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the certificates. + */ + java.util.List getCertificatesList(); + /** + * + * + *
+   * A set of Certificates defines for the given `hostname`. There can be
+   * defined up to fifteen certificates in each Certificate Map Entry. Each
+   * certificate must match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @return The count of certificates. + */ + int getCertificatesCount(); + /** + * + * + *
+   * A set of Certificates defines for the given `hostname`. There can be
+   * defined up to fifteen certificates in each Certificate Map Entry. Each
+   * certificate must match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The certificates at the given index. + */ + java.lang.String getCertificates(int index); + /** + * + * + *
+   * A set of Certificates defines for the given `hostname`. There can be
+   * defined up to fifteen certificates in each Certificate Map Entry. Each
+   * certificate must match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * repeated string certificates = 7 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the certificates at the given index. + */ + com.google.protobuf.ByteString getCertificatesBytes(int index); + + /** + * + * + *
+   * Output only. A serving state of this Certificate Map Entry.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.ServingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. A serving state of this Certificate Map Entry.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.ServingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.certificatemanager.v1.ServingState getState(); + + public com.google.cloud.certificatemanager.v1.CertificateMapEntry.MatchCase getMatchCase(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapName.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapName.java new file mode 100644 index 0000000..d73fd3b --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.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 CertificateMapName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CERTIFICATE_MAP = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/certificateMaps/{certificate_map}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String certificateMap; + + @Deprecated + protected CertificateMapName() { + project = null; + location = null; + certificateMap = null; + } + + private CertificateMapName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + certificateMap = Preconditions.checkNotNull(builder.getCertificateMap()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificateMap() { + return certificateMap; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CertificateMapName of(String project, String location, String certificateMap) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificateMap(certificateMap) + .build(); + } + + public static String format(String project, String location, String certificateMap) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificateMap(certificateMap) + .build() + .toString(); + } + + public static CertificateMapName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CERTIFICATE_MAP.validatedMatch( + formattedString, "CertificateMapName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("certificate_map")); + } + + 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 (CertificateMapName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CERTIFICATE_MAP.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 (certificateMap != null) { + fieldMapBuilder.put("certificate_map", certificateMap); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CERTIFICATE_MAP.instantiate( + "project", project, "location", location, "certificate_map", certificateMap); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + CertificateMapName that = ((CertificateMapName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.certificateMap, that.certificateMap); + } + 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(certificateMap); + return h; + } + + /** Builder for projects/{project}/locations/{location}/certificateMaps/{certificate_map}. */ + public static class Builder { + private String project; + private String location; + private String certificateMap; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificateMap() { + return certificateMap; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCertificateMap(String certificateMap) { + this.certificateMap = certificateMap; + return this; + } + + private Builder(CertificateMapName certificateMapName) { + this.project = certificateMapName.project; + this.location = certificateMapName.location; + this.certificateMap = certificateMapName.certificateMap; + } + + public CertificateMapName build() { + return new CertificateMapName(this); + } + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapOrBuilder.java new file mode 100644 index 0000000..379fe46 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateMapOrBuilder.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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface CertificateMapOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.CertificateMap) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A user-defined name of the Certificate Map. Certificate Map names must be
+   * unique globally and match pattern
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * A user-defined name of the Certificate Map. Certificate Map names must be
+   * unique globally and match pattern
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * One or more paragraphs of text description of a certificate map.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * One or more paragraphs of text description of a certificate map.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate Map.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate Map.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate Map.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The update timestamp of a Certificate Map.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp of a Certificate Map.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp of a Certificate Map.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Set of labels associated with a Certificate Map.
+   * 
+ * + * map<string, string> labels = 3; + */ + int getLabelsCount(); + /** + * + * + *
+   * Set of labels associated with a Certificate Map.
+   * 
+ * + * map<string, string> labels = 3; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Set of labels associated with a Certificate Map.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Set of labels associated with a Certificate Map.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Set of labels associated with a Certificate Map.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. A list of GCLB targets which use this Certificate Map.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getGclbTargetsList(); + /** + * + * + *
+   * Output only. A list of GCLB targets which use this Certificate Map.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget getGclbTargets(int index); + /** + * + * + *
+   * Output only. A list of GCLB targets which use this Certificate Map.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getGclbTargetsCount(); + /** + * + * + *
+   * Output only. A list of GCLB targets which use this Certificate Map.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends com.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetOrBuilder> + getGclbTargetsOrBuilderList(); + /** + * + * + *
+   * Output only. A list of GCLB targets which use this Certificate Map.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMap.GclbTarget gclb_targets = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetOrBuilder getGclbTargetsOrBuilder( + int index); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateName.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateName.java new file mode 100644 index 0000000..8cc2a1f --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.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 CertificateName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CERTIFICATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/certificates/{certificate}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String certificate; + + @Deprecated + protected CertificateName() { + project = null; + location = null; + certificate = null; + } + + private CertificateName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + certificate = Preconditions.checkNotNull(builder.getCertificate()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificate() { + return certificate; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CertificateName of(String project, String location, String certificate) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificate(certificate) + .build(); + } + + public static String format(String project, String location, String certificate) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCertificate(certificate) + .build() + .toString(); + } + + public static CertificateName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CERTIFICATE.validatedMatch( + formattedString, "CertificateName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("certificate")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (CertificateName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CERTIFICATE.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 (certificate != null) { + fieldMapBuilder.put("certificate", certificate); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CERTIFICATE.instantiate( + "project", project, "location", location, "certificate", certificate); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + CertificateName that = ((CertificateName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.certificate, that.certificate); + } + 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(certificate); + return h; + } + + /** Builder for projects/{project}/locations/{location}/certificates/{certificate}. */ + public static class Builder { + private String project; + private String location; + private String certificate; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCertificate() { + return certificate; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCertificate(String certificate) { + this.certificate = certificate; + return this; + } + + private Builder(CertificateName certificateName) { + this.project = certificateName.project; + this.location = certificateName.location; + this.certificate = certificateName.certificate; + } + + public CertificateName build() { + return new CertificateName(this); + } + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateOrBuilder.java new file mode 100644 index 0000000..dd0d7cd --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CertificateOrBuilder.java @@ -0,0 +1,431 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface CertificateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.Certificate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A user-defined name of the certificate. Certificate names must be unique
+   * globally and match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * A user-defined name of the certificate. Certificate names must be unique
+   * globally and match pattern `projects/*/locations/*/certificates/*`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * One or more paragraphs of text description of a certificate.
+   * 
+ * + * string description = 8; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * One or more paragraphs of text description of a certificate.
+   * 
+ * + * string description = 8; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The creation timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The last update timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The last update timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The last update timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Set of labels associated with a Certificate.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Set of labels associated with a Certificate.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Set of labels associated with a Certificate.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Set of labels associated with a Certificate.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Set of labels associated with a Certificate.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * If set, defines data of a self-managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + * + * @return Whether the selfManaged field is set. + */ + boolean hasSelfManaged(); + /** + * + * + *
+   * If set, defines data of a self-managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + * + * @return The selfManaged. + */ + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate getSelfManaged(); + /** + * + * + *
+   * If set, defines data of a self-managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate self_managed = 5; + * + */ + com.google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificateOrBuilder + getSelfManagedOrBuilder(); + + /** + * + * + *
+   * If set, contains configuration and state of a managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + * + * @return Whether the managed field is set. + */ + boolean hasManaged(); + /** + * + * + *
+   * If set, contains configuration and state of a managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + * + * @return The managed. + */ + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificate getManaged(); + /** + * + * + *
+   * If set, contains configuration and state of a managed certificate.
+   * 
+ * + * .google.cloud.certificatemanager.v1.Certificate.ManagedCertificate managed = 11; + */ + com.google.cloud.certificatemanager.v1.Certificate.ManagedCertificateOrBuilder + getManagedOrBuilder(); + + /** + * + * + *
+   * Output only. The list of Subject Alternative Names of dnsName type defined in the
+   * certificate (see RFC 5280 4.2.1.6)
+   * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the sanDnsnames. + */ + java.util.List getSanDnsnamesList(); + /** + * + * + *
+   * Output only. The list of Subject Alternative Names of dnsName type defined in the
+   * certificate (see RFC 5280 4.2.1.6)
+   * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of sanDnsnames. + */ + int getSanDnsnamesCount(); + /** + * + * + *
+   * Output only. The list of Subject Alternative Names of dnsName type defined in the
+   * certificate (see RFC 5280 4.2.1.6)
+   * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The sanDnsnames at the given index. + */ + java.lang.String getSanDnsnames(int index); + /** + * + * + *
+   * Output only. The list of Subject Alternative Names of dnsName type defined in the
+   * certificate (see RFC 5280 4.2.1.6)
+   * 
+ * + * repeated string san_dnsnames = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the sanDnsnames at the given index. + */ + com.google.protobuf.ByteString getSanDnsnamesBytes(int index); + + /** + * + * + *
+   * Output only. The PEM-encoded certificate chain.
+   * 
+ * + * string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pemCertificate. + */ + java.lang.String getPemCertificate(); + /** + * + * + *
+   * Output only. The PEM-encoded certificate chain.
+   * 
+ * + * string pem_certificate = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pemCertificate. + */ + com.google.protobuf.ByteString getPemCertificateBytes(); + + /** + * + * + *
+   * Output only. The expiry timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * Output only. The expiry timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * Output only. The expiry timestamp of a Certificate.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); + + /** + * + * + *
+   * Immutable. The scope of the certificate.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * + * + *
+   * Immutable. The scope of the certificate.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate.Scope scope = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The scope. + */ + com.google.cloud.certificatemanager.v1.Certificate.Scope getScope(); + + public com.google.cloud.certificatemanager.v1.Certificate.TypeCase getTypeCase(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapEntryRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapEntryRequest.java new file mode 100644 index 0000000..d301d63 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapEntryRequest.java @@ -0,0 +1,1162 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `CreateCertificateMapEntry` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest} + */ +public final class CreateCertificateMapEntryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest) + CreateCertificateMapEntryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCertificateMapEntryRequest.newBuilder() to construct. + private CreateCertificateMapEntryRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCertificateMapEntryRequest() { + parent_ = ""; + certificateMapEntryId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCertificateMapEntryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateCertificateMapEntryRequest( + 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(); + + certificateMapEntryId_ = s; + break; + } + case 26: + { + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder subBuilder = null; + if (certificateMapEntry_ != null) { + subBuilder = certificateMapEntry_.toBuilder(); + } + certificateMapEntry_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.CertificateMapEntry.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificateMapEntry_); + certificateMapEntry_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest.class, + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource of the certificate map entry. Must be in the
+   * format `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource of the certificate map entry. Must be in the
+   * format `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERTIFICATE_MAP_ENTRY_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object certificateMapEntryId_; + /** + * + * + *
+   * Required. A user-provided name of the certificate map entry.
+   * 
+ * + * string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateMapEntryId. + */ + @java.lang.Override + public java.lang.String getCertificateMapEntryId() { + java.lang.Object ref = certificateMapEntryId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateMapEntryId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A user-provided name of the certificate map entry.
+   * 
+ * + * string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateMapEntryId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCertificateMapEntryIdBytes() { + java.lang.Object ref = certificateMapEntryId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateMapEntryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERTIFICATE_MAP_ENTRY_FIELD_NUMBER = 3; + private com.google.cloud.certificatemanager.v1.CertificateMapEntry certificateMapEntry_; + /** + * + * + *
+   * Required. A definition of the certificate map entry to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMapEntry field is set. + */ + @java.lang.Override + public boolean hasCertificateMapEntry() { + return certificateMapEntry_ != null; + } + /** + * + * + *
+   * Required. A definition of the certificate map entry to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMapEntry. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapEntry getCertificateMapEntry() { + return certificateMapEntry_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMapEntry.getDefaultInstance() + : certificateMapEntry_; + } + /** + * + * + *
+   * Required. A definition of the certificate map entry to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder + getCertificateMapEntryOrBuilder() { + return getCertificateMapEntry(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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(certificateMapEntryId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, certificateMapEntryId_); + } + if (certificateMapEntry_ != null) { + output.writeMessage(3, getCertificateMapEntry()); + } + 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(certificateMapEntryId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, certificateMapEntryId_); + } + if (certificateMapEntry_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCertificateMapEntry()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest other = + (com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getCertificateMapEntryId().equals(other.getCertificateMapEntryId())) return false; + if (hasCertificateMapEntry() != other.hasCertificateMapEntry()) return false; + if (hasCertificateMapEntry()) { + if (!getCertificateMapEntry().equals(other.getCertificateMapEntry())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + CERTIFICATE_MAP_ENTRY_ID_FIELD_NUMBER; + hash = (53 * hash) + getCertificateMapEntryId().hashCode(); + if (hasCertificateMapEntry()) { + hash = (37 * hash) + CERTIFICATE_MAP_ENTRY_FIELD_NUMBER; + hash = (53 * hash) + getCertificateMapEntry().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `CreateCertificateMapEntry` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest) + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest.class, + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest.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_ = ""; + + certificateMapEntryId_ = ""; + + if (certificateMapEntryBuilder_ == null) { + certificateMapEntry_ = null; + } else { + certificateMapEntry_ = null; + certificateMapEntryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest build() { + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest buildPartial() { + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest result = + new com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest(this); + result.parent_ = parent_; + result.certificateMapEntryId_ = certificateMapEntryId_; + if (certificateMapEntryBuilder_ == null) { + result.certificateMapEntry_ = certificateMapEntry_; + } else { + result.certificateMapEntry_ = certificateMapEntryBuilder_.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.certificatemanager.v1.CreateCertificateMapEntryRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getCertificateMapEntryId().isEmpty()) { + certificateMapEntryId_ = other.certificateMapEntryId_; + onChanged(); + } + if (other.hasCertificateMapEntry()) { + mergeCertificateMapEntry(other.getCertificateMapEntry()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + 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.certificatemanager.v1.CreateCertificateMapEntryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource of the certificate map entry. Must be in the
+     * format `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the certificate map entry. Must be in the
+     * format `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the certificate map entry. Must be in the
+     * format `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the certificate map entry. Must be in the
+     * format `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the certificate map entry. Must be in the
+     * format `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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 certificateMapEntryId_ = ""; + /** + * + * + *
+     * Required. A user-provided name of the certificate map entry.
+     * 
+ * + * string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateMapEntryId. + */ + public java.lang.String getCertificateMapEntryId() { + java.lang.Object ref = certificateMapEntryId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateMapEntryId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A user-provided name of the certificate map entry.
+     * 
+ * + * string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateMapEntryId. + */ + public com.google.protobuf.ByteString getCertificateMapEntryIdBytes() { + java.lang.Object ref = certificateMapEntryId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateMapEntryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A user-provided name of the certificate map entry.
+     * 
+ * + * string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The certificateMapEntryId to set. + * @return This builder for chaining. + */ + public Builder setCertificateMapEntryId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + certificateMapEntryId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user-provided name of the certificate map entry.
+     * 
+ * + * string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCertificateMapEntryId() { + + certificateMapEntryId_ = getDefaultInstance().getCertificateMapEntryId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user-provided name of the certificate map entry.
+     * 
+ * + * string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for certificateMapEntryId to set. + * @return This builder for chaining. + */ + public Builder setCertificateMapEntryIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + certificateMapEntryId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.certificatemanager.v1.CertificateMapEntry certificateMapEntry_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMapEntry, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder> + certificateMapEntryBuilder_; + /** + * + * + *
+     * Required. A definition of the certificate map entry to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMapEntry field is set. + */ + public boolean hasCertificateMapEntry() { + return certificateMapEntryBuilder_ != null || certificateMapEntry_ != null; + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMapEntry. + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntry getCertificateMapEntry() { + if (certificateMapEntryBuilder_ == null) { + return certificateMapEntry_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMapEntry.getDefaultInstance() + : certificateMapEntry_; + } else { + return certificateMapEntryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateMapEntry( + com.google.cloud.certificatemanager.v1.CertificateMapEntry value) { + if (certificateMapEntryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateMapEntry_ = value; + onChanged(); + } else { + certificateMapEntryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateMapEntry( + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder builderForValue) { + if (certificateMapEntryBuilder_ == null) { + certificateMapEntry_ = builderForValue.build(); + onChanged(); + } else { + certificateMapEntryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificateMapEntry( + com.google.cloud.certificatemanager.v1.CertificateMapEntry value) { + if (certificateMapEntryBuilder_ == null) { + if (certificateMapEntry_ != null) { + certificateMapEntry_ = + com.google.cloud.certificatemanager.v1.CertificateMapEntry.newBuilder( + certificateMapEntry_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateMapEntry_ = value; + } + onChanged(); + } else { + certificateMapEntryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificateMapEntry() { + if (certificateMapEntryBuilder_ == null) { + certificateMapEntry_ = null; + onChanged(); + } else { + certificateMapEntry_ = null; + certificateMapEntryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder + getCertificateMapEntryBuilder() { + + onChanged(); + return getCertificateMapEntryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder + getCertificateMapEntryOrBuilder() { + if (certificateMapEntryBuilder_ != null) { + return certificateMapEntryBuilder_.getMessageOrBuilder(); + } else { + return certificateMapEntry_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMapEntry.getDefaultInstance() + : certificateMapEntry_; + } + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMapEntry, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder> + getCertificateMapEntryFieldBuilder() { + if (certificateMapEntryBuilder_ == null) { + certificateMapEntryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMapEntry, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder>( + getCertificateMapEntry(), getParentForChildren(), isClean()); + certificateMapEntry_ = null; + } + return certificateMapEntryBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest) + private static final com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest(); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCertificateMapEntryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateCertificateMapEntryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapEntryRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapEntryRequestOrBuilder.java new file mode 100644 index 0000000..4c7de28 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapEntryRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface CreateCertificateMapEntryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource of the certificate map entry. Must be in the
+   * format `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource of the certificate map entry. Must be in the
+   * format `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. A user-provided name of the certificate map entry.
+   * 
+ * + * string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateMapEntryId. + */ + java.lang.String getCertificateMapEntryId(); + /** + * + * + *
+   * Required. A user-provided name of the certificate map entry.
+   * 
+ * + * string certificate_map_entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateMapEntryId. + */ + com.google.protobuf.ByteString getCertificateMapEntryIdBytes(); + + /** + * + * + *
+   * Required. A definition of the certificate map entry to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMapEntry field is set. + */ + boolean hasCertificateMapEntry(); + /** + * + * + *
+   * Required. A definition of the certificate map entry to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMapEntry. + */ + com.google.cloud.certificatemanager.v1.CertificateMapEntry getCertificateMapEntry(); + /** + * + * + *
+   * Required. A definition of the certificate map entry to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder + getCertificateMapEntryOrBuilder(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapRequest.java new file mode 100644 index 0000000..d5f3cd9 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapRequest.java @@ -0,0 +1,1155 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `CreateCertificateMap` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CreateCertificateMapRequest} + */ +public final class CreateCertificateMapRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.CreateCertificateMapRequest) + CreateCertificateMapRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCertificateMapRequest.newBuilder() to construct. + private CreateCertificateMapRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCertificateMapRequest() { + parent_ = ""; + certificateMapId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCertificateMapRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateCertificateMapRequest( + 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(); + + certificateMapId_ = s; + break; + } + case 26: + { + com.google.cloud.certificatemanager.v1.CertificateMap.Builder subBuilder = null; + if (certificateMap_ != null) { + subBuilder = certificateMap_.toBuilder(); + } + certificateMap_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.CertificateMap.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificateMap_); + certificateMap_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest.class, + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource of the certificate map. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource of the certificate map. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERTIFICATE_MAP_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object certificateMapId_; + /** + * + * + *
+   * Required. A user-provided name of the certificate map.
+   * 
+ * + * string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateMapId. + */ + @java.lang.Override + public java.lang.String getCertificateMapId() { + java.lang.Object ref = certificateMapId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateMapId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A user-provided name of the certificate map.
+   * 
+ * + * string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateMapId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCertificateMapIdBytes() { + java.lang.Object ref = certificateMapId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateMapId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERTIFICATE_MAP_FIELD_NUMBER = 3; + private com.google.cloud.certificatemanager.v1.CertificateMap certificateMap_; + /** + * + * + *
+   * Required. A definition of the certificate map to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMap field is set. + */ + @java.lang.Override + public boolean hasCertificateMap() { + return certificateMap_ != null; + } + /** + * + * + *
+   * Required. A definition of the certificate map to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMap. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap getCertificateMap() { + return certificateMap_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMap.getDefaultInstance() + : certificateMap_; + } + /** + * + * + *
+   * Required. A definition of the certificate map to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder + getCertificateMapOrBuilder() { + return getCertificateMap(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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(certificateMapId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, certificateMapId_); + } + if (certificateMap_ != null) { + output.writeMessage(3, getCertificateMap()); + } + 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(certificateMapId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, certificateMapId_); + } + if (certificateMap_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCertificateMap()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest other = + (com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getCertificateMapId().equals(other.getCertificateMapId())) return false; + if (hasCertificateMap() != other.hasCertificateMap()) return false; + if (hasCertificateMap()) { + if (!getCertificateMap().equals(other.getCertificateMap())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + CERTIFICATE_MAP_ID_FIELD_NUMBER; + hash = (53 * hash) + getCertificateMapId().hashCode(); + if (hasCertificateMap()) { + hash = (37 * hash) + CERTIFICATE_MAP_FIELD_NUMBER; + hash = (53 * hash) + getCertificateMap().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `CreateCertificateMap` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CreateCertificateMapRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.CreateCertificateMapRequest) + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest.class, + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest.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_ = ""; + + certificateMapId_ = ""; + + if (certificateMapBuilder_ == null) { + certificateMap_ = null; + } else { + certificateMap_ = null; + certificateMapBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateMapRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest build() { + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest buildPartial() { + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest result = + new com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest(this); + result.parent_ = parent_; + result.certificateMapId_ = certificateMapId_; + if (certificateMapBuilder_ == null) { + result.certificateMap_ = certificateMap_; + } else { + result.certificateMap_ = certificateMapBuilder_.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.certificatemanager.v1.CreateCertificateMapRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getCertificateMapId().isEmpty()) { + certificateMapId_ = other.certificateMapId_; + onChanged(); + } + if (other.hasCertificateMap()) { + mergeCertificateMap(other.getCertificateMap()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + 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.certificatemanager.v1.CreateCertificateMapRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource of the certificate map. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the certificate map. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the certificate map. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the certificate map. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the certificate map. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object certificateMapId_ = ""; + /** + * + * + *
+     * Required. A user-provided name of the certificate map.
+     * 
+ * + * string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateMapId. + */ + public java.lang.String getCertificateMapId() { + java.lang.Object ref = certificateMapId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateMapId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A user-provided name of the certificate map.
+     * 
+ * + * string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateMapId. + */ + public com.google.protobuf.ByteString getCertificateMapIdBytes() { + java.lang.Object ref = certificateMapId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateMapId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A user-provided name of the certificate map.
+     * 
+ * + * string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The certificateMapId to set. + * @return This builder for chaining. + */ + public Builder setCertificateMapId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + certificateMapId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user-provided name of the certificate map.
+     * 
+ * + * string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCertificateMapId() { + + certificateMapId_ = getDefaultInstance().getCertificateMapId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user-provided name of the certificate map.
+     * 
+ * + * string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for certificateMapId to set. + * @return This builder for chaining. + */ + public Builder setCertificateMapIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + certificateMapId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.certificatemanager.v1.CertificateMap certificateMap_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap, + com.google.cloud.certificatemanager.v1.CertificateMap.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder> + certificateMapBuilder_; + /** + * + * + *
+     * Required. A definition of the certificate map to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMap field is set. + */ + public boolean hasCertificateMap() { + return certificateMapBuilder_ != null || certificateMap_ != null; + } + /** + * + * + *
+     * Required. A definition of the certificate map to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMap. + */ + public com.google.cloud.certificatemanager.v1.CertificateMap getCertificateMap() { + if (certificateMapBuilder_ == null) { + return certificateMap_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMap.getDefaultInstance() + : certificateMap_; + } else { + return certificateMapBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A definition of the certificate map to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateMap(com.google.cloud.certificatemanager.v1.CertificateMap value) { + if (certificateMapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateMap_ = value; + onChanged(); + } else { + certificateMapBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateMap( + com.google.cloud.certificatemanager.v1.CertificateMap.Builder builderForValue) { + if (certificateMapBuilder_ == null) { + certificateMap_ = builderForValue.build(); + onChanged(); + } else { + certificateMapBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificateMap( + com.google.cloud.certificatemanager.v1.CertificateMap value) { + if (certificateMapBuilder_ == null) { + if (certificateMap_ != null) { + certificateMap_ = + com.google.cloud.certificatemanager.v1.CertificateMap.newBuilder(certificateMap_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateMap_ = value; + } + onChanged(); + } else { + certificateMapBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificateMap() { + if (certificateMapBuilder_ == null) { + certificateMap_ = null; + onChanged(); + } else { + certificateMap_ = null; + certificateMapBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.Builder + getCertificateMapBuilder() { + + onChanged(); + return getCertificateMapFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A definition of the certificate map to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder + getCertificateMapOrBuilder() { + if (certificateMapBuilder_ != null) { + return certificateMapBuilder_.getMessageOrBuilder(); + } else { + return certificateMap_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMap.getDefaultInstance() + : certificateMap_; + } + } + /** + * + * + *
+     * Required. A definition of the certificate map to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap, + com.google.cloud.certificatemanager.v1.CertificateMap.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder> + getCertificateMapFieldBuilder() { + if (certificateMapBuilder_ == null) { + certificateMapBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap, + com.google.cloud.certificatemanager.v1.CertificateMap.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder>( + getCertificateMap(), getParentForChildren(), isClean()); + certificateMap_ = null; + } + return certificateMapBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.CreateCertificateMapRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.CreateCertificateMapRequest) + private static final com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest(); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCertificateMapRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateCertificateMapRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapRequestOrBuilder.java new file mode 100644 index 0000000..b0aebea --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateMapRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface CreateCertificateMapRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.CreateCertificateMapRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource of the certificate map. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource of the certificate map. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. A user-provided name of the certificate map.
+   * 
+ * + * string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateMapId. + */ + java.lang.String getCertificateMapId(); + /** + * + * + *
+   * Required. A user-provided name of the certificate map.
+   * 
+ * + * string certificate_map_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateMapId. + */ + com.google.protobuf.ByteString getCertificateMapIdBytes(); + + /** + * + * + *
+   * Required. A definition of the certificate map to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMap field is set. + */ + boolean hasCertificateMap(); + /** + * + * + *
+   * Required. A definition of the certificate map to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMap. + */ + com.google.cloud.certificatemanager.v1.CertificateMap getCertificateMap(); + /** + * + * + *
+   * Required. A definition of the certificate map to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder getCertificateMapOrBuilder(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateRequest.java new file mode 100644 index 0000000..f53f2d2 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateRequest.java @@ -0,0 +1,1147 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `CreateCertificate` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CreateCertificateRequest} + */ +public final class CreateCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.CreateCertificateRequest) + CreateCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCertificateRequest.newBuilder() to construct. + private CreateCertificateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCertificateRequest() { + parent_ = ""; + certificateId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateCertificateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + certificateId_ = s; + break; + } + case 26: + { + com.google.cloud.certificatemanager.v1.Certificate.Builder subBuilder = null; + if (certificate_ != null) { + subBuilder = certificate_.toBuilder(); + } + certificate_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.Certificate.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificate_); + certificate_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CreateCertificateRequest.class, + com.google.cloud.certificatemanager.v1.CreateCertificateRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource of the certificate. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource of the certificate. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERTIFICATE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object certificateId_; + /** + * + * + *
+   * Required. A user-provided name of the certificate.
+   * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateId. + */ + @java.lang.Override + public java.lang.String getCertificateId() { + java.lang.Object ref = certificateId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A user-provided name of the certificate.
+   * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCertificateIdBytes() { + java.lang.Object ref = certificateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERTIFICATE_FIELD_NUMBER = 3; + private com.google.cloud.certificatemanager.v1.Certificate certificate_; + /** + * + * + *
+   * Required. A definition of the certificate to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + @java.lang.Override + public boolean hasCertificate() { + return certificate_ != null; + } + /** + * + * + *
+   * Required. A definition of the certificate to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate getCertificate() { + return certificate_ == null + ? com.google.cloud.certificatemanager.v1.Certificate.getDefaultInstance() + : certificate_; + } + /** + * + * + *
+   * Required. A definition of the certificate to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateOrBuilder getCertificateOrBuilder() { + return getCertificate(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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(certificateId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, certificateId_); + } + if (certificate_ != null) { + output.writeMessage(3, getCertificate()); + } + 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(certificateId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, certificateId_); + } + if (certificate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCertificate()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.CreateCertificateRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.CreateCertificateRequest other = + (com.google.cloud.certificatemanager.v1.CreateCertificateRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getCertificateId().equals(other.getCertificateId())) return false; + if (hasCertificate() != other.hasCertificate()) return false; + if (hasCertificate()) { + if (!getCertificate().equals(other.getCertificate())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + CERTIFICATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getCertificateId().hashCode(); + if (hasCertificate()) { + hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getCertificate().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.CreateCertificateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `CreateCertificate` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CreateCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.CreateCertificateRequest) + com.google.cloud.certificatemanager.v1.CreateCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CreateCertificateRequest.class, + com.google.cloud.certificatemanager.v1.CreateCertificateRequest.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.CreateCertificateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + certificateId_ = ""; + + if (certificateBuilder_ == null) { + certificate_ = null; + } else { + certificate_ = null; + certificateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.CreateCertificateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateRequest build() { + com.google.cloud.certificatemanager.v1.CreateCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateRequest buildPartial() { + com.google.cloud.certificatemanager.v1.CreateCertificateRequest result = + new com.google.cloud.certificatemanager.v1.CreateCertificateRequest(this); + result.parent_ = parent_; + result.certificateId_ = certificateId_; + if (certificateBuilder_ == null) { + result.certificate_ = certificate_; + } else { + result.certificate_ = certificateBuilder_.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.certificatemanager.v1.CreateCertificateRequest) { + return mergeFrom((com.google.cloud.certificatemanager.v1.CreateCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.CreateCertificateRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.CreateCertificateRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getCertificateId().isEmpty()) { + certificateId_ = other.certificateId_; + onChanged(); + } + if (other.hasCertificate()) { + mergeCertificate(other.getCertificate()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + 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.certificatemanager.v1.CreateCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.CreateCertificateRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource of the certificate. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the certificate. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the certificate. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the certificate. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the certificate. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object certificateId_ = ""; + /** + * + * + *
+     * Required. A user-provided name of the certificate.
+     * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateId. + */ + public java.lang.String getCertificateId() { + java.lang.Object ref = certificateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + certificateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A user-provided name of the certificate.
+     * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateId. + */ + public com.google.protobuf.ByteString getCertificateIdBytes() { + java.lang.Object ref = certificateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + certificateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A user-provided name of the certificate.
+     * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The certificateId to set. + * @return This builder for chaining. + */ + public Builder setCertificateId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + certificateId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user-provided name of the certificate.
+     * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCertificateId() { + + certificateId_ = getDefaultInstance().getCertificateId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user-provided name of the certificate.
+     * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for certificateId to set. + * @return This builder for chaining. + */ + public Builder setCertificateIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + certificateId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.certificatemanager.v1.Certificate certificate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate, + com.google.cloud.certificatemanager.v1.Certificate.Builder, + com.google.cloud.certificatemanager.v1.CertificateOrBuilder> + certificateBuilder_; + /** + * + * + *
+     * Required. A definition of the certificate to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + public boolean hasCertificate() { + return certificateBuilder_ != null || certificate_ != null; + } + /** + * + * + *
+     * Required. A definition of the certificate to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + public com.google.cloud.certificatemanager.v1.Certificate getCertificate() { + if (certificateBuilder_ == null) { + return certificate_ == null + ? com.google.cloud.certificatemanager.v1.Certificate.getDefaultInstance() + : certificate_; + } else { + return certificateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A definition of the certificate to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificate(com.google.cloud.certificatemanager.v1.Certificate value) { + if (certificateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificate_ = value; + onChanged(); + } else { + certificateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificate( + com.google.cloud.certificatemanager.v1.Certificate.Builder builderForValue) { + if (certificateBuilder_ == null) { + certificate_ = builderForValue.build(); + onChanged(); + } else { + certificateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificate(com.google.cloud.certificatemanager.v1.Certificate value) { + if (certificateBuilder_ == null) { + if (certificate_ != null) { + certificate_ = + com.google.cloud.certificatemanager.v1.Certificate.newBuilder(certificate_) + .mergeFrom(value) + .buildPartial(); + } else { + certificate_ = value; + } + onChanged(); + } else { + certificateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificate() { + if (certificateBuilder_ == null) { + certificate_ = null; + onChanged(); + } else { + certificate_ = null; + certificateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.Certificate.Builder getCertificateBuilder() { + + onChanged(); + return getCertificateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A definition of the certificate to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateOrBuilder getCertificateOrBuilder() { + if (certificateBuilder_ != null) { + return certificateBuilder_.getMessageOrBuilder(); + } else { + return certificate_ == null + ? com.google.cloud.certificatemanager.v1.Certificate.getDefaultInstance() + : certificate_; + } + } + /** + * + * + *
+     * Required. A definition of the certificate to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate, + com.google.cloud.certificatemanager.v1.Certificate.Builder, + com.google.cloud.certificatemanager.v1.CertificateOrBuilder> + getCertificateFieldBuilder() { + if (certificateBuilder_ == null) { + certificateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate, + com.google.cloud.certificatemanager.v1.Certificate.Builder, + com.google.cloud.certificatemanager.v1.CertificateOrBuilder>( + getCertificate(), getParentForChildren(), isClean()); + certificate_ = null; + } + return certificateBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.CreateCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.CreateCertificateRequest) + private static final com.google.cloud.certificatemanager.v1.CreateCertificateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.CreateCertificateRequest(); + } + + public static com.google.cloud.certificatemanager.v1.CreateCertificateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateCertificateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateCertificateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateRequestOrBuilder.java new file mode 100644 index 0000000..9d1c9d3 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateCertificateRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface CreateCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.CreateCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource of the certificate. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource of the certificate. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. A user-provided name of the certificate.
+   * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The certificateId. + */ + java.lang.String getCertificateId(); + /** + * + * + *
+   * Required. A user-provided name of the certificate.
+   * 
+ * + * string certificate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for certificateId. + */ + com.google.protobuf.ByteString getCertificateIdBytes(); + + /** + * + * + *
+   * Required. A definition of the certificate to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + boolean hasCertificate(); + /** + * + * + *
+   * Required. A definition of the certificate to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + com.google.cloud.certificatemanager.v1.Certificate getCertificate(); + /** + * + * + *
+   * Required. A definition of the certificate to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.certificatemanager.v1.CertificateOrBuilder getCertificateOrBuilder(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateDnsAuthorizationRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateDnsAuthorizationRequest.java new file mode 100644 index 0000000..d6a15f3 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateDnsAuthorizationRequest.java @@ -0,0 +1,1156 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `CreateDnsAuthorization` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest} + */ +public final class CreateDnsAuthorizationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest) + CreateDnsAuthorizationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDnsAuthorizationRequest.newBuilder() to construct. + private CreateDnsAuthorizationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDnsAuthorizationRequest() { + parent_ = ""; + dnsAuthorizationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDnsAuthorizationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateDnsAuthorizationRequest( + 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(); + + dnsAuthorizationId_ = s; + break; + } + case 26: + { + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder subBuilder = null; + if (dnsAuthorization_ != null) { + subBuilder = dnsAuthorization_.toBuilder(); + } + dnsAuthorization_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.DnsAuthorization.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dnsAuthorization_); + dnsAuthorization_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateDnsAuthorizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest.class, + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource of the dns authorization. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource of the dns authorization. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DNS_AUTHORIZATION_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object dnsAuthorizationId_; + /** + * + * + *
+   * Required. A user-provided name of the dns authorization.
+   * 
+ * + * string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dnsAuthorizationId. + */ + @java.lang.Override + public java.lang.String getDnsAuthorizationId() { + java.lang.Object ref = dnsAuthorizationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dnsAuthorizationId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A user-provided name of the dns authorization.
+   * 
+ * + * string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dnsAuthorizationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDnsAuthorizationIdBytes() { + java.lang.Object ref = dnsAuthorizationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dnsAuthorizationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DNS_AUTHORIZATION_FIELD_NUMBER = 3; + private com.google.cloud.certificatemanager.v1.DnsAuthorization dnsAuthorization_; + /** + * + * + *
+   * Required. A definition of the dns authorization to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dnsAuthorization field is set. + */ + @java.lang.Override + public boolean hasDnsAuthorization() { + return dnsAuthorization_ != null; + } + /** + * + * + *
+   * Required. A definition of the dns authorization to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dnsAuthorization. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization getDnsAuthorization() { + return dnsAuthorization_ == null + ? com.google.cloud.certificatemanager.v1.DnsAuthorization.getDefaultInstance() + : dnsAuthorization_; + } + /** + * + * + *
+   * Required. A definition of the dns authorization to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder + getDnsAuthorizationOrBuilder() { + return getDnsAuthorization(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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(dnsAuthorizationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dnsAuthorizationId_); + } + if (dnsAuthorization_ != null) { + output.writeMessage(3, getDnsAuthorization()); + } + 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(dnsAuthorizationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dnsAuthorizationId_); + } + if (dnsAuthorization_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDnsAuthorization()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest other = + (com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDnsAuthorizationId().equals(other.getDnsAuthorizationId())) return false; + if (hasDnsAuthorization() != other.hasDnsAuthorization()) return false; + if (hasDnsAuthorization()) { + if (!getDnsAuthorization().equals(other.getDnsAuthorization())) 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) + DNS_AUTHORIZATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getDnsAuthorizationId().hashCode(); + if (hasDnsAuthorization()) { + hash = (37 * hash) + DNS_AUTHORIZATION_FIELD_NUMBER; + hash = (53 * hash) + getDnsAuthorization().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `CreateDnsAuthorization` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest) + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateDnsAuthorizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest.class, + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest.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_ = ""; + + dnsAuthorizationId_ = ""; + + if (dnsAuthorizationBuilder_ == null) { + dnsAuthorization_ = null; + } else { + dnsAuthorization_ = null; + dnsAuthorizationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_CreateDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest build() { + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest buildPartial() { + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest result = + new com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest(this); + result.parent_ = parent_; + result.dnsAuthorizationId_ = dnsAuthorizationId_; + if (dnsAuthorizationBuilder_ == null) { + result.dnsAuthorization_ = dnsAuthorization_; + } else { + result.dnsAuthorization_ = dnsAuthorizationBuilder_.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.certificatemanager.v1.CreateDnsAuthorizationRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getDnsAuthorizationId().isEmpty()) { + dnsAuthorizationId_ = other.dnsAuthorizationId_; + onChanged(); + } + if (other.hasDnsAuthorization()) { + mergeDnsAuthorization(other.getDnsAuthorization()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + 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.certificatemanager.v1.CreateDnsAuthorizationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource of the dns authorization. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the dns authorization. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource of the dns authorization. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the dns authorization. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource of the dns authorization. Must be in the format
+     * `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object dnsAuthorizationId_ = ""; + /** + * + * + *
+     * Required. A user-provided name of the dns authorization.
+     * 
+ * + * string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dnsAuthorizationId. + */ + public java.lang.String getDnsAuthorizationId() { + java.lang.Object ref = dnsAuthorizationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dnsAuthorizationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A user-provided name of the dns authorization.
+     * 
+ * + * string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dnsAuthorizationId. + */ + public com.google.protobuf.ByteString getDnsAuthorizationIdBytes() { + java.lang.Object ref = dnsAuthorizationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dnsAuthorizationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A user-provided name of the dns authorization.
+     * 
+ * + * string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The dnsAuthorizationId to set. + * @return This builder for chaining. + */ + public Builder setDnsAuthorizationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dnsAuthorizationId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user-provided name of the dns authorization.
+     * 
+ * + * string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDnsAuthorizationId() { + + dnsAuthorizationId_ = getDefaultInstance().getDnsAuthorizationId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user-provided name of the dns authorization.
+     * 
+ * + * string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for dnsAuthorizationId to set. + * @return This builder for chaining. + */ + public Builder setDnsAuthorizationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dnsAuthorizationId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.certificatemanager.v1.DnsAuthorization dnsAuthorization_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder> + dnsAuthorizationBuilder_; + /** + * + * + *
+     * Required. A definition of the dns authorization to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dnsAuthorization field is set. + */ + public boolean hasDnsAuthorization() { + return dnsAuthorizationBuilder_ != null || dnsAuthorization_ != null; + } + /** + * + * + *
+     * Required. A definition of the dns authorization to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dnsAuthorization. + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization getDnsAuthorization() { + if (dnsAuthorizationBuilder_ == null) { + return dnsAuthorization_ == null + ? com.google.cloud.certificatemanager.v1.DnsAuthorization.getDefaultInstance() + : dnsAuthorization_; + } else { + return dnsAuthorizationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A definition of the dns authorization to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDnsAuthorization( + com.google.cloud.certificatemanager.v1.DnsAuthorization value) { + if (dnsAuthorizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dnsAuthorization_ = value; + onChanged(); + } else { + dnsAuthorizationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the dns authorization to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDnsAuthorization( + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder builderForValue) { + if (dnsAuthorizationBuilder_ == null) { + dnsAuthorization_ = builderForValue.build(); + onChanged(); + } else { + dnsAuthorizationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the dns authorization to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDnsAuthorization( + com.google.cloud.certificatemanager.v1.DnsAuthorization value) { + if (dnsAuthorizationBuilder_ == null) { + if (dnsAuthorization_ != null) { + dnsAuthorization_ = + com.google.cloud.certificatemanager.v1.DnsAuthorization.newBuilder(dnsAuthorization_) + .mergeFrom(value) + .buildPartial(); + } else { + dnsAuthorization_ = value; + } + onChanged(); + } else { + dnsAuthorizationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the dns authorization to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDnsAuthorization() { + if (dnsAuthorizationBuilder_ == null) { + dnsAuthorization_ = null; + onChanged(); + } else { + dnsAuthorization_ = null; + dnsAuthorizationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the dns authorization to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder + getDnsAuthorizationBuilder() { + + onChanged(); + return getDnsAuthorizationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A definition of the dns authorization to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder + getDnsAuthorizationOrBuilder() { + if (dnsAuthorizationBuilder_ != null) { + return dnsAuthorizationBuilder_.getMessageOrBuilder(); + } else { + return dnsAuthorization_ == null + ? com.google.cloud.certificatemanager.v1.DnsAuthorization.getDefaultInstance() + : dnsAuthorization_; + } + } + /** + * + * + *
+     * Required. A definition of the dns authorization to create.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder> + getDnsAuthorizationFieldBuilder() { + if (dnsAuthorizationBuilder_ == null) { + dnsAuthorizationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder>( + getDnsAuthorization(), getParentForChildren(), isClean()); + dnsAuthorization_ = null; + } + return dnsAuthorizationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest) + private static final com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest(); + } + + public static com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDnsAuthorizationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDnsAuthorizationRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateDnsAuthorizationRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateDnsAuthorizationRequestOrBuilder.java new file mode 100644 index 0000000..86dafc8 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateDnsAuthorizationRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface CreateDnsAuthorizationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource of the dns authorization. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource of the dns authorization. Must be in the format
+   * `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. A user-provided name of the dns authorization.
+   * 
+ * + * string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dnsAuthorizationId. + */ + java.lang.String getDnsAuthorizationId(); + /** + * + * + *
+   * Required. A user-provided name of the dns authorization.
+   * 
+ * + * string dns_authorization_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dnsAuthorizationId. + */ + com.google.protobuf.ByteString getDnsAuthorizationIdBytes(); + + /** + * + * + *
+   * Required. A definition of the dns authorization to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dnsAuthorization field is set. + */ + boolean hasDnsAuthorization(); + /** + * + * + *
+   * Required. A definition of the dns authorization to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dnsAuthorization. + */ + com.google.cloud.certificatemanager.v1.DnsAuthorization getDnsAuthorization(); + /** + * + * + *
+   * Required. A definition of the dns authorization to create.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder getDnsAuthorizationOrBuilder(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapEntryRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapEntryRequest.java new file mode 100644 index 0000000..fa17310 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapEntryRequest.java @@ -0,0 +1,674 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `DeleteCertificateMapEntry` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest} + */ +public final class DeleteCertificateMapEntryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest) + DeleteCertificateMapEntryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteCertificateMapEntryRequest.newBuilder() to construct. + private DeleteCertificateMapEntryRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCertificateMapEntryRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCertificateMapEntryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteCertificateMapEntryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest.class, + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. A name of the certificate map entry to delete. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * + * 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. A name of the certificate map entry to delete. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * + * 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.certificatemanager.v1.DeleteCertificateMapEntryRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest other = + (com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest) 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.certificatemanager.v1.DeleteCertificateMapEntryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `DeleteCertificateMapEntry` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest) + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest.class, + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest build() { + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest buildPartial() { + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest result = + new com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest(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.certificatemanager.v1.DeleteCertificateMapEntryRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest + .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.certificatemanager.v1.DeleteCertificateMapEntryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A name of the certificate map entry to delete. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * + * 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. A name of the certificate map entry to delete. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * + * 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. A name of the certificate map entry to delete. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * + * 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. A name of the certificate map entry to delete. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * + * 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. A name of the certificate map entry to delete. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * + * 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.certificatemanager.v1.DeleteCertificateMapEntryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest) + private static final com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest(); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCertificateMapEntryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteCertificateMapEntryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapEntryRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapEntryRequestOrBuilder.java new file mode 100644 index 0000000..3f25d2e --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapEntryRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface DeleteCertificateMapEntryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the certificate map entry to delete. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A name of the certificate map entry to delete. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * + * 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapRequest.java new file mode 100644 index 0000000..cfd9370 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapRequest.java @@ -0,0 +1,669 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `DeleteCertificateMap` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DeleteCertificateMapRequest} + */ +public final class DeleteCertificateMapRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.DeleteCertificateMapRequest) + DeleteCertificateMapRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteCertificateMapRequest.newBuilder() to construct. + private DeleteCertificateMapRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCertificateMapRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCertificateMapRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteCertificateMapRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest.class, + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. A name of the certificate map to delete. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * 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. A name of the certificate map to delete. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * 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.certificatemanager.v1.DeleteCertificateMapRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest other = + (com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest) 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.certificatemanager.v1.DeleteCertificateMapRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `DeleteCertificateMap` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DeleteCertificateMapRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.DeleteCertificateMapRequest) + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest.class, + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateMapRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest build() { + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest buildPartial() { + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest result = + new com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest(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.certificatemanager.v1.DeleteCertificateMapRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest + .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.certificatemanager.v1.DeleteCertificateMapRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A name of the certificate map to delete. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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. A name of the certificate map to delete. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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. A name of the certificate map to delete. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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. A name of the certificate map to delete. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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. A name of the certificate map to delete. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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.certificatemanager.v1.DeleteCertificateMapRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.DeleteCertificateMapRequest) + private static final com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest(); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCertificateMapRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteCertificateMapRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapRequestOrBuilder.java new file mode 100644 index 0000000..a7216a2 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateMapRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface DeleteCertificateMapRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.DeleteCertificateMapRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the certificate map to delete. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A name of the certificate map to delete. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateRequest.java new file mode 100644 index 0000000..2fefc0a --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `DeleteCertificate` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DeleteCertificateRequest} + */ +public final class DeleteCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.DeleteCertificateRequest) + DeleteCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteCertificateRequest.newBuilder() to construct. + private DeleteCertificateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCertificateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteCertificateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest.class, + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. A name of the certificate to delete. Must be in the format
+   * `projects/*/locations/*/certificates/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A name of the certificate to delete. Must be in the format
+   * `projects/*/locations/*/certificates/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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.certificatemanager.v1.DeleteCertificateRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest other = + (com.google.cloud.certificatemanager.v1.DeleteCertificateRequest) 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.certificatemanager.v1.DeleteCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `DeleteCertificate` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DeleteCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.DeleteCertificateRequest) + com.google.cloud.certificatemanager.v1.DeleteCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest.class, + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.DeleteCertificateRequest.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.DeleteCertificateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateRequest build() { + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateRequest buildPartial() { + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest result = + new com.google.cloud.certificatemanager.v1.DeleteCertificateRequest(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.certificatemanager.v1.DeleteCertificateRequest) { + return mergeFrom((com.google.cloud.certificatemanager.v1.DeleteCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.DeleteCertificateRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.DeleteCertificateRequest.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.certificatemanager.v1.DeleteCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.DeleteCertificateRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A name of the certificate to delete. Must be in the format
+     * `projects/*/locations/*/certificates/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A name of the certificate to delete. Must be in the format
+     * `projects/*/locations/*/certificates/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A name of the certificate to delete. Must be in the format
+     * `projects/*/locations/*/certificates/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A name of the certificate to delete. Must be in the format
+     * `projects/*/locations/*/certificates/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A name of the certificate to delete. Must be in the format
+     * `projects/*/locations/*/certificates/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.DeleteCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.DeleteCertificateRequest) + private static final com.google.cloud.certificatemanager.v1.DeleteCertificateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.DeleteCertificateRequest(); + } + + public static com.google.cloud.certificatemanager.v1.DeleteCertificateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteCertificateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteCertificateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateRequestOrBuilder.java new file mode 100644 index 0000000..a879384 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteCertificateRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface DeleteCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.DeleteCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the certificate to delete. Must be in the format
+   * `projects/*/locations/*/certificates/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A name of the certificate to delete. Must be in the format
+   * `projects/*/locations/*/certificates/*`.
+   * 
+ * + * + * 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteDnsAuthorizationRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteDnsAuthorizationRequest.java new file mode 100644 index 0000000..ce6a893 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteDnsAuthorizationRequest.java @@ -0,0 +1,669 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `DeleteDnsAuthorization` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest} + */ +public final class DeleteDnsAuthorizationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest) + DeleteDnsAuthorizationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDnsAuthorizationRequest.newBuilder() to construct. + private DeleteDnsAuthorizationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDnsAuthorizationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDnsAuthorizationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteDnsAuthorizationRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteDnsAuthorizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest.class, + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. A name of the dns authorization to delete. Must be in the format
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * + * 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. A name of the dns authorization to delete. Must be in the format
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * + * 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.certificatemanager.v1.DeleteDnsAuthorizationRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest other = + (com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest) 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.certificatemanager.v1.DeleteDnsAuthorizationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `DeleteDnsAuthorization` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest) + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteDnsAuthorizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest.class, + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DeleteDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest build() { + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest buildPartial() { + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest result = + new com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest(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.certificatemanager.v1.DeleteDnsAuthorizationRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest + .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.certificatemanager.v1.DeleteDnsAuthorizationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A name of the dns authorization to delete. Must be in the format
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * + * 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. A name of the dns authorization to delete. Must be in the format
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * + * 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. A name of the dns authorization to delete. Must be in the format
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * + * 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. A name of the dns authorization to delete. Must be in the format
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * + * 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. A name of the dns authorization to delete. Must be in the format
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * + * 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.certificatemanager.v1.DeleteDnsAuthorizationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest) + private static final com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest(); + } + + public static com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDnsAuthorizationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDnsAuthorizationRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteDnsAuthorizationRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteDnsAuthorizationRequestOrBuilder.java new file mode 100644 index 0000000..84ba26f --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteDnsAuthorizationRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface DeleteDnsAuthorizationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the dns authorization to delete. Must be in the format
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A name of the dns authorization to delete. Must be in the format
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * + * 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorization.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorization.java new file mode 100644 index 0000000..678a496 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorization.java @@ -0,0 +1,3375 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * A DnsAuthorization resource describes a way to perform domain authorization
+ * for certificate issuance.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DnsAuthorization} + */ +public final class DnsAuthorization extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.DnsAuthorization) + DnsAuthorizationOrBuilder { + private static final long serialVersionUID = 0L; + // Use DnsAuthorization.newBuilder() to construct. + private DnsAuthorization(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DnsAuthorization() { + name_ = ""; + description_ = ""; + domain_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DnsAuthorization(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DnsAuthorization( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + domain_ = s; + break; + } + case 82: + { + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.Builder + subBuilder = null; + if (dnsResourceRecord_ != null) { + subBuilder = dnsResourceRecord_.toBuilder(); + } + dnsResourceRecord_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dnsResourceRecord_); + dnsResourceRecord_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DnsAuthorization.class, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder.class); + } + + public interface DnsResourceRecordOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Fully qualified name of the DNS Resource Record.
+     * e.g. `_acme-challenge.example.com`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Output only. Fully qualified name of the DNS Resource Record.
+     * e.g. `_acme-challenge.example.com`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Output only. Type of the DNS Resource Record.
+     * Currently always set to "CNAME".
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+     * Output only. Type of the DNS Resource Record.
+     * Currently always set to "CNAME".
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+     * Output only. Data of the DNS Resource Record.
+     * 
+ * + * string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The data. + */ + java.lang.String getData(); + /** + * + * + *
+     * Output only. Data of the DNS Resource Record.
+     * 
+ * + * string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for data. + */ + com.google.protobuf.ByteString getDataBytes(); + } + /** + * + * + *
+   * The structure describing the DNS Resource Record that needs to be added
+   * to DNS configuration for the authorization to be usable by
+   * certificate.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord} + */ + public static final class DnsResourceRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord) + DnsResourceRecordOrBuilder { + private static final long serialVersionUID = 0L; + // Use DnsResourceRecord.newBuilder() to construct. + private DnsResourceRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DnsResourceRecord() { + name_ = ""; + type_ = ""; + data_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DnsResourceRecord(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DnsResourceRecord( + 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(); + + type_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + data_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_DnsResourceRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_DnsResourceRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.class, + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Output only. Fully qualified name of the DNS Resource Record.
+     * e.g. `_acme-challenge.example.com`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. Fully qualified name of the DNS Resource Record.
+     * e.g. `_acme-challenge.example.com`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object type_; + /** + * + * + *
+     * Output only. Type of the DNS Resource Record.
+     * Currently always set to "CNAME".
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. Type of the DNS Resource Record.
+     * Currently always set to "CNAME".
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 3; + private volatile java.lang.Object data_; + /** + * + * + *
+     * Output only. Data of the DNS Resource Record.
+     * 
+ * + * string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The data. + */ + @java.lang.Override + public java.lang.String getData() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. Data of the DNS Resource Record.
+     * 
+ * + * string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + data_ = 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, data_); + } + 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(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, data_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord other = + (com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord) obj; + + if (!getName().equals(other.getName())) return false; + if (!getType().equals(other.getType())) return false; + if (!getData().equals(other.getData())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 structure describing the DNS Resource Record that needs to be added
+     * to DNS configuration for the authorization to be usable by
+     * certificate.
+     * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord) + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_DnsResourceRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_DnsResourceRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.class, + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.Builder + .class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.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_ = ""; + + type_ = ""; + + data_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_DnsResourceRecord_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord build() { + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + buildPartial() { + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord result = + new com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord(this); + result.name_ = name_; + result.type_ = type_; + result.data_ = data_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord other) { + if (other + == com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getData().isEmpty()) { + data_ = other.data_; + 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.certificatemanager.v1.DnsAuthorization.DnsResourceRecord parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Output only. Fully qualified name of the DNS Resource Record.
+       * e.g. `_acme-challenge.example.com`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. Fully qualified name of the DNS Resource Record.
+       * e.g. `_acme-challenge.example.com`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. Fully qualified name of the DNS Resource Record.
+       * e.g. `_acme-challenge.example.com`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Fully qualified name of the DNS Resource Record.
+       * e.g. `_acme-challenge.example.com`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Fully qualified name of the DNS Resource Record.
+       * e.g. `_acme-challenge.example.com`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+       * Output only. Type of the DNS Resource Record.
+       * Currently always set to "CNAME".
+       * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. Type of the DNS Resource Record.
+       * Currently always set to "CNAME".
+       * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. Type of the DNS Resource Record.
+       * Currently always set to "CNAME".
+       * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Type of the DNS Resource Record.
+       * Currently always set to "CNAME".
+       * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Type of the DNS Resource Record.
+       * Currently always set to "CNAME".
+       * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object data_ = ""; + /** + * + * + *
+       * Output only. Data of the DNS Resource Record.
+       * 
+ * + * string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The data. + */ + public java.lang.String getData() { + java.lang.Object ref = data_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. Data of the DNS Resource Record.
+       * 
+ * + * string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for data. + */ + public com.google.protobuf.ByteString getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. Data of the DNS Resource Record.
+       * 
+ * + * string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Data of the DNS Resource Record.
+       * 
+ * + * string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Data of the DNS Resource Record.
+       * 
+ * + * string data = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for data to set. + * @return This builder for chaining. + */ + public Builder setDataBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + data_ = 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.certificatemanager.v1.DnsAuthorization.DnsResourceRecord) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord) + private static final com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord(); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DnsResourceRecord parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DnsResourceRecord(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * A user-defined name of the dns authorization. DnsAuthorization names must
+   * be unique globally and match pattern
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * A user-defined name of the dns authorization. DnsAuthorization names must
+   * be unique globally and match pattern
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The creation timestamp of a DnsAuthorization.
+   * 
+ * + * .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. The creation timestamp of a DnsAuthorization.
+   * 
+ * + * .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. The creation timestamp of a DnsAuthorization.
+   * 
+ * + * .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. The last update timestamp of a DnsAuthorization.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The last update timestamp of a DnsAuthorization.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The last update timestamp of a DnsAuthorization.
+   * 
+ * + * .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 LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Set of labels associated with a DnsAuthorization.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Set of labels associated with a DnsAuthorization.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Set of labels associated with a DnsAuthorization.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Set of labels associated with a DnsAuthorization.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + private volatile java.lang.Object description_; + /** + * + * + *
+   * One or more paragraphs of text description of a DnsAuthorization.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * One or more paragraphs of text description of a DnsAuthorization.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOMAIN_FIELD_NUMBER = 6; + private volatile java.lang.Object domain_; + /** + * + * + *
+   * Required. Immutable. A domain which is being authorized. A DnsAuthorization resource covers a
+   * single domain and its wildcard, e.g. authorization for `example.com` can
+   * be used to issue certificates for `example.com` and `*.example.com`.
+   * 
+ * + * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The domain. + */ + @java.lang.Override + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Immutable. A domain which is being authorized. A DnsAuthorization resource covers a
+   * single domain and its wildcard, e.g. authorization for `example.com` can
+   * be used to issue certificates for `example.com` and `*.example.com`.
+   * 
+ * + * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for domain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DNS_RESOURCE_RECORD_FIELD_NUMBER = 10; + private com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + dnsResourceRecord_; + /** + * + * + *
+   * Output only. DNS Resource Record that needs to be added to DNS configuration.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dnsResourceRecord field is set. + */ + @java.lang.Override + public boolean hasDnsResourceRecord() { + return dnsResourceRecord_ != null; + } + /** + * + * + *
+   * Output only. DNS Resource Record that needs to be added to DNS configuration.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dnsResourceRecord. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + getDnsResourceRecord() { + return dnsResourceRecord_ == null + ? com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + .getDefaultInstance() + : dnsResourceRecord_; + } + /** + * + * + *
+   * Output only. DNS Resource Record that needs to be added to DNS configuration.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecordOrBuilder + getDnsResourceRecordOrBuilder() { + return getDnsResourceRecord(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(domain_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, domain_); + } + if (dnsResourceRecord_ != null) { + output.writeMessage(10, getDnsResourceRecord()); + } + 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()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(domain_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, domain_); + } + if (dnsResourceRecord_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDnsResourceRecord()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.DnsAuthorization)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.DnsAuthorization other = + (com.google.cloud.certificatemanager.v1.DnsAuthorization) 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 (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getDomain().equals(other.getDomain())) return false; + if (hasDnsResourceRecord() != other.hasDnsResourceRecord()) return false; + if (hasDnsResourceRecord()) { + if (!getDnsResourceRecord().equals(other.getDnsResourceRecord())) 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(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getDomain().hashCode(); + if (hasDnsResourceRecord()) { + hash = (37 * hash) + DNS_RESOURCE_RECORD_FIELD_NUMBER; + hash = (53 * hash) + getDnsResourceRecord().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.DnsAuthorization prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A DnsAuthorization resource describes a way to perform domain authorization
+   * for certificate issuance.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.DnsAuthorization} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.DnsAuthorization) + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.DnsAuthorization.class, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.DnsAuthorization.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; + } + internalGetMutableLabels().clear(); + description_ = ""; + + domain_ = ""; + + if (dnsResourceRecordBuilder_ == null) { + dnsResourceRecord_ = null; + } else { + dnsResourceRecord_ = null; + dnsResourceRecordBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_DnsAuthorization_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.DnsAuthorization.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization build() { + com.google.cloud.certificatemanager.v1.DnsAuthorization result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization buildPartial() { + com.google.cloud.certificatemanager.v1.DnsAuthorization result = + new com.google.cloud.certificatemanager.v1.DnsAuthorization(this); + int from_bitField0_ = bitField0_; + 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.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.description_ = description_; + result.domain_ = domain_; + if (dnsResourceRecordBuilder_ == null) { + result.dnsResourceRecord_ = dnsResourceRecord_; + } else { + result.dnsResourceRecord_ = dnsResourceRecordBuilder_.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.certificatemanager.v1.DnsAuthorization) { + return mergeFrom((com.google.cloud.certificatemanager.v1.DnsAuthorization) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.certificatemanager.v1.DnsAuthorization other) { + if (other == com.google.cloud.certificatemanager.v1.DnsAuthorization.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getDomain().isEmpty()) { + domain_ = other.domain_; + onChanged(); + } + if (other.hasDnsResourceRecord()) { + mergeDnsResourceRecord(other.getDnsResourceRecord()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + 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.certificatemanager.v1.DnsAuthorization parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.DnsAuthorization) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * A user-defined name of the dns authorization. DnsAuthorization names must
+     * be unique globally and match pattern
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A user-defined name of the dns authorization. DnsAuthorization names must
+     * be unique globally and match pattern
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A user-defined name of the dns authorization. DnsAuthorization names must
+     * be unique globally and match pattern
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A user-defined name of the dns authorization. DnsAuthorization names must
+     * be unique globally and match pattern
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A user-defined name of the dns authorization. DnsAuthorization names must
+     * be unique globally and match pattern
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private 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 creation timestamp of a DnsAuthorization.
+     * 
+ * + * + * .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. The creation timestamp of a DnsAuthorization.
+     * 
+ * + * + * .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. The creation timestamp of a DnsAuthorization.
+     * 
+ * + * + * .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. The creation timestamp of a DnsAuthorization.
+     * 
+ * + * + * .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. The creation timestamp of a DnsAuthorization.
+     * 
+ * + * + * .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. The creation timestamp of a DnsAuthorization.
+     * 
+ * + * + * .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. The creation timestamp of a DnsAuthorization.
+     * 
+ * + * + * .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. The creation timestamp of a DnsAuthorization.
+     * 
+ * + * + * .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. The creation timestamp of a DnsAuthorization.
+     * 
+ * + * + * .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. The last update timestamp of a DnsAuthorization.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The last update timestamp of a DnsAuthorization.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The last update timestamp of a DnsAuthorization.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of a DnsAuthorization.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of a DnsAuthorization.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of a DnsAuthorization.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The last update timestamp of a DnsAuthorization.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The last update timestamp of a DnsAuthorization.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The last update timestamp of a DnsAuthorization.
+     * 
+ * + * + * .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 com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Set of labels associated with a DnsAuthorization.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Set of labels associated with a DnsAuthorization.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Set of labels associated with a DnsAuthorization.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Set of labels associated with a DnsAuthorization.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Set of labels associated with a DnsAuthorization.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Set of labels associated with a DnsAuthorization.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Set of labels associated with a DnsAuthorization.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * One or more paragraphs of text description of a DnsAuthorization.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * One or more paragraphs of text description of a DnsAuthorization.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * One or more paragraphs of text description of a DnsAuthorization.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * One or more paragraphs of text description of a DnsAuthorization.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * One or more paragraphs of text description of a DnsAuthorization.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object domain_ = ""; + /** + * + * + *
+     * Required. Immutable. A domain which is being authorized. A DnsAuthorization resource covers a
+     * single domain and its wildcard, e.g. authorization for `example.com` can
+     * be used to issue certificates for `example.com` and `*.example.com`.
+     * 
+ * + * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The domain. + */ + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Immutable. A domain which is being authorized. A DnsAuthorization resource covers a
+     * single domain and its wildcard, e.g. authorization for `example.com` can
+     * be used to issue certificates for `example.com` and `*.example.com`.
+     * 
+ * + * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for domain. + */ + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Immutable. A domain which is being authorized. A DnsAuthorization resource covers a
+     * single domain and its wildcard, e.g. authorization for `example.com` can
+     * be used to issue certificates for `example.com` and `*.example.com`.
+     * 
+ * + * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The domain to set. + * @return This builder for chaining. + */ + public Builder setDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + domain_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. A domain which is being authorized. A DnsAuthorization resource covers a
+     * single domain and its wildcard, e.g. authorization for `example.com` can
+     * be used to issue certificates for `example.com` and `*.example.com`.
+     * 
+ * + * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearDomain() { + + domain_ = getDefaultInstance().getDomain(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. A domain which is being authorized. A DnsAuthorization resource covers a
+     * single domain and its wildcard, e.g. authorization for `example.com` can
+     * be used to issue certificates for `example.com` and `*.example.com`.
+     * 
+ * + * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for domain to set. + * @return This builder for chaining. + */ + public Builder setDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + domain_ = value; + onChanged(); + return this; + } + + private com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + dnsResourceRecord_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord, + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecordOrBuilder> + dnsResourceRecordBuilder_; + /** + * + * + *
+     * Output only. DNS Resource Record that needs to be added to DNS configuration.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dnsResourceRecord field is set. + */ + public boolean hasDnsResourceRecord() { + return dnsResourceRecordBuilder_ != null || dnsResourceRecord_ != null; + } + /** + * + * + *
+     * Output only. DNS Resource Record that needs to be added to DNS configuration.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dnsResourceRecord. + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + getDnsResourceRecord() { + if (dnsResourceRecordBuilder_ == null) { + return dnsResourceRecord_ == null + ? com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + .getDefaultInstance() + : dnsResourceRecord_; + } else { + return dnsResourceRecordBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. DNS Resource Record that needs to be added to DNS configuration.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDnsResourceRecord( + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord value) { + if (dnsResourceRecordBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dnsResourceRecord_ = value; + onChanged(); + } else { + dnsResourceRecordBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. DNS Resource Record that needs to be added to DNS configuration.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDnsResourceRecord( + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.Builder + builderForValue) { + if (dnsResourceRecordBuilder_ == null) { + dnsResourceRecord_ = builderForValue.build(); + onChanged(); + } else { + dnsResourceRecordBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. DNS Resource Record that needs to be added to DNS configuration.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDnsResourceRecord( + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord value) { + if (dnsResourceRecordBuilder_ == null) { + if (dnsResourceRecord_ != null) { + dnsResourceRecord_ = + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.newBuilder( + dnsResourceRecord_) + .mergeFrom(value) + .buildPartial(); + } else { + dnsResourceRecord_ = value; + } + onChanged(); + } else { + dnsResourceRecordBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. DNS Resource Record that needs to be added to DNS configuration.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDnsResourceRecord() { + if (dnsResourceRecordBuilder_ == null) { + dnsResourceRecord_ = null; + onChanged(); + } else { + dnsResourceRecord_ = null; + dnsResourceRecordBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. DNS Resource Record that needs to be added to DNS configuration.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.Builder + getDnsResourceRecordBuilder() { + + onChanged(); + return getDnsResourceRecordFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. DNS Resource Record that needs to be added to DNS configuration.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecordOrBuilder + getDnsResourceRecordOrBuilder() { + if (dnsResourceRecordBuilder_ != null) { + return dnsResourceRecordBuilder_.getMessageOrBuilder(); + } else { + return dnsResourceRecord_ == null + ? com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord + .getDefaultInstance() + : dnsResourceRecord_; + } + } + /** + * + * + *
+     * Output only. DNS Resource Record that needs to be added to DNS configuration.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord, + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecordOrBuilder> + getDnsResourceRecordFieldBuilder() { + if (dnsResourceRecordBuilder_ == null) { + dnsResourceRecordBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord, + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecordOrBuilder>( + getDnsResourceRecord(), getParentForChildren(), isClean()); + dnsResourceRecord_ = null; + } + return dnsResourceRecordBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.DnsAuthorization) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.DnsAuthorization) + private static final com.google.cloud.certificatemanager.v1.DnsAuthorization DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.DnsAuthorization(); + } + + public static com.google.cloud.certificatemanager.v1.DnsAuthorization getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DnsAuthorization parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DnsAuthorization(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorizationName.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorizationName.java new file mode 100644 index 0000000..75e914d --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorizationName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.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 DnsAuthorizationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DNS_AUTHORIZATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dnsAuthorizations/{dns_authorization}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String dnsAuthorization; + + @Deprecated + protected DnsAuthorizationName() { + project = null; + location = null; + dnsAuthorization = null; + } + + private DnsAuthorizationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dnsAuthorization = Preconditions.checkNotNull(builder.getDnsAuthorization()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDnsAuthorization() { + return dnsAuthorization; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DnsAuthorizationName of(String project, String location, String dnsAuthorization) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDnsAuthorization(dnsAuthorization) + .build(); + } + + public static String format(String project, String location, String dnsAuthorization) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDnsAuthorization(dnsAuthorization) + .build() + .toString(); + } + + public static DnsAuthorizationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DNS_AUTHORIZATION.validatedMatch( + formattedString, "DnsAuthorizationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("dns_authorization")); + } + + 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 (DnsAuthorizationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DNS_AUTHORIZATION.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 (dnsAuthorization != null) { + fieldMapBuilder.put("dns_authorization", dnsAuthorization); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DNS_AUTHORIZATION.instantiate( + "project", project, "location", location, "dns_authorization", dnsAuthorization); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DnsAuthorizationName that = ((DnsAuthorizationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dnsAuthorization, that.dnsAuthorization); + } + 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(dnsAuthorization); + return h; + } + + /** Builder for projects/{project}/locations/{location}/dnsAuthorizations/{dns_authorization}. */ + public static class Builder { + private String project; + private String location; + private String dnsAuthorization; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDnsAuthorization() { + return dnsAuthorization; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDnsAuthorization(String dnsAuthorization) { + this.dnsAuthorization = dnsAuthorization; + return this; + } + + private Builder(DnsAuthorizationName dnsAuthorizationName) { + this.project = dnsAuthorizationName.project; + this.location = dnsAuthorizationName.location; + this.dnsAuthorization = dnsAuthorizationName.dnsAuthorization; + } + + public DnsAuthorizationName build() { + return new DnsAuthorizationName(this); + } + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorizationOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorizationOrBuilder.java new file mode 100644 index 0000000..530b387 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DnsAuthorizationOrBuilder.java @@ -0,0 +1,284 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface DnsAuthorizationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.DnsAuthorization) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A user-defined name of the dns authorization. DnsAuthorization names must
+   * be unique globally and match pattern
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * A user-defined name of the dns authorization. DnsAuthorization names must
+   * be unique globally and match pattern
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The creation timestamp of a DnsAuthorization.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The creation timestamp of a DnsAuthorization.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The creation timestamp of a DnsAuthorization.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The last update timestamp of a DnsAuthorization.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The last update timestamp of a DnsAuthorization.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The last update timestamp of a DnsAuthorization.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Set of labels associated with a DnsAuthorization.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Set of labels associated with a DnsAuthorization.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Set of labels associated with a DnsAuthorization.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Set of labels associated with a DnsAuthorization.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Set of labels associated with a DnsAuthorization.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * One or more paragraphs of text description of a DnsAuthorization.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * One or more paragraphs of text description of a DnsAuthorization.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Immutable. A domain which is being authorized. A DnsAuthorization resource covers a
+   * single domain and its wildcard, e.g. authorization for `example.com` can
+   * be used to issue certificates for `example.com` and `*.example.com`.
+   * 
+ * + * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The domain. + */ + java.lang.String getDomain(); + /** + * + * + *
+   * Required. Immutable. A domain which is being authorized. A DnsAuthorization resource covers a
+   * single domain and its wildcard, e.g. authorization for `example.com` can
+   * be used to issue certificates for `example.com` and `*.example.com`.
+   * 
+ * + * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for domain. + */ + com.google.protobuf.ByteString getDomainBytes(); + + /** + * + * + *
+   * Output only. DNS Resource Record that needs to be added to DNS configuration.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dnsResourceRecord field is set. + */ + boolean hasDnsResourceRecord(); + /** + * + * + *
+   * Output only. DNS Resource Record that needs to be added to DNS configuration.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dnsResourceRecord. + */ + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord getDnsResourceRecord(); + /** + * + * + *
+   * Output only. DNS Resource Record that needs to be added to DNS configuration.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord dns_resource_record = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecordOrBuilder + getDnsResourceRecordOrBuilder(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapEntryRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapEntryRequest.java new file mode 100644 index 0000000..f01dde0 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapEntryRequest.java @@ -0,0 +1,669 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `GetCertificateMapEntry` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest} + */ +public final class GetCertificateMapEntryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest) + GetCertificateMapEntryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCertificateMapEntryRequest.newBuilder() to construct. + private GetCertificateMapEntryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCertificateMapEntryRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCertificateMapEntryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetCertificateMapEntryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateMapEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest.class, + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. A name of the certificate map entry to describe. Must be in the
+   * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * + * 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. A name of the certificate map entry to describe. Must be in the
+   * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * + * 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.certificatemanager.v1.GetCertificateMapEntryRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest other = + (com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest) 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.certificatemanager.v1.GetCertificateMapEntryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `GetCertificateMapEntry` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest) + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateMapEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest.class, + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest build() { + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest buildPartial() { + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest result = + new com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest(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.certificatemanager.v1.GetCertificateMapEntryRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest + .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.certificatemanager.v1.GetCertificateMapEntryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A name of the certificate map entry to describe. Must be in the
+     * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * + * 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. A name of the certificate map entry to describe. Must be in the
+     * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * + * 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. A name of the certificate map entry to describe. Must be in the
+     * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * + * 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. A name of the certificate map entry to describe. Must be in the
+     * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * + * 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. A name of the certificate map entry to describe. Must be in the
+     * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+     * 
+ * + * + * 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.certificatemanager.v1.GetCertificateMapEntryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest) + private static final com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest(); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCertificateMapEntryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCertificateMapEntryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapEntryRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapEntryRequestOrBuilder.java new file mode 100644 index 0000000..c92150b --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapEntryRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface GetCertificateMapEntryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the certificate map entry to describe. Must be in the
+   * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A name of the certificate map entry to describe. Must be in the
+   * format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
+   * 
+ * + * + * 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapRequest.java new file mode 100644 index 0000000..37878db --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapRequest.java @@ -0,0 +1,665 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `GetCertificateMap` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.GetCertificateMapRequest} + */ +public final class GetCertificateMapRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.GetCertificateMapRequest) + GetCertificateMapRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCertificateMapRequest.newBuilder() to construct. + private GetCertificateMapRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCertificateMapRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCertificateMapRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetCertificateMapRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateMapRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateMapRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest.class, + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. A name of the certificate map to describe. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * 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. A name of the certificate map to describe. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * 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.certificatemanager.v1.GetCertificateMapRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest other = + (com.google.cloud.certificatemanager.v1.GetCertificateMapRequest) 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.certificatemanager.v1.GetCertificateMapRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `GetCertificateMap` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.GetCertificateMapRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.GetCertificateMapRequest) + com.google.cloud.certificatemanager.v1.GetCertificateMapRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateMapRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateMapRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest.class, + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.GetCertificateMapRequest.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateMapRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateMapRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.GetCertificateMapRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateMapRequest build() { + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateMapRequest buildPartial() { + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest result = + new com.google.cloud.certificatemanager.v1.GetCertificateMapRequest(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.certificatemanager.v1.GetCertificateMapRequest) { + return mergeFrom((com.google.cloud.certificatemanager.v1.GetCertificateMapRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.GetCertificateMapRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.GetCertificateMapRequest.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.certificatemanager.v1.GetCertificateMapRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.GetCertificateMapRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A name of the certificate map to describe. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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. A name of the certificate map to describe. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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. A name of the certificate map to describe. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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. A name of the certificate map to describe. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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. A name of the certificate map to describe. Must be in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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.certificatemanager.v1.GetCertificateMapRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.GetCertificateMapRequest) + private static final com.google.cloud.certificatemanager.v1.GetCertificateMapRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.GetCertificateMapRequest(); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateMapRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCertificateMapRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCertificateMapRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateMapRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapRequestOrBuilder.java new file mode 100644 index 0000000..7031a2c --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateMapRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface GetCertificateMapRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.GetCertificateMapRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the certificate map to describe. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A name of the certificate map to describe. Must be in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateRequest.java new file mode 100644 index 0000000..9464fad --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateRequest.java @@ -0,0 +1,661 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `GetCertificate` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.GetCertificateRequest} + */ +public final class GetCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.GetCertificateRequest) + GetCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCertificateRequest.newBuilder() to construct. + private GetCertificateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCertificateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetCertificateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.GetCertificateRequest.class, + com.google.cloud.certificatemanager.v1.GetCertificateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. A name of the certificate to describe. Must be in the format
+   * `projects/*/locations/*/certificates/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A name of the certificate to describe. Must be in the format
+   * `projects/*/locations/*/certificates/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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.certificatemanager.v1.GetCertificateRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.GetCertificateRequest other = + (com.google.cloud.certificatemanager.v1.GetCertificateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.GetCertificateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `GetCertificate` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.GetCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.GetCertificateRequest) + com.google.cloud.certificatemanager.v1.GetCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.GetCertificateRequest.class, + com.google.cloud.certificatemanager.v1.GetCertificateRequest.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.GetCertificateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.GetCertificateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateRequest build() { + com.google.cloud.certificatemanager.v1.GetCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateRequest buildPartial() { + com.google.cloud.certificatemanager.v1.GetCertificateRequest result = + new com.google.cloud.certificatemanager.v1.GetCertificateRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.certificatemanager.v1.GetCertificateRequest) { + return mergeFrom((com.google.cloud.certificatemanager.v1.GetCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.certificatemanager.v1.GetCertificateRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.GetCertificateRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.certificatemanager.v1.GetCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.GetCertificateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A name of the certificate to describe. Must be in the format
+     * `projects/*/locations/*/certificates/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A name of the certificate to describe. Must be in the format
+     * `projects/*/locations/*/certificates/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A name of the certificate to describe. Must be in the format
+     * `projects/*/locations/*/certificates/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A name of the certificate to describe. Must be in the format
+     * `projects/*/locations/*/certificates/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A name of the certificate to describe. Must be in the format
+     * `projects/*/locations/*/certificates/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.GetCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.GetCertificateRequest) + private static final com.google.cloud.certificatemanager.v1.GetCertificateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.GetCertificateRequest(); + } + + public static com.google.cloud.certificatemanager.v1.GetCertificateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCertificateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetCertificateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateRequestOrBuilder.java new file mode 100644 index 0000000..36f7ef8 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetCertificateRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface GetCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.GetCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the certificate to describe. Must be in the format
+   * `projects/*/locations/*/certificates/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A name of the certificate to describe. Must be in the format
+   * `projects/*/locations/*/certificates/*`.
+   * 
+ * + * + * 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetDnsAuthorizationRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetDnsAuthorizationRequest.java new file mode 100644 index 0000000..ecc9c44 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetDnsAuthorizationRequest.java @@ -0,0 +1,667 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `GetDnsAuthorization` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest} + */ +public final class GetDnsAuthorizationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest) + GetDnsAuthorizationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDnsAuthorizationRequest.newBuilder() to construct. + private GetDnsAuthorizationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDnsAuthorizationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDnsAuthorizationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDnsAuthorizationRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetDnsAuthorizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest.class, + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. A name of the dns authorization to describe. Must be in the format
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * + * 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. A name of the dns authorization to describe. Must be in the format
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * + * 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.certificatemanager.v1.GetDnsAuthorizationRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest other = + (com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest) 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.certificatemanager.v1.GetDnsAuthorizationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `GetDnsAuthorization` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest) + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetDnsAuthorizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest.class, + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_GetDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest build() { + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest buildPartial() { + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest result = + new com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest(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.certificatemanager.v1.GetDnsAuthorizationRequest) { + return mergeFrom((com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest.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.certificatemanager.v1.GetDnsAuthorizationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A name of the dns authorization to describe. Must be in the format
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * + * 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. A name of the dns authorization to describe. Must be in the format
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * + * 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. A name of the dns authorization to describe. Must be in the format
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * + * 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. A name of the dns authorization to describe. Must be in the format
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * + * 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. A name of the dns authorization to describe. Must be in the format
+     * `projects/*/locations/*/dnsAuthorizations/*`.
+     * 
+ * + * + * 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.certificatemanager.v1.GetDnsAuthorizationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest) + private static final com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest(); + } + + public static com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDnsAuthorizationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDnsAuthorizationRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetDnsAuthorizationRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetDnsAuthorizationRequestOrBuilder.java new file mode 100644 index 0000000..180ac93 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetDnsAuthorizationRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface GetDnsAuthorizationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the dns authorization to describe. Must be in the format
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A name of the dns authorization to describe. Must be in the format
+   * `projects/*/locations/*/dnsAuthorizations/*`.
+   * 
+ * + * + * 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesRequest.java new file mode 100644 index 0000000..626c867 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesRequest.java @@ -0,0 +1,1355 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `ListCertificateMapEntries` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest} + */ +public final class ListCertificateMapEntriesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest) + ListCertificateMapEntriesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificateMapEntriesRequest.newBuilder() to construct. + private ListCertificateMapEntriesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificateMapEntriesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCertificateMapEntriesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificateMapEntriesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest.class, + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The project, location and certificate map from which the certificate map
+   * entries should be listed, specified in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project, location and certificate map from which the certificate map
+   * entries should be listed, specified in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * 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_; + /** + * + * + *
+   * Maximum number of certificate map entries to return. The service may return
+   * fewer than this value.
+   * If unspecified, at most 50 certificate map entries will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The value returned by the last `ListCertificateMapEntriesResponse`.
+   * Indicates that this is a continuation of a prior
+   * `ListCertificateMapEntries` call, and that the system should return the
+   * next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The value returned by the last `ListCertificateMapEntriesResponse`.
+   * Indicates that this is a continuation of a prior
+   * `ListCertificateMapEntries` call, and that the system should return the
+   * next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Filter expression to restrict the returned Certificate Map Entries.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filter expression to restrict the returned Certificate Map Entries.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * A list of Certificate Map Entry field names used to specify
+   * the order of the returned results. The default sorting order is ascending.
+   * To specify descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+   * A list of Certificate Map Entry field names used to specify
+   * the order of the returned results. The default sorting order is ascending.
+   * To specify descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @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.certificatemanager.v1.ListCertificateMapEntriesRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest other = + (com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest) 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.certificatemanager.v1.ListCertificateMapEntriesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `ListCertificateMapEntries` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest) + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest.class, + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest build() { + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest buildPartial() { + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest result = + new com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest(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.certificatemanager.v1.ListCertificateMapEntriesRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest + .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.certificatemanager.v1.ListCertificateMapEntriesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project, location and certificate map from which the certificate map
+     * entries should be listed, specified in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project, location and certificate map from which the certificate map
+     * entries should be listed, specified in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project, location and certificate map from which the certificate map
+     * entries should be listed, specified in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project, location and certificate map from which the certificate map
+     * entries should be listed, specified in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project, location and certificate map from which the certificate map
+     * entries should be listed, specified in the format
+     * `projects/*/locations/*/certificateMaps/*`.
+     * 
+ * + * + * 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_; + /** + * + * + *
+     * Maximum number of certificate map entries to return. The service may return
+     * fewer than this value.
+     * If unspecified, at most 50 certificate map entries will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum number of certificate map entries to return. The service may return
+     * fewer than this value.
+     * If unspecified, at most 50 certificate map entries will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of certificate map entries to return. The service may return
+     * fewer than this value.
+     * If unspecified, at most 50 certificate map entries will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The value returned by the last `ListCertificateMapEntriesResponse`.
+     * Indicates that this is a continuation of a prior
+     * `ListCertificateMapEntries` call, and that the system should return the
+     * next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The value returned by the last `ListCertificateMapEntriesResponse`.
+     * Indicates that this is a continuation of a prior
+     * `ListCertificateMapEntries` call, and that the system should return the
+     * next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The value returned by the last `ListCertificateMapEntriesResponse`.
+     * Indicates that this is a continuation of a prior
+     * `ListCertificateMapEntries` call, and that the system should return the
+     * next page of data.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The value returned by the last `ListCertificateMapEntriesResponse`.
+     * Indicates that this is a continuation of a prior
+     * `ListCertificateMapEntries` call, and that the system should return the
+     * next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The value returned by the last `ListCertificateMapEntriesResponse`.
+     * Indicates that this is a continuation of a prior
+     * `ListCertificateMapEntries` call, and that the system should return the
+     * next page of data.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filter expression to restrict the returned Certificate Map Entries.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filter expression to restrict the returned Certificate Map Entries.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filter expression to restrict the returned Certificate Map Entries.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Filter expression to restrict the returned Certificate Map Entries.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Filter expression to restrict the returned Certificate Map Entries.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A list of Certificate Map Entry field names used to specify
+     * the order of the returned results. The default sorting order is ascending.
+     * To specify descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * A list of Certificate Map Entry field names used to specify
+     * the order of the returned results. The default sorting order is ascending.
+     * To specify descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * A list of Certificate Map Entry field names used to specify
+     * the order of the returned results. The default sorting order is ascending.
+     * To specify descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + /** + * + * + *
+     * A list of Certificate Map Entry field names used to specify
+     * the order of the returned results. The default sorting order is ascending.
+     * To specify descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Certificate Map Entry field names used to specify
+     * the order of the returned results. The default sorting order is ascending.
+     * To specify descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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.certificatemanager.v1.ListCertificateMapEntriesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest) + private static final com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest(); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificateMapEntriesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificateMapEntriesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesRequestOrBuilder.java new file mode 100644 index 0000000..78933c7 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesRequestOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface ListCertificateMapEntriesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project, location and certificate map from which the certificate map
+   * entries should be listed, specified in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project, location and certificate map from which the certificate map
+   * entries should be listed, specified in the format
+   * `projects/*/locations/*/certificateMaps/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum number of certificate map entries to return. The service may return
+   * fewer than this value.
+   * If unspecified, at most 50 certificate map entries will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The value returned by the last `ListCertificateMapEntriesResponse`.
+   * Indicates that this is a continuation of a prior
+   * `ListCertificateMapEntries` call, and that the system should return the
+   * next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The value returned by the last `ListCertificateMapEntriesResponse`.
+   * Indicates that this is a continuation of a prior
+   * `ListCertificateMapEntries` call, and that the system should return the
+   * next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filter expression to restrict the returned Certificate Map Entries.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filter expression to restrict the returned Certificate Map Entries.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * A list of Certificate Map Entry field names used to specify
+   * the order of the returned results. The default sorting order is ascending.
+   * To specify descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A list of Certificate Map Entry field names used to specify
+   * the order of the returned results. The default sorting order is ascending.
+   * To specify descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesResponse.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesResponse.java new file mode 100644 index 0000000..9aa0493 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesResponse.java @@ -0,0 +1,1514 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Response for the `ListCertificateMapEntries` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse} + */ +public final class ListCertificateMapEntriesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse) + ListCertificateMapEntriesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificateMapEntriesResponse.newBuilder() to construct. + private ListCertificateMapEntriesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificateMapEntriesResponse() { + certificateMapEntries_ = 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 ListCertificateMapEntriesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificateMapEntriesResponse( + 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)) { + certificateMapEntries_ = + new java.util.ArrayList< + com.google.cloud.certificatemanager.v1.CertificateMapEntry>(); + mutable_bitField0_ |= 0x00000001; + } + certificateMapEntries_.add( + input.readMessage( + com.google.cloud.certificatemanager.v1.CertificateMapEntry.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + certificateMapEntries_ = java.util.Collections.unmodifiableList(certificateMapEntries_); + } + 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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse.class, + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse.Builder.class); + } + + public static final int CERTIFICATE_MAP_ENTRIES_FIELD_NUMBER = 1; + private java.util.List + certificateMapEntries_; + /** + * + * + *
+   * A list of certificate map entries for the parent resource.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + @java.lang.Override + public java.util.List + getCertificateMapEntriesList() { + return certificateMapEntries_; + } + /** + * + * + *
+   * A list of certificate map entries for the parent resource.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder> + getCertificateMapEntriesOrBuilderList() { + return certificateMapEntries_; + } + /** + * + * + *
+   * A list of certificate map entries for the parent resource.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + @java.lang.Override + public int getCertificateMapEntriesCount() { + return certificateMapEntries_.size(); + } + /** + * + * + *
+   * A list of certificate map entries for the parent resource.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapEntry getCertificateMapEntries( + int index) { + return certificateMapEntries_.get(index); + } + /** + * + * + *
+   * A list of certificate map entries for the parent resource.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder + getCertificateMapEntriesOrBuilder(int index) { + return certificateMapEntries_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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 < certificateMapEntries_.size(); i++) { + output.writeMessage(1, certificateMapEntries_.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 < certificateMapEntries_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, certificateMapEntries_.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.certificatemanager.v1.ListCertificateMapEntriesResponse)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse other = + (com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse) obj; + + if (!getCertificateMapEntriesList().equals(other.getCertificateMapEntriesList())) 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 (getCertificateMapEntriesCount() > 0) { + hash = (37 * hash) + CERTIFICATE_MAP_ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getCertificateMapEntriesList().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.certificatemanager.v1.ListCertificateMapEntriesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for the `ListCertificateMapEntries` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse) + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse.class, + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCertificateMapEntriesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (certificateMapEntriesBuilder_ == null) { + certificateMapEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + certificateMapEntriesBuilder_.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapEntriesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse build() { + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse buildPartial() { + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse result = + new com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse(this); + int from_bitField0_ = bitField0_; + if (certificateMapEntriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + certificateMapEntries_ = java.util.Collections.unmodifiableList(certificateMapEntries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.certificateMapEntries_ = certificateMapEntries_; + } else { + result.certificateMapEntries_ = certificateMapEntriesBuilder_.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.certificatemanager.v1.ListCertificateMapEntriesResponse) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse other) { + if (other + == com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse + .getDefaultInstance()) return this; + if (certificateMapEntriesBuilder_ == null) { + if (!other.certificateMapEntries_.isEmpty()) { + if (certificateMapEntries_.isEmpty()) { + certificateMapEntries_ = other.certificateMapEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCertificateMapEntriesIsMutable(); + certificateMapEntries_.addAll(other.certificateMapEntries_); + } + onChanged(); + } + } else { + if (!other.certificateMapEntries_.isEmpty()) { + if (certificateMapEntriesBuilder_.isEmpty()) { + certificateMapEntriesBuilder_.dispose(); + certificateMapEntriesBuilder_ = null; + certificateMapEntries_ = other.certificateMapEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + certificateMapEntriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCertificateMapEntriesFieldBuilder() + : null; + } else { + certificateMapEntriesBuilder_.addAllMessages(other.certificateMapEntries_); + } + } + } + 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.certificatemanager.v1.ListCertificateMapEntriesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + certificateMapEntries_ = java.util.Collections.emptyList(); + + private void ensureCertificateMapEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + certificateMapEntries_ = + new java.util.ArrayList( + certificateMapEntries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMapEntry, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder> + certificateMapEntriesBuilder_; + + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public java.util.List + getCertificateMapEntriesList() { + if (certificateMapEntriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(certificateMapEntries_); + } else { + return certificateMapEntriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public int getCertificateMapEntriesCount() { + if (certificateMapEntriesBuilder_ == null) { + return certificateMapEntries_.size(); + } else { + return certificateMapEntriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntry getCertificateMapEntries( + int index) { + if (certificateMapEntriesBuilder_ == null) { + return certificateMapEntries_.get(index); + } else { + return certificateMapEntriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public Builder setCertificateMapEntries( + int index, com.google.cloud.certificatemanager.v1.CertificateMapEntry value) { + if (certificateMapEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateMapEntriesIsMutable(); + certificateMapEntries_.set(index, value); + onChanged(); + } else { + certificateMapEntriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public Builder setCertificateMapEntries( + int index, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder builderForValue) { + if (certificateMapEntriesBuilder_ == null) { + ensureCertificateMapEntriesIsMutable(); + certificateMapEntries_.set(index, builderForValue.build()); + onChanged(); + } else { + certificateMapEntriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public Builder addCertificateMapEntries( + com.google.cloud.certificatemanager.v1.CertificateMapEntry value) { + if (certificateMapEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateMapEntriesIsMutable(); + certificateMapEntries_.add(value); + onChanged(); + } else { + certificateMapEntriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public Builder addCertificateMapEntries( + int index, com.google.cloud.certificatemanager.v1.CertificateMapEntry value) { + if (certificateMapEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateMapEntriesIsMutable(); + certificateMapEntries_.add(index, value); + onChanged(); + } else { + certificateMapEntriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public Builder addCertificateMapEntries( + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder builderForValue) { + if (certificateMapEntriesBuilder_ == null) { + ensureCertificateMapEntriesIsMutable(); + certificateMapEntries_.add(builderForValue.build()); + onChanged(); + } else { + certificateMapEntriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public Builder addCertificateMapEntries( + int index, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder builderForValue) { + if (certificateMapEntriesBuilder_ == null) { + ensureCertificateMapEntriesIsMutable(); + certificateMapEntries_.add(index, builderForValue.build()); + onChanged(); + } else { + certificateMapEntriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public Builder addAllCertificateMapEntries( + java.lang.Iterable + values) { + if (certificateMapEntriesBuilder_ == null) { + ensureCertificateMapEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, certificateMapEntries_); + onChanged(); + } else { + certificateMapEntriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public Builder clearCertificateMapEntries() { + if (certificateMapEntriesBuilder_ == null) { + certificateMapEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + certificateMapEntriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public Builder removeCertificateMapEntries(int index) { + if (certificateMapEntriesBuilder_ == null) { + ensureCertificateMapEntriesIsMutable(); + certificateMapEntries_.remove(index); + onChanged(); + } else { + certificateMapEntriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder + getCertificateMapEntriesBuilder(int index) { + return getCertificateMapEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder + getCertificateMapEntriesOrBuilder(int index) { + if (certificateMapEntriesBuilder_ == null) { + return certificateMapEntries_.get(index); + } else { + return certificateMapEntriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder> + getCertificateMapEntriesOrBuilderList() { + if (certificateMapEntriesBuilder_ != null) { + return certificateMapEntriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(certificateMapEntries_); + } + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder + addCertificateMapEntriesBuilder() { + return getCertificateMapEntriesFieldBuilder() + .addBuilder( + com.google.cloud.certificatemanager.v1.CertificateMapEntry.getDefaultInstance()); + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder + addCertificateMapEntriesBuilder(int index) { + return getCertificateMapEntriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.getDefaultInstance()); + } + /** + * + * + *
+     * A list of certificate map entries for the parent resource.
+     * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + public java.util.List + getCertificateMapEntriesBuilderList() { + return getCertificateMapEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMapEntry, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder> + getCertificateMapEntriesFieldBuilder() { + if (certificateMapEntriesBuilder_ == null) { + certificateMapEntriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMapEntry, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder>( + certificateMapEntries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + certificateMapEntries_ = null; + } + return certificateMapEntriesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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.certificatemanager.v1.ListCertificateMapEntriesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse) + private static final com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse(); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificateMapEntriesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificateMapEntriesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesResponseOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesResponseOrBuilder.java new file mode 100644 index 0000000..262d3b5 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapEntriesResponseOrBuilder.java @@ -0,0 +1,169 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface ListCertificateMapEntriesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of certificate map entries for the parent resource.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + java.util.List + getCertificateMapEntriesList(); + /** + * + * + *
+   * A list of certificate map entries for the parent resource.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + com.google.cloud.certificatemanager.v1.CertificateMapEntry getCertificateMapEntries(int index); + /** + * + * + *
+   * A list of certificate map entries for the parent resource.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + int getCertificateMapEntriesCount(); + /** + * + * + *
+   * A list of certificate map entries for the parent resource.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + java.util.List + getCertificateMapEntriesOrBuilderList(); + /** + * + * + *
+   * A list of certificate map entries for the parent resource.
+   * 
+ * + * + * repeated .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entries = 1; + * + */ + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder + getCertificateMapEntriesOrBuilder(int index); + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsRequest.java new file mode 100644 index 0000000..e31f380 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsRequest.java @@ -0,0 +1,1322 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `ListCertificateMaps` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificateMapsRequest} + */ +public final class ListCertificateMapsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.ListCertificateMapsRequest) + ListCertificateMapsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificateMapsRequest.newBuilder() to construct. + private ListCertificateMapsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificateMapsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCertificateMapsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificateMapsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest.class, + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The project and location from which the certificate maps should be listed,
+   * specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location from which the certificate maps should be listed,
+   * specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Maximum number of certificate maps to return per call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The value returned by the last `ListCertificateMapsResponse`. Indicates
+   * that this is a continuation of a prior `ListCertificateMaps` call, and that
+   * the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The value returned by the last `ListCertificateMapsResponse`. Indicates
+   * that this is a continuation of a prior `ListCertificateMaps` call, and that
+   * the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Filter expression to restrict the Certificates Maps returned.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filter expression to restrict the Certificates Maps returned.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * A list of Certificate Map field names used to specify the order of the
+   * returned results. The default sorting order is ascending. To specify
+   * descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+   * A list of Certificate Map field names used to specify the order of the
+   * returned results. The default sorting order is ascending. To specify
+   * descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @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.certificatemanager.v1.ListCertificateMapsRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest other = + (com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest) 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.certificatemanager.v1.ListCertificateMapsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `ListCertificateMaps` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificateMapsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.ListCertificateMapsRequest) + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest.class, + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest build() { + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest buildPartial() { + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest result = + new com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest(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.certificatemanager.v1.ListCertificateMapsRequest) { + return mergeFrom((com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest.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.certificatemanager.v1.ListCertificateMapsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location from which the certificate maps should be listed,
+     * specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location from which the certificate maps should be listed,
+     * specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location from which the certificate maps should be listed,
+     * specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location from which the certificate maps should be listed,
+     * specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location from which the certificate maps should be listed,
+     * specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum number of certificate maps to return per call.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum number of certificate maps to return per call.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of certificate maps to return per call.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The value returned by the last `ListCertificateMapsResponse`. Indicates
+     * that this is a continuation of a prior `ListCertificateMaps` call, and that
+     * the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The value returned by the last `ListCertificateMapsResponse`. Indicates
+     * that this is a continuation of a prior `ListCertificateMaps` call, and that
+     * the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The value returned by the last `ListCertificateMapsResponse`. Indicates
+     * that this is a continuation of a prior `ListCertificateMaps` call, and that
+     * the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The value returned by the last `ListCertificateMapsResponse`. Indicates
+     * that this is a continuation of a prior `ListCertificateMaps` call, and that
+     * the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The value returned by the last `ListCertificateMapsResponse`. Indicates
+     * that this is a continuation of a prior `ListCertificateMaps` call, and that
+     * the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filter expression to restrict the Certificates Maps returned.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filter expression to restrict the Certificates Maps returned.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filter expression to restrict the Certificates Maps returned.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Filter expression to restrict the Certificates Maps returned.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Filter expression to restrict the Certificates Maps returned.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A list of Certificate Map field names used to specify the order of the
+     * returned results. The default sorting order is ascending. To specify
+     * descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * A list of Certificate Map field names used to specify the order of the
+     * returned results. The default sorting order is ascending. To specify
+     * descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * A list of Certificate Map field names used to specify the order of the
+     * returned results. The default sorting order is ascending. To specify
+     * descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + /** + * + * + *
+     * A list of Certificate Map field names used to specify the order of the
+     * returned results. The default sorting order is ascending. To specify
+     * descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Certificate Map field names used to specify the order of the
+     * returned results. The default sorting order is ascending. To specify
+     * descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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.certificatemanager.v1.ListCertificateMapsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.ListCertificateMapsRequest) + private static final com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest(); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificateMapsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificateMapsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsRequestOrBuilder.java new file mode 100644 index 0000000..42e3148 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface ListCertificateMapsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.ListCertificateMapsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location from which the certificate maps should be listed,
+   * specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location from which the certificate maps should be listed,
+   * specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum number of certificate maps to return per call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The value returned by the last `ListCertificateMapsResponse`. Indicates
+   * that this is a continuation of a prior `ListCertificateMaps` call, and that
+   * the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The value returned by the last `ListCertificateMapsResponse`. Indicates
+   * that this is a continuation of a prior `ListCertificateMaps` call, and that
+   * the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filter expression to restrict the Certificates Maps returned.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filter expression to restrict the Certificates Maps returned.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * A list of Certificate Map field names used to specify the order of the
+   * returned results. The default sorting order is ascending. To specify
+   * descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A list of Certificate Map field names used to specify the order of the
+   * returned results. The default sorting order is ascending. To specify
+   * descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsResponse.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsResponse.java new file mode 100644 index 0000000..3dc73b8 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsResponse.java @@ -0,0 +1,1468 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Response for the `ListCertificateMaps` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificateMapsResponse} + */ +public final class ListCertificateMapsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.ListCertificateMapsResponse) + ListCertificateMapsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificateMapsResponse.newBuilder() to construct. + private ListCertificateMapsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificateMapsResponse() { + certificateMaps_ = 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 ListCertificateMapsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificateMapsResponse( + 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)) { + certificateMaps_ = + new java.util.ArrayList< + com.google.cloud.certificatemanager.v1.CertificateMap>(); + mutable_bitField0_ |= 0x00000001; + } + certificateMaps_.add( + input.readMessage( + com.google.cloud.certificatemanager.v1.CertificateMap.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + certificateMaps_ = java.util.Collections.unmodifiableList(certificateMaps_); + } + 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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse.class, + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse.Builder.class); + } + + public static final int CERTIFICATE_MAPS_FIELD_NUMBER = 1; + private java.util.List certificateMaps_; + /** + * + * + *
+   * A list of certificate maps for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + */ + @java.lang.Override + public java.util.List + getCertificateMapsList() { + return certificateMaps_; + } + /** + * + * + *
+   * A list of certificate maps for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + */ + @java.lang.Override + public java.util.List + getCertificateMapsOrBuilderList() { + return certificateMaps_; + } + /** + * + * + *
+   * A list of certificate maps for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + */ + @java.lang.Override + public int getCertificateMapsCount() { + return certificateMaps_.size(); + } + /** + * + * + *
+   * A list of certificate maps for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap getCertificateMaps(int index) { + return certificateMaps_.get(index); + } + /** + * + * + *
+   * A list of certificate maps for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder getCertificateMapsOrBuilder( + int index) { + return certificateMaps_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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 < certificateMaps_.size(); i++) { + output.writeMessage(1, certificateMaps_.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 < certificateMaps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, certificateMaps_.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.certificatemanager.v1.ListCertificateMapsResponse)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse other = + (com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse) obj; + + if (!getCertificateMapsList().equals(other.getCertificateMapsList())) 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 (getCertificateMapsCount() > 0) { + hash = (37 * hash) + CERTIFICATE_MAPS_FIELD_NUMBER; + hash = (53 * hash) + getCertificateMapsList().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.certificatemanager.v1.ListCertificateMapsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for the `ListCertificateMaps` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificateMapsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.ListCertificateMapsResponse) + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse.class, + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCertificateMapsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (certificateMapsBuilder_ == null) { + certificateMaps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + certificateMapsBuilder_.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificateMapsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse build() { + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse buildPartial() { + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse result = + new com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse(this); + int from_bitField0_ = bitField0_; + if (certificateMapsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + certificateMaps_ = java.util.Collections.unmodifiableList(certificateMaps_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.certificateMaps_ = certificateMaps_; + } else { + result.certificateMaps_ = certificateMapsBuilder_.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.certificatemanager.v1.ListCertificateMapsResponse) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse other) { + if (other + == com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse + .getDefaultInstance()) return this; + if (certificateMapsBuilder_ == null) { + if (!other.certificateMaps_.isEmpty()) { + if (certificateMaps_.isEmpty()) { + certificateMaps_ = other.certificateMaps_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCertificateMapsIsMutable(); + certificateMaps_.addAll(other.certificateMaps_); + } + onChanged(); + } + } else { + if (!other.certificateMaps_.isEmpty()) { + if (certificateMapsBuilder_.isEmpty()) { + certificateMapsBuilder_.dispose(); + certificateMapsBuilder_ = null; + certificateMaps_ = other.certificateMaps_; + bitField0_ = (bitField0_ & ~0x00000001); + certificateMapsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCertificateMapsFieldBuilder() + : null; + } else { + certificateMapsBuilder_.addAllMessages(other.certificateMaps_); + } + } + } + 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.certificatemanager.v1.ListCertificateMapsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List certificateMaps_ = + java.util.Collections.emptyList(); + + private void ensureCertificateMapsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + certificateMaps_ = + new java.util.ArrayList( + certificateMaps_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap, + com.google.cloud.certificatemanager.v1.CertificateMap.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder> + certificateMapsBuilder_; + + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public java.util.List + getCertificateMapsList() { + if (certificateMapsBuilder_ == null) { + return java.util.Collections.unmodifiableList(certificateMaps_); + } else { + return certificateMapsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public int getCertificateMapsCount() { + if (certificateMapsBuilder_ == null) { + return certificateMaps_.size(); + } else { + return certificateMapsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap getCertificateMaps(int index) { + if (certificateMapsBuilder_ == null) { + return certificateMaps_.get(index); + } else { + return certificateMapsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public Builder setCertificateMaps( + int index, com.google.cloud.certificatemanager.v1.CertificateMap value) { + if (certificateMapsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateMapsIsMutable(); + certificateMaps_.set(index, value); + onChanged(); + } else { + certificateMapsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public Builder setCertificateMaps( + int index, com.google.cloud.certificatemanager.v1.CertificateMap.Builder builderForValue) { + if (certificateMapsBuilder_ == null) { + ensureCertificateMapsIsMutable(); + certificateMaps_.set(index, builderForValue.build()); + onChanged(); + } else { + certificateMapsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public Builder addCertificateMaps(com.google.cloud.certificatemanager.v1.CertificateMap value) { + if (certificateMapsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateMapsIsMutable(); + certificateMaps_.add(value); + onChanged(); + } else { + certificateMapsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public Builder addCertificateMaps( + int index, com.google.cloud.certificatemanager.v1.CertificateMap value) { + if (certificateMapsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificateMapsIsMutable(); + certificateMaps_.add(index, value); + onChanged(); + } else { + certificateMapsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public Builder addCertificateMaps( + com.google.cloud.certificatemanager.v1.CertificateMap.Builder builderForValue) { + if (certificateMapsBuilder_ == null) { + ensureCertificateMapsIsMutable(); + certificateMaps_.add(builderForValue.build()); + onChanged(); + } else { + certificateMapsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public Builder addCertificateMaps( + int index, com.google.cloud.certificatemanager.v1.CertificateMap.Builder builderForValue) { + if (certificateMapsBuilder_ == null) { + ensureCertificateMapsIsMutable(); + certificateMaps_.add(index, builderForValue.build()); + onChanged(); + } else { + certificateMapsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public Builder addAllCertificateMaps( + java.lang.Iterable + values) { + if (certificateMapsBuilder_ == null) { + ensureCertificateMapsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, certificateMaps_); + onChanged(); + } else { + certificateMapsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public Builder clearCertificateMaps() { + if (certificateMapsBuilder_ == null) { + certificateMaps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + certificateMapsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public Builder removeCertificateMaps(int index) { + if (certificateMapsBuilder_ == null) { + ensureCertificateMapsIsMutable(); + certificateMaps_.remove(index); + onChanged(); + } else { + certificateMapsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.Builder getCertificateMapsBuilder( + int index) { + return getCertificateMapsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder + getCertificateMapsOrBuilder(int index) { + if (certificateMapsBuilder_ == null) { + return certificateMaps_.get(index); + } else { + return certificateMapsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public java.util.List + getCertificateMapsOrBuilderList() { + if (certificateMapsBuilder_ != null) { + return certificateMapsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(certificateMaps_); + } + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.Builder + addCertificateMapsBuilder() { + return getCertificateMapsFieldBuilder() + .addBuilder(com.google.cloud.certificatemanager.v1.CertificateMap.getDefaultInstance()); + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.Builder addCertificateMapsBuilder( + int index) { + return getCertificateMapsFieldBuilder() + .addBuilder( + index, com.google.cloud.certificatemanager.v1.CertificateMap.getDefaultInstance()); + } + /** + * + * + *
+     * A list of certificate maps for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + * + */ + public java.util.List + getCertificateMapsBuilderList() { + return getCertificateMapsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap, + com.google.cloud.certificatemanager.v1.CertificateMap.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder> + getCertificateMapsFieldBuilder() { + if (certificateMapsBuilder_ == null) { + certificateMapsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap, + com.google.cloud.certificatemanager.v1.CertificateMap.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder>( + certificateMaps_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + certificateMaps_ = null; + } + return certificateMapsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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.certificatemanager.v1.ListCertificateMapsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.ListCertificateMapsResponse) + private static final com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse(); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificateMapsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificateMapsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsResponseOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsResponseOrBuilder.java new file mode 100644 index 0000000..8682547 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificateMapsResponseOrBuilder.java @@ -0,0 +1,158 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface ListCertificateMapsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.ListCertificateMapsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of certificate maps for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + */ + java.util.List getCertificateMapsList(); + /** + * + * + *
+   * A list of certificate maps for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + */ + com.google.cloud.certificatemanager.v1.CertificateMap getCertificateMaps(int index); + /** + * + * + *
+   * A list of certificate maps for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + */ + int getCertificateMapsCount(); + /** + * + * + *
+   * A list of certificate maps for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + */ + java.util.List + getCertificateMapsOrBuilderList(); + /** + * + * + *
+   * A list of certificate maps for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.CertificateMap certificate_maps = 1; + */ + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder getCertificateMapsOrBuilder( + int index); + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesRequest.java new file mode 100644 index 0000000..68bf514 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesRequest.java @@ -0,0 +1,1319 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `ListCertificates` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificatesRequest} + */ +public final class ListCertificatesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.ListCertificatesRequest) + ListCertificatesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificatesRequest.newBuilder() to construct. + private ListCertificatesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificatesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCertificatesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificatesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificatesRequest.class, + com.google.cloud.certificatemanager.v1.ListCertificatesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The project and location from which the certificate should be listed,
+   * specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location from which the certificate should be listed,
+   * specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Maximum number of certificates to return per call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The value returned by the last `ListCertificatesResponse`. Indicates that
+   * this is a continuation of a prior `ListCertificates` call, and that the
+   * system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The value returned by the last `ListCertificatesResponse`. Indicates that
+   * this is a continuation of a prior `ListCertificates` call, and that the
+   * system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Filter expression to restrict the Certificates returned.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filter expression to restrict the Certificates returned.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * A list of Certificate field names used to specify the order of the returned
+   * results. The default sorting order is ascending. To specify descending
+   * order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+   * A list of Certificate field names used to specify the order of the returned
+   * results. The default sorting order is ascending. To specify descending
+   * order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @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.certificatemanager.v1.ListCertificatesRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.ListCertificatesRequest other = + (com.google.cloud.certificatemanager.v1.ListCertificatesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.ListCertificatesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `ListCertificates` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificatesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.ListCertificatesRequest) + com.google.cloud.certificatemanager.v1.ListCertificatesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificatesRequest.class, + com.google.cloud.certificatemanager.v1.ListCertificatesRequest.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.ListCertificatesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificatesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificatesRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.ListCertificatesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificatesRequest build() { + com.google.cloud.certificatemanager.v1.ListCertificatesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificatesRequest buildPartial() { + com.google.cloud.certificatemanager.v1.ListCertificatesRequest result = + new com.google.cloud.certificatemanager.v1.ListCertificatesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.certificatemanager.v1.ListCertificatesRequest) { + return mergeFrom((com.google.cloud.certificatemanager.v1.ListCertificatesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.certificatemanager.v1.ListCertificatesRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.ListCertificatesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.certificatemanager.v1.ListCertificatesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.ListCertificatesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location from which the certificate should be listed,
+     * specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location from which the certificate should be listed,
+     * specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location from which the certificate should be listed,
+     * specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location from which the certificate should be listed,
+     * specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location from which the certificate should be listed,
+     * specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum number of certificates to return per call.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum number of certificates to return per call.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of certificates to return per call.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The value returned by the last `ListCertificatesResponse`. Indicates that
+     * this is a continuation of a prior `ListCertificates` call, and that the
+     * system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The value returned by the last `ListCertificatesResponse`. Indicates that
+     * this is a continuation of a prior `ListCertificates` call, and that the
+     * system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The value returned by the last `ListCertificatesResponse`. Indicates that
+     * this is a continuation of a prior `ListCertificates` call, and that the
+     * system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The value returned by the last `ListCertificatesResponse`. Indicates that
+     * this is a continuation of a prior `ListCertificates` call, and that the
+     * system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The value returned by the last `ListCertificatesResponse`. Indicates that
+     * this is a continuation of a prior `ListCertificates` call, and that the
+     * system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filter expression to restrict the Certificates returned.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filter expression to restrict the Certificates returned.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filter expression to restrict the Certificates returned.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Filter expression to restrict the Certificates returned.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Filter expression to restrict the Certificates returned.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A list of Certificate field names used to specify the order of the returned
+     * results. The default sorting order is ascending. To specify descending
+     * order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * A list of Certificate field names used to specify the order of the returned
+     * results. The default sorting order is ascending. To specify descending
+     * order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * A list of Certificate field names used to specify the order of the returned
+     * results. The default sorting order is ascending. To specify descending
+     * order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + /** + * + * + *
+     * A list of Certificate field names used to specify the order of the returned
+     * results. The default sorting order is ascending. To specify descending
+     * order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Certificate field names used to specify the order of the returned
+     * results. The default sorting order is ascending. To specify descending
+     * order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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.certificatemanager.v1.ListCertificatesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.ListCertificatesRequest) + private static final com.google.cloud.certificatemanager.v1.ListCertificatesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.ListCertificatesRequest(); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificatesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificatesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificatesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesRequestOrBuilder.java new file mode 100644 index 0000000..48ed00e --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface ListCertificatesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.ListCertificatesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location from which the certificate should be listed,
+   * specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location from which the certificate should be listed,
+   * specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum number of certificates to return per call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The value returned by the last `ListCertificatesResponse`. Indicates that
+   * this is a continuation of a prior `ListCertificates` call, and that the
+   * system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The value returned by the last `ListCertificatesResponse`. Indicates that
+   * this is a continuation of a prior `ListCertificates` call, and that the
+   * system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filter expression to restrict the Certificates returned.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filter expression to restrict the Certificates returned.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * A list of Certificate field names used to specify the order of the returned
+   * results. The default sorting order is ascending. To specify descending
+   * order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A list of Certificate field names used to specify the order of the returned
+   * results. The default sorting order is ascending. To specify descending
+   * order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesResponse.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesResponse.java new file mode 100644 index 0000000..82d07e5 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesResponse.java @@ -0,0 +1,1439 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Response for the `ListCertificates` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificatesResponse} + */ +public final class ListCertificatesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.ListCertificatesResponse) + ListCertificatesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCertificatesResponse.newBuilder() to construct. + private ListCertificatesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCertificatesResponse() { + certificates_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCertificatesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCertificatesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + certificates_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + certificates_.add( + input.readMessage( + com.google.cloud.certificatemanager.v1.Certificate.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + certificates_ = java.util.Collections.unmodifiableList(certificates_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificatesResponse.class, + com.google.cloud.certificatemanager.v1.ListCertificatesResponse.Builder.class); + } + + public static final int CERTIFICATES_FIELD_NUMBER = 1; + private java.util.List certificates_; + /** + * + * + *
+   * A list of certificates for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + @java.lang.Override + public java.util.List getCertificatesList() { + return certificates_; + } + /** + * + * + *
+   * A list of certificates for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + @java.lang.Override + public java.util.List + getCertificatesOrBuilderList() { + return certificates_; + } + /** + * + * + *
+   * A list of certificates for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + @java.lang.Override + public int getCertificatesCount() { + return certificates_.size(); + } + /** + * + * + *
+   * A list of certificates for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate getCertificates(int index) { + return certificates_.get(index); + } + /** + * + * + *
+   * A list of certificates for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateOrBuilder getCertificatesOrBuilder( + int index) { + return certificates_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * A list of locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * A list of locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * A list of 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); + } + /** + * + * + *
+   * A list of 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 < certificates_.size(); i++) { + output.writeMessage(1, certificates_.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 < certificates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, certificates_.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.certificatemanager.v1.ListCertificatesResponse)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.ListCertificatesResponse other = + (com.google.cloud.certificatemanager.v1.ListCertificatesResponse) obj; + + if (!getCertificatesList().equals(other.getCertificatesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCertificatesCount() > 0) { + hash = (37 * hash) + CERTIFICATES_FIELD_NUMBER; + hash = (53 * hash) + getCertificatesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.ListCertificatesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for the `ListCertificates` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListCertificatesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.ListCertificatesResponse) + com.google.cloud.certificatemanager.v1.ListCertificatesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListCertificatesResponse.class, + com.google.cloud.certificatemanager.v1.ListCertificatesResponse.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.ListCertificatesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCertificatesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (certificatesBuilder_ == null) { + certificates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + certificatesBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListCertificatesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificatesResponse + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.ListCertificatesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificatesResponse build() { + com.google.cloud.certificatemanager.v1.ListCertificatesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificatesResponse buildPartial() { + com.google.cloud.certificatemanager.v1.ListCertificatesResponse result = + new com.google.cloud.certificatemanager.v1.ListCertificatesResponse(this); + int from_bitField0_ = bitField0_; + if (certificatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + certificates_ = java.util.Collections.unmodifiableList(certificates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.certificates_ = certificates_; + } else { + result.certificates_ = certificatesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.certificatemanager.v1.ListCertificatesResponse) { + return mergeFrom((com.google.cloud.certificatemanager.v1.ListCertificatesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.ListCertificatesResponse other) { + if (other + == com.google.cloud.certificatemanager.v1.ListCertificatesResponse.getDefaultInstance()) + return this; + if (certificatesBuilder_ == null) { + if (!other.certificates_.isEmpty()) { + if (certificates_.isEmpty()) { + certificates_ = other.certificates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCertificatesIsMutable(); + certificates_.addAll(other.certificates_); + } + onChanged(); + } + } else { + if (!other.certificates_.isEmpty()) { + if (certificatesBuilder_.isEmpty()) { + certificatesBuilder_.dispose(); + certificatesBuilder_ = null; + certificates_ = other.certificates_; + bitField0_ = (bitField0_ & ~0x00000001); + certificatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCertificatesFieldBuilder() + : null; + } else { + certificatesBuilder_.addAllMessages(other.certificates_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.certificatemanager.v1.ListCertificatesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.ListCertificatesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List certificates_ = + java.util.Collections.emptyList(); + + private void ensureCertificatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + certificates_ = + new java.util.ArrayList( + certificates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate, + com.google.cloud.certificatemanager.v1.Certificate.Builder, + com.google.cloud.certificatemanager.v1.CertificateOrBuilder> + certificatesBuilder_; + + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public java.util.List + getCertificatesList() { + if (certificatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(certificates_); + } else { + return certificatesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public int getCertificatesCount() { + if (certificatesBuilder_ == null) { + return certificates_.size(); + } else { + return certificatesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public com.google.cloud.certificatemanager.v1.Certificate getCertificates(int index) { + if (certificatesBuilder_ == null) { + return certificates_.get(index); + } else { + return certificatesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public Builder setCertificates( + int index, com.google.cloud.certificatemanager.v1.Certificate value) { + if (certificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.set(index, value); + onChanged(); + } else { + certificatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public Builder setCertificates( + int index, com.google.cloud.certificatemanager.v1.Certificate.Builder builderForValue) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.set(index, builderForValue.build()); + onChanged(); + } else { + certificatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public Builder addCertificates(com.google.cloud.certificatemanager.v1.Certificate value) { + if (certificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.add(value); + onChanged(); + } else { + certificatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public Builder addCertificates( + int index, com.google.cloud.certificatemanager.v1.Certificate value) { + if (certificatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCertificatesIsMutable(); + certificates_.add(index, value); + onChanged(); + } else { + certificatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public Builder addCertificates( + com.google.cloud.certificatemanager.v1.Certificate.Builder builderForValue) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.add(builderForValue.build()); + onChanged(); + } else { + certificatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public Builder addCertificates( + int index, com.google.cloud.certificatemanager.v1.Certificate.Builder builderForValue) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.add(index, builderForValue.build()); + onChanged(); + } else { + certificatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public Builder addAllCertificates( + java.lang.Iterable values) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, certificates_); + onChanged(); + } else { + certificatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public Builder clearCertificates() { + if (certificatesBuilder_ == null) { + certificates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + certificatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public Builder removeCertificates(int index) { + if (certificatesBuilder_ == null) { + ensureCertificatesIsMutable(); + certificates_.remove(index); + onChanged(); + } else { + certificatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public com.google.cloud.certificatemanager.v1.Certificate.Builder getCertificatesBuilder( + int index) { + return getCertificatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public com.google.cloud.certificatemanager.v1.CertificateOrBuilder getCertificatesOrBuilder( + int index) { + if (certificatesBuilder_ == null) { + return certificates_.get(index); + } else { + return certificatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public java.util.List + getCertificatesOrBuilderList() { + if (certificatesBuilder_ != null) { + return certificatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(certificates_); + } + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public com.google.cloud.certificatemanager.v1.Certificate.Builder addCertificatesBuilder() { + return getCertificatesFieldBuilder() + .addBuilder(com.google.cloud.certificatemanager.v1.Certificate.getDefaultInstance()); + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public com.google.cloud.certificatemanager.v1.Certificate.Builder addCertificatesBuilder( + int index) { + return getCertificatesFieldBuilder() + .addBuilder( + index, com.google.cloud.certificatemanager.v1.Certificate.getDefaultInstance()); + } + /** + * + * + *
+     * A list of certificates for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + public java.util.List + getCertificatesBuilderList() { + return getCertificatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate, + com.google.cloud.certificatemanager.v1.Certificate.Builder, + com.google.cloud.certificatemanager.v1.CertificateOrBuilder> + getCertificatesFieldBuilder() { + if (certificatesBuilder_ == null) { + certificatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate, + com.google.cloud.certificatemanager.v1.Certificate.Builder, + com.google.cloud.certificatemanager.v1.CertificateOrBuilder>( + certificates_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + certificates_ = null; + } + return certificatesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * A list of 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); + } + /** + * + * + *
+     * A list of 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); + } + /** + * + * + *
+     * A list of 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; + } + /** + * + * + *
+     * A list of 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; + } + /** + * + * + *
+     * A list of 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; + } + /** + * + * + *
+     * A list of 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; + } + /** + * + * + *
+     * A list of 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.certificatemanager.v1.ListCertificatesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.ListCertificatesResponse) + private static final com.google.cloud.certificatemanager.v1.ListCertificatesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.ListCertificatesResponse(); + } + + public static com.google.cloud.certificatemanager.v1.ListCertificatesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCertificatesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCertificatesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListCertificatesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesResponseOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesResponseOrBuilder.java new file mode 100644 index 0000000..ef36a57 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListCertificatesResponseOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface ListCertificatesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.ListCertificatesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of certificates for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + java.util.List getCertificatesList(); + /** + * + * + *
+   * A list of certificates for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + com.google.cloud.certificatemanager.v1.Certificate getCertificates(int index); + /** + * + * + *
+   * A list of certificates for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + int getCertificatesCount(); + /** + * + * + *
+   * A list of certificates for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + java.util.List + getCertificatesOrBuilderList(); + /** + * + * + *
+   * A list of certificates for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.Certificate certificates = 1; + */ + com.google.cloud.certificatemanager.v1.CertificateOrBuilder getCertificatesOrBuilder(int index); + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * A list of locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * A list of locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * A list of 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); + /** + * + * + *
+   * A list of 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsRequest.java new file mode 100644 index 0000000..061f865 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsRequest.java @@ -0,0 +1,1324 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `ListDnsAuthorizations` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest} + */ +public final class ListDnsAuthorizationsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest) + ListDnsAuthorizationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDnsAuthorizationsRequest.newBuilder() to construct. + private ListDnsAuthorizationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDnsAuthorizationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDnsAuthorizationsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDnsAuthorizationsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest.class, + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The project and location from which the dns authorizations should be
+   * listed, specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location from which the dns authorizations should be
+   * listed, specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Maximum number of dns authorizations to return per call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates
+   * that this is a continuation of a prior `ListDnsAuthorizations` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates
+   * that this is a continuation of a prior `ListDnsAuthorizations` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Filter expression to restrict the Dns Authorizations returned.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filter expression to restrict the Dns Authorizations returned.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * A list of Dns Authorization field names used to specify the order of the
+   * returned results. The default sorting order is ascending. To specify
+   * descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+   * A list of Dns Authorization field names used to specify the order of the
+   * returned results. The default sorting order is ascending. To specify
+   * descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @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.certificatemanager.v1.ListDnsAuthorizationsRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest other = + (com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest) 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.certificatemanager.v1.ListDnsAuthorizationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `ListDnsAuthorizations` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest) + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest.class, + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest build() { + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest buildPartial() { + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest result = + new com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest(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.certificatemanager.v1.ListDnsAuthorizationsRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest + .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.certificatemanager.v1.ListDnsAuthorizationsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location from which the dns authorizations should be
+     * listed, specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location from which the dns authorizations should be
+     * listed, specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location from which the dns authorizations should be
+     * listed, specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location from which the dns authorizations should be
+     * listed, specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location from which the dns authorizations should be
+     * listed, specified in the format `projects/*/locations/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum number of dns authorizations to return per call.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum number of dns authorizations to return per call.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of dns authorizations to return per call.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates
+     * that this is a continuation of a prior `ListDnsAuthorizations` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates
+     * that this is a continuation of a prior `ListDnsAuthorizations` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates
+     * that this is a continuation of a prior `ListDnsAuthorizations` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates
+     * that this is a continuation of a prior `ListDnsAuthorizations` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates
+     * that this is a continuation of a prior `ListDnsAuthorizations` call, and
+     * that the system should return the next page of data.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filter expression to restrict the Dns Authorizations returned.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filter expression to restrict the Dns Authorizations returned.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filter expression to restrict the Dns Authorizations returned.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Filter expression to restrict the Dns Authorizations returned.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Filter expression to restrict the Dns Authorizations returned.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A list of Dns Authorization field names used to specify the order of the
+     * returned results. The default sorting order is ascending. To specify
+     * descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * A list of Dns Authorization field names used to specify the order of the
+     * returned results. The default sorting order is ascending. To specify
+     * descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * A list of Dns Authorization field names used to specify the order of the
+     * returned results. The default sorting order is ascending. To specify
+     * descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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; + } + /** + * + * + *
+     * A list of Dns Authorization field names used to specify the order of the
+     * returned results. The default sorting order is ascending. To specify
+     * descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Dns Authorization field names used to specify the order of the
+     * returned results. The default sorting order is ascending. To specify
+     * descending order for a field, add a suffix " desc".
+     * 
+ * + * string order_by = 5; + * + * @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.certificatemanager.v1.ListDnsAuthorizationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest) + private static final com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest(); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDnsAuthorizationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDnsAuthorizationsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsRequestOrBuilder.java new file mode 100644 index 0000000..6fec350 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface ListDnsAuthorizationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location from which the dns authorizations should be
+   * listed, specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location from which the dns authorizations should be
+   * listed, specified in the format `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum number of dns authorizations to return per call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates
+   * that this is a continuation of a prior `ListDnsAuthorizations` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The value returned by the last `ListDnsAuthorizationsResponse`. Indicates
+   * that this is a continuation of a prior `ListDnsAuthorizations` call, and
+   * that the system should return the next page of data.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filter expression to restrict the Dns Authorizations returned.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filter expression to restrict the Dns Authorizations returned.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * A list of Dns Authorization field names used to specify the order of the
+   * returned results. The default sorting order is ascending. To specify
+   * descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A list of Dns Authorization field names used to specify the order of the
+   * returned results. The default sorting order is ascending. To specify
+   * descending order for a field, add a suffix " desc".
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsResponse.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsResponse.java new file mode 100644 index 0000000..e4a1df9 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsResponse.java @@ -0,0 +1,1479 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Response for the `ListDnsAuthorizations` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse} + */ +public final class ListDnsAuthorizationsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse) + ListDnsAuthorizationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDnsAuthorizationsResponse.newBuilder() to construct. + private ListDnsAuthorizationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDnsAuthorizationsResponse() { + dnsAuthorizations_ = 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 ListDnsAuthorizationsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDnsAuthorizationsResponse( + 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)) { + dnsAuthorizations_ = + new java.util.ArrayList< + com.google.cloud.certificatemanager.v1.DnsAuthorization>(); + mutable_bitField0_ |= 0x00000001; + } + dnsAuthorizations_.add( + input.readMessage( + com.google.cloud.certificatemanager.v1.DnsAuthorization.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dnsAuthorizations_ = java.util.Collections.unmodifiableList(dnsAuthorizations_); + } + 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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse.class, + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse.Builder.class); + } + + public static final int DNS_AUTHORIZATIONS_FIELD_NUMBER = 1; + private java.util.List + dnsAuthorizations_; + /** + * + * + *
+   * A list of dns authorizations for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + @java.lang.Override + public java.util.List + getDnsAuthorizationsList() { + return dnsAuthorizations_; + } + /** + * + * + *
+   * A list of dns authorizations for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + @java.lang.Override + public java.util.List + getDnsAuthorizationsOrBuilderList() { + return dnsAuthorizations_; + } + /** + * + * + *
+   * A list of dns authorizations for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + @java.lang.Override + public int getDnsAuthorizationsCount() { + return dnsAuthorizations_.size(); + } + /** + * + * + *
+   * A list of dns authorizations for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization getDnsAuthorizations(int index) { + return dnsAuthorizations_.get(index); + } + /** + * + * + *
+   * A list of dns authorizations for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder + getDnsAuthorizationsOrBuilder(int index) { + return dnsAuthorizations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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 < dnsAuthorizations_.size(); i++) { + output.writeMessage(1, dnsAuthorizations_.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 < dnsAuthorizations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, dnsAuthorizations_.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.certificatemanager.v1.ListDnsAuthorizationsResponse)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse other = + (com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse) obj; + + if (!getDnsAuthorizationsList().equals(other.getDnsAuthorizationsList())) 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 (getDnsAuthorizationsCount() > 0) { + hash = (37 * hash) + DNS_AUTHORIZATIONS_FIELD_NUMBER; + hash = (53 * hash) + getDnsAuthorizationsList().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.certificatemanager.v1.ListDnsAuthorizationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for the `ListDnsAuthorizations` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse) + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse.class, + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDnsAuthorizationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dnsAuthorizationsBuilder_ == null) { + dnsAuthorizations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dnsAuthorizationsBuilder_.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.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_ListDnsAuthorizationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse build() { + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse buildPartial() { + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse result = + new com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse(this); + int from_bitField0_ = bitField0_; + if (dnsAuthorizationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dnsAuthorizations_ = java.util.Collections.unmodifiableList(dnsAuthorizations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dnsAuthorizations_ = dnsAuthorizations_; + } else { + result.dnsAuthorizations_ = dnsAuthorizationsBuilder_.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.certificatemanager.v1.ListDnsAuthorizationsResponse) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse other) { + if (other + == com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse + .getDefaultInstance()) return this; + if (dnsAuthorizationsBuilder_ == null) { + if (!other.dnsAuthorizations_.isEmpty()) { + if (dnsAuthorizations_.isEmpty()) { + dnsAuthorizations_ = other.dnsAuthorizations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.addAll(other.dnsAuthorizations_); + } + onChanged(); + } + } else { + if (!other.dnsAuthorizations_.isEmpty()) { + if (dnsAuthorizationsBuilder_.isEmpty()) { + dnsAuthorizationsBuilder_.dispose(); + dnsAuthorizationsBuilder_ = null; + dnsAuthorizations_ = other.dnsAuthorizations_; + bitField0_ = (bitField0_ & ~0x00000001); + dnsAuthorizationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDnsAuthorizationsFieldBuilder() + : null; + } else { + dnsAuthorizationsBuilder_.addAllMessages(other.dnsAuthorizations_); + } + } + } + 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.certificatemanager.v1.ListDnsAuthorizationsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + dnsAuthorizations_ = java.util.Collections.emptyList(); + + private void ensureDnsAuthorizationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dnsAuthorizations_ = + new java.util.ArrayList( + dnsAuthorizations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder> + dnsAuthorizationsBuilder_; + + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public java.util.List + getDnsAuthorizationsList() { + if (dnsAuthorizationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dnsAuthorizations_); + } else { + return dnsAuthorizationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public int getDnsAuthorizationsCount() { + if (dnsAuthorizationsBuilder_ == null) { + return dnsAuthorizations_.size(); + } else { + return dnsAuthorizationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization getDnsAuthorizations(int index) { + if (dnsAuthorizationsBuilder_ == null) { + return dnsAuthorizations_.get(index); + } else { + return dnsAuthorizationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public Builder setDnsAuthorizations( + int index, com.google.cloud.certificatemanager.v1.DnsAuthorization value) { + if (dnsAuthorizationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.set(index, value); + onChanged(); + } else { + dnsAuthorizationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public Builder setDnsAuthorizations( + int index, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder builderForValue) { + if (dnsAuthorizationsBuilder_ == null) { + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.set(index, builderForValue.build()); + onChanged(); + } else { + dnsAuthorizationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public Builder addDnsAuthorizations( + com.google.cloud.certificatemanager.v1.DnsAuthorization value) { + if (dnsAuthorizationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.add(value); + onChanged(); + } else { + dnsAuthorizationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public Builder addDnsAuthorizations( + int index, com.google.cloud.certificatemanager.v1.DnsAuthorization value) { + if (dnsAuthorizationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.add(index, value); + onChanged(); + } else { + dnsAuthorizationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public Builder addDnsAuthorizations( + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder builderForValue) { + if (dnsAuthorizationsBuilder_ == null) { + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.add(builderForValue.build()); + onChanged(); + } else { + dnsAuthorizationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public Builder addDnsAuthorizations( + int index, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder builderForValue) { + if (dnsAuthorizationsBuilder_ == null) { + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.add(index, builderForValue.build()); + onChanged(); + } else { + dnsAuthorizationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public Builder addAllDnsAuthorizations( + java.lang.Iterable + values) { + if (dnsAuthorizationsBuilder_ == null) { + ensureDnsAuthorizationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dnsAuthorizations_); + onChanged(); + } else { + dnsAuthorizationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public Builder clearDnsAuthorizations() { + if (dnsAuthorizationsBuilder_ == null) { + dnsAuthorizations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dnsAuthorizationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public Builder removeDnsAuthorizations(int index) { + if (dnsAuthorizationsBuilder_ == null) { + ensureDnsAuthorizationsIsMutable(); + dnsAuthorizations_.remove(index); + onChanged(); + } else { + dnsAuthorizationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder + getDnsAuthorizationsBuilder(int index) { + return getDnsAuthorizationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder + getDnsAuthorizationsOrBuilder(int index) { + if (dnsAuthorizationsBuilder_ == null) { + return dnsAuthorizations_.get(index); + } else { + return dnsAuthorizationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder> + getDnsAuthorizationsOrBuilderList() { + if (dnsAuthorizationsBuilder_ != null) { + return dnsAuthorizationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dnsAuthorizations_); + } + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder + addDnsAuthorizationsBuilder() { + return getDnsAuthorizationsFieldBuilder() + .addBuilder(com.google.cloud.certificatemanager.v1.DnsAuthorization.getDefaultInstance()); + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder + addDnsAuthorizationsBuilder(int index) { + return getDnsAuthorizationsFieldBuilder() + .addBuilder( + index, com.google.cloud.certificatemanager.v1.DnsAuthorization.getDefaultInstance()); + } + /** + * + * + *
+     * A list of dns authorizations for the parent resource.
+     * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + public java.util.List + getDnsAuthorizationsBuilderList() { + return getDnsAuthorizationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder> + getDnsAuthorizationsFieldBuilder() { + if (dnsAuthorizationsBuilder_ == null) { + dnsAuthorizationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder>( + dnsAuthorizations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dnsAuthorizations_ = null; + } + return dnsAuthorizationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * 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.certificatemanager.v1.ListDnsAuthorizationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse) + private static final com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse(); + } + + public static com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDnsAuthorizationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDnsAuthorizationsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsResponseOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsResponseOrBuilder.java new file mode 100644 index 0000000..8d9973a --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListDnsAuthorizationsResponseOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface ListDnsAuthorizationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of dns authorizations for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + java.util.List + getDnsAuthorizationsList(); + /** + * + * + *
+   * A list of dns authorizations for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + com.google.cloud.certificatemanager.v1.DnsAuthorization getDnsAuthorizations(int index); + /** + * + * + *
+   * A list of dns authorizations for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + int getDnsAuthorizationsCount(); + /** + * + * + *
+   * A list of dns authorizations for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + java.util.List + getDnsAuthorizationsOrBuilderList(); + /** + * + * + *
+   * A list of dns authorizations for the parent resource.
+   * 
+ * + * repeated .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorizations = 1; + * + */ + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder getDnsAuthorizationsOrBuilder( + int index); + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * 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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/LocationName.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/LocationName.java new file mode 100644 index 0000000..f826ead --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.certificatemanager.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-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/OperationMetadata.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/OperationMetadata.java new file mode 100644 index 0000000..9364255 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/OperationMetadata.java @@ -0,0 +1,1816 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation. Output only.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + verb_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + statusMessage_ = s; + break; + } + case 48: + { + requestedCancellation_ = input.readBool(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiVersion_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.OperationMetadata.class, + com.google.cloud.certificatemanager.v1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @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_; + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @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_; + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @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; + } + } + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @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_; + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @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; + } + } + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @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_; + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * + * @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; + } + } + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * + * @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_; + /** + * + * + *
+   * 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; + * + * @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_; + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @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; + } + } + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @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.certificatemanager.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.OperationMetadata other = + (com.google.cloud.certificatemanager.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the metadata of the long-running operation. Output only.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.OperationMetadata) + com.google.cloud.certificatemanager.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.OperationMetadata.class, + com.google.cloud.certificatemanager.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + target_ = ""; + + verb_ = ""; + + statusMessage_ = ""; + + requestedCancellation_ = false; + + apiVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.OperationMetadata build() { + com.google.cloud.certificatemanager.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.OperationMetadata buildPartial() { + com.google.cloud.certificatemanager.v1.OperationMetadata result = + new com.google.cloud.certificatemanager.v1.OperationMetadata(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.target_ = target_; + result.verb_ = verb_; + result.statusMessage_ = statusMessage_; + result.requestedCancellation_ = requestedCancellation_; + result.apiVersion_ = apiVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.certificatemanager.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.certificatemanager.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.certificatemanager.v1.OperationMetadata other) { + if (other == com.google.cloud.certificatemanager.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.certificatemanager.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + 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_; + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @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(); + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + 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; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + 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; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + 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_ = ""; + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @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; + } + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @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; + } + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @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; + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @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_ = ""; + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @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_ = ""; + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * + * @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; + } + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * + * @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; + } + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * + * @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; + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + + statusMessage_ = getDefaultInstance().getStatusMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * + * @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_; + /** + * + * + *
+     * 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; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * 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; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @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; + } + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @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; + } + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @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; + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = getDefaultInstance().getApiVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @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.certificatemanager.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.OperationMetadata) + private static final com.google.cloud.certificatemanager.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.OperationMetadata(); + } + + public static com.google.cloud.certificatemanager.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/OperationMetadataOrBuilder.java new file mode 100644 index 0000000..a4039e6 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,211 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * 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; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ServingState.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ServingState.java new file mode 100644 index 0000000..9037a15 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ServingState.java @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Defines set of serving states associated with a resource.
+ * 
+ * + * Protobuf enum {@code google.cloud.certificatemanager.v1.ServingState} + */ +public enum ServingState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The status is undefined.
+   * 
+ * + * SERVING_STATE_UNSPECIFIED = 0; + */ + SERVING_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * The configuration is serving.
+   * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+   * Update is in progress. Some frontends may serve this configuration.
+   * 
+ * + * PENDING = 2; + */ + PENDING(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The status is undefined.
+   * 
+ * + * SERVING_STATE_UNSPECIFIED = 0; + */ + public static final int SERVING_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The configuration is serving.
+   * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + * + * + *
+   * Update is in progress. Some frontends may serve this configuration.
+   * 
+ * + * PENDING = 2; + */ + public static final int PENDING_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ServingState 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 ServingState forNumber(int value) { + switch (value) { + case 0: + return SERVING_STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return PENDING; + 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 ServingState findValueByNumber(int number) { + return ServingState.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.certificatemanager.v1.CertificateManagerProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ServingState[] VALUES = values(); + + public static ServingState 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 ServingState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.certificatemanager.v1.ServingState) +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapEntryRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapEntryRequest.java new file mode 100644 index 0000000..9a62053 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapEntryRequest.java @@ -0,0 +1,1090 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `UpdateCertificateMapEntry` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest} + */ +public final class UpdateCertificateMapEntryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest) + UpdateCertificateMapEntryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCertificateMapEntryRequest.newBuilder() to construct. + private UpdateCertificateMapEntryRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCertificateMapEntryRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCertificateMapEntryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateCertificateMapEntryRequest( + 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.certificatemanager.v1.CertificateMapEntry.Builder subBuilder = null; + if (certificateMapEntry_ != null) { + subBuilder = certificateMapEntry_.toBuilder(); + } + certificateMapEntry_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.CertificateMapEntry.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificateMapEntry_); + certificateMapEntry_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest.class, + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest.Builder.class); + } + + public static final int CERTIFICATE_MAP_ENTRY_FIELD_NUMBER = 1; + private com.google.cloud.certificatemanager.v1.CertificateMapEntry certificateMapEntry_; + /** + * + * + *
+   * Required. A definition of the certificate map entry to create map entry.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMapEntry field is set. + */ + @java.lang.Override + public boolean hasCertificateMapEntry() { + return certificateMapEntry_ != null; + } + /** + * + * + *
+   * Required. A definition of the certificate map entry to create map entry.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMapEntry. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapEntry getCertificateMapEntry() { + return certificateMapEntry_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMapEntry.getDefaultInstance() + : certificateMapEntry_; + } + /** + * + * + *
+   * Required. A definition of the certificate map entry to create map entry.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder + getCertificateMapEntryOrBuilder() { + return getCertificateMapEntry(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (certificateMapEntry_ != null) { + output.writeMessage(1, getCertificateMapEntry()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (certificateMapEntry_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCertificateMapEntry()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest other = + (com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest) obj; + + if (hasCertificateMapEntry() != other.hasCertificateMapEntry()) return false; + if (hasCertificateMapEntry()) { + if (!getCertificateMapEntry().equals(other.getCertificateMapEntry())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCertificateMapEntry()) { + hash = (37 * hash) + CERTIFICATE_MAP_ENTRY_FIELD_NUMBER; + hash = (53 * hash) + getCertificateMapEntry().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `UpdateCertificateMapEntry` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest) + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest.class, + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest.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 (certificateMapEntryBuilder_ == null) { + certificateMapEntry_ = null; + } else { + certificateMapEntry_ = null; + certificateMapEntryBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapEntryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest build() { + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest buildPartial() { + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest result = + new com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest(this); + if (certificateMapEntryBuilder_ == null) { + result.certificateMapEntry_ = certificateMapEntry_; + } else { + result.certificateMapEntry_ = certificateMapEntryBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest + .getDefaultInstance()) return this; + if (other.hasCertificateMapEntry()) { + mergeCertificateMapEntry(other.getCertificateMapEntry()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.certificatemanager.v1.CertificateMapEntry certificateMapEntry_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMapEntry, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder> + certificateMapEntryBuilder_; + /** + * + * + *
+     * Required. A definition of the certificate map entry to create map entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMapEntry field is set. + */ + public boolean hasCertificateMapEntry() { + return certificateMapEntryBuilder_ != null || certificateMapEntry_ != null; + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create map entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMapEntry. + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntry getCertificateMapEntry() { + if (certificateMapEntryBuilder_ == null) { + return certificateMapEntry_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMapEntry.getDefaultInstance() + : certificateMapEntry_; + } else { + return certificateMapEntryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create map entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateMapEntry( + com.google.cloud.certificatemanager.v1.CertificateMapEntry value) { + if (certificateMapEntryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateMapEntry_ = value; + onChanged(); + } else { + certificateMapEntryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create map entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateMapEntry( + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder builderForValue) { + if (certificateMapEntryBuilder_ == null) { + certificateMapEntry_ = builderForValue.build(); + onChanged(); + } else { + certificateMapEntryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create map entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificateMapEntry( + com.google.cloud.certificatemanager.v1.CertificateMapEntry value) { + if (certificateMapEntryBuilder_ == null) { + if (certificateMapEntry_ != null) { + certificateMapEntry_ = + com.google.cloud.certificatemanager.v1.CertificateMapEntry.newBuilder( + certificateMapEntry_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateMapEntry_ = value; + } + onChanged(); + } else { + certificateMapEntryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create map entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificateMapEntry() { + if (certificateMapEntryBuilder_ == null) { + certificateMapEntry_ = null; + onChanged(); + } else { + certificateMapEntry_ = null; + certificateMapEntryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create map entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder + getCertificateMapEntryBuilder() { + + onChanged(); + return getCertificateMapEntryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create map entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder + getCertificateMapEntryOrBuilder() { + if (certificateMapEntryBuilder_ != null) { + return certificateMapEntryBuilder_.getMessageOrBuilder(); + } else { + return certificateMapEntry_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMapEntry.getDefaultInstance() + : certificateMapEntry_; + } + } + /** + * + * + *
+     * Required. A definition of the certificate map entry to create map entry.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMapEntry, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder> + getCertificateMapEntryFieldBuilder() { + if (certificateMapEntryBuilder_ == null) { + certificateMapEntryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMapEntry, + com.google.cloud.certificatemanager.v1.CertificateMapEntry.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder>( + getCertificateMapEntry(), getParentForChildren(), isClean()); + certificateMapEntry_ = null; + } + return certificateMapEntryBuilder_; + } + + 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. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest) + private static final com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest(); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCertificateMapEntryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateCertificateMapEntryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapEntryRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapEntryRequestOrBuilder.java new file mode 100644 index 0000000..8276f48 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapEntryRequestOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface UpdateCertificateMapEntryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A definition of the certificate map entry to create map entry.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMapEntry field is set. + */ + boolean hasCertificateMapEntry(); + /** + * + * + *
+   * Required. A definition of the certificate map entry to create map entry.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMapEntry. + */ + com.google.cloud.certificatemanager.v1.CertificateMapEntry getCertificateMapEntry(); + /** + * + * + *
+   * Required. A definition of the certificate map entry to create map entry.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMapEntry certificate_map_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.certificatemanager.v1.CertificateMapEntryOrBuilder + getCertificateMapEntryOrBuilder(); + + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapRequest.java new file mode 100644 index 0000000..15890cb --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapRequest.java @@ -0,0 +1,1083 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `UpdateCertificateMap` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.UpdateCertificateMapRequest} + */ +public final class UpdateCertificateMapRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.UpdateCertificateMapRequest) + UpdateCertificateMapRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCertificateMapRequest.newBuilder() to construct. + private UpdateCertificateMapRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCertificateMapRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCertificateMapRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateCertificateMapRequest( + 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.certificatemanager.v1.CertificateMap.Builder subBuilder = null; + if (certificateMap_ != null) { + subBuilder = certificateMap_.toBuilder(); + } + certificateMap_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.CertificateMap.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificateMap_); + certificateMap_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest.class, + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest.Builder.class); + } + + public static final int CERTIFICATE_MAP_FIELD_NUMBER = 1; + private com.google.cloud.certificatemanager.v1.CertificateMap certificateMap_; + /** + * + * + *
+   * Required. A definition of the certificate map to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMap field is set. + */ + @java.lang.Override + public boolean hasCertificateMap() { + return certificateMap_ != null; + } + /** + * + * + *
+   * Required. A definition of the certificate map to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMap. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMap getCertificateMap() { + return certificateMap_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMap.getDefaultInstance() + : certificateMap_; + } + /** + * + * + *
+   * Required. A definition of the certificate map to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder + getCertificateMapOrBuilder() { + return getCertificateMap(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (certificateMap_ != null) { + output.writeMessage(1, getCertificateMap()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (certificateMap_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCertificateMap()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest other = + (com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest) obj; + + if (hasCertificateMap() != other.hasCertificateMap()) return false; + if (hasCertificateMap()) { + if (!getCertificateMap().equals(other.getCertificateMap())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCertificateMap()) { + hash = (37 * hash) + CERTIFICATE_MAP_FIELD_NUMBER; + hash = (53 * hash) + getCertificateMap().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `UpdateCertificateMap` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.UpdateCertificateMapRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.UpdateCertificateMapRequest) + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest.class, + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest.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 (certificateMapBuilder_ == null) { + certificateMap_ = null; + } else { + certificateMap_ = null; + certificateMapBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateMapRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest build() { + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest buildPartial() { + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest result = + new com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest(this); + if (certificateMapBuilder_ == null) { + result.certificateMap_ = certificateMap_; + } else { + result.certificateMap_ = certificateMapBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest + .getDefaultInstance()) return this; + if (other.hasCertificateMap()) { + mergeCertificateMap(other.getCertificateMap()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.certificatemanager.v1.CertificateMap certificateMap_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap, + com.google.cloud.certificatemanager.v1.CertificateMap.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder> + certificateMapBuilder_; + /** + * + * + *
+     * Required. A definition of the certificate map to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMap field is set. + */ + public boolean hasCertificateMap() { + return certificateMapBuilder_ != null || certificateMap_ != null; + } + /** + * + * + *
+     * Required. A definition of the certificate map to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMap. + */ + public com.google.cloud.certificatemanager.v1.CertificateMap getCertificateMap() { + if (certificateMapBuilder_ == null) { + return certificateMap_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMap.getDefaultInstance() + : certificateMap_; + } else { + return certificateMapBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A definition of the certificate map to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateMap(com.google.cloud.certificatemanager.v1.CertificateMap value) { + if (certificateMapBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificateMap_ = value; + onChanged(); + } else { + certificateMapBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificateMap( + com.google.cloud.certificatemanager.v1.CertificateMap.Builder builderForValue) { + if (certificateMapBuilder_ == null) { + certificateMap_ = builderForValue.build(); + onChanged(); + } else { + certificateMapBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificateMap( + com.google.cloud.certificatemanager.v1.CertificateMap value) { + if (certificateMapBuilder_ == null) { + if (certificateMap_ != null) { + certificateMap_ = + com.google.cloud.certificatemanager.v1.CertificateMap.newBuilder(certificateMap_) + .mergeFrom(value) + .buildPartial(); + } else { + certificateMap_ = value; + } + onChanged(); + } else { + certificateMapBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificateMap() { + if (certificateMapBuilder_ == null) { + certificateMap_ = null; + onChanged(); + } else { + certificateMap_ = null; + certificateMapBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate map to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMap.Builder + getCertificateMapBuilder() { + + onChanged(); + return getCertificateMapFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A definition of the certificate map to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder + getCertificateMapOrBuilder() { + if (certificateMapBuilder_ != null) { + return certificateMapBuilder_.getMessageOrBuilder(); + } else { + return certificateMap_ == null + ? com.google.cloud.certificatemanager.v1.CertificateMap.getDefaultInstance() + : certificateMap_; + } + } + /** + * + * + *
+     * Required. A definition of the certificate map to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap, + com.google.cloud.certificatemanager.v1.CertificateMap.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder> + getCertificateMapFieldBuilder() { + if (certificateMapBuilder_ == null) { + certificateMapBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.CertificateMap, + com.google.cloud.certificatemanager.v1.CertificateMap.Builder, + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder>( + getCertificateMap(), getParentForChildren(), isClean()); + certificateMap_ = null; + } + return certificateMapBuilder_; + } + + 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. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.UpdateCertificateMapRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.UpdateCertificateMapRequest) + private static final com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest(); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCertificateMapRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateCertificateMapRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapRequestOrBuilder.java new file mode 100644 index 0000000..afd435e --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateMapRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface UpdateCertificateMapRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.UpdateCertificateMapRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A definition of the certificate map to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificateMap field is set. + */ + boolean hasCertificateMap(); + /** + * + * + *
+   * Required. A definition of the certificate map to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificateMap. + */ + com.google.cloud.certificatemanager.v1.CertificateMap getCertificateMap(); + /** + * + * + *
+   * Required. A definition of the certificate map to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.CertificateMap certificate_map = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.certificatemanager.v1.CertificateMapOrBuilder getCertificateMapOrBuilder(); + + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateRequest.java new file mode 100644 index 0000000..b94fa71 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateRequest.java @@ -0,0 +1,1075 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `UpdateCertificate` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.UpdateCertificateRequest} + */ +public final class UpdateCertificateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.UpdateCertificateRequest) + UpdateCertificateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCertificateRequest.newBuilder() to construct. + private UpdateCertificateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCertificateRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCertificateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateCertificateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.certificatemanager.v1.Certificate.Builder subBuilder = null; + if (certificate_ != null) { + subBuilder = certificate_.toBuilder(); + } + certificate_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.Certificate.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(certificate_); + certificate_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest.class, + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest.Builder.class); + } + + public static final int CERTIFICATE_FIELD_NUMBER = 1; + private com.google.cloud.certificatemanager.v1.Certificate certificate_; + /** + * + * + *
+   * Required. A definition of the certificate to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + @java.lang.Override + public boolean hasCertificate() { + return certificate_ != null; + } + /** + * + * + *
+   * Required. A definition of the certificate to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.Certificate getCertificate() { + return certificate_ == null + ? com.google.cloud.certificatemanager.v1.Certificate.getDefaultInstance() + : certificate_; + } + /** + * + * + *
+   * Required. A definition of the certificate to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.CertificateOrBuilder getCertificateOrBuilder() { + return getCertificate(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (certificate_ != null) { + output.writeMessage(1, getCertificate()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (certificate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCertificate()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.UpdateCertificateRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest other = + (com.google.cloud.certificatemanager.v1.UpdateCertificateRequest) obj; + + if (hasCertificate() != other.hasCertificate()) return false; + if (hasCertificate()) { + if (!getCertificate().equals(other.getCertificate())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCertificate()) { + hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getCertificate().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `UpdateCertificate` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.UpdateCertificateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.UpdateCertificateRequest) + com.google.cloud.certificatemanager.v1.UpdateCertificateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest.class, + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest.Builder.class); + } + + // Construct using com.google.cloud.certificatemanager.v1.UpdateCertificateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (certificateBuilder_ == null) { + certificate_ = null; + } else { + certificate_ = null; + certificateBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateCertificateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.UpdateCertificateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateRequest build() { + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateRequest buildPartial() { + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest result = + new com.google.cloud.certificatemanager.v1.UpdateCertificateRequest(this); + if (certificateBuilder_ == null) { + result.certificate_ = certificate_; + } else { + result.certificate_ = certificateBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.certificatemanager.v1.UpdateCertificateRequest) { + return mergeFrom((com.google.cloud.certificatemanager.v1.UpdateCertificateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.UpdateCertificateRequest.getDefaultInstance()) + return this; + if (other.hasCertificate()) { + mergeCertificate(other.getCertificate()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.certificatemanager.v1.UpdateCertificateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.UpdateCertificateRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.certificatemanager.v1.Certificate certificate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate, + com.google.cloud.certificatemanager.v1.Certificate.Builder, + com.google.cloud.certificatemanager.v1.CertificateOrBuilder> + certificateBuilder_; + /** + * + * + *
+     * Required. A definition of the certificate to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + public boolean hasCertificate() { + return certificateBuilder_ != null || certificate_ != null; + } + /** + * + * + *
+     * Required. A definition of the certificate to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + public com.google.cloud.certificatemanager.v1.Certificate getCertificate() { + if (certificateBuilder_ == null) { + return certificate_ == null + ? com.google.cloud.certificatemanager.v1.Certificate.getDefaultInstance() + : certificate_; + } else { + return certificateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A definition of the certificate to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificate(com.google.cloud.certificatemanager.v1.Certificate value) { + if (certificateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + certificate_ = value; + onChanged(); + } else { + certificateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCertificate( + com.google.cloud.certificatemanager.v1.Certificate.Builder builderForValue) { + if (certificateBuilder_ == null) { + certificate_ = builderForValue.build(); + onChanged(); + } else { + certificateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCertificate(com.google.cloud.certificatemanager.v1.Certificate value) { + if (certificateBuilder_ == null) { + if (certificate_ != null) { + certificate_ = + com.google.cloud.certificatemanager.v1.Certificate.newBuilder(certificate_) + .mergeFrom(value) + .buildPartial(); + } else { + certificate_ = value; + } + onChanged(); + } else { + certificateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCertificate() { + if (certificateBuilder_ == null) { + certificate_ = null; + onChanged(); + } else { + certificate_ = null; + certificateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the certificate to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.Certificate.Builder getCertificateBuilder() { + + onChanged(); + return getCertificateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A definition of the certificate to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.CertificateOrBuilder getCertificateOrBuilder() { + if (certificateBuilder_ != null) { + return certificateBuilder_.getMessageOrBuilder(); + } else { + return certificate_ == null + ? com.google.cloud.certificatemanager.v1.Certificate.getDefaultInstance() + : certificate_; + } + } + /** + * + * + *
+     * Required. A definition of the certificate to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate, + com.google.cloud.certificatemanager.v1.Certificate.Builder, + com.google.cloud.certificatemanager.v1.CertificateOrBuilder> + getCertificateFieldBuilder() { + if (certificateBuilder_ == null) { + certificateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.Certificate, + com.google.cloud.certificatemanager.v1.Certificate.Builder, + com.google.cloud.certificatemanager.v1.CertificateOrBuilder>( + getCertificate(), getParentForChildren(), isClean()); + certificate_ = null; + } + return certificateBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.UpdateCertificateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.UpdateCertificateRequest) + private static final com.google.cloud.certificatemanager.v1.UpdateCertificateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.UpdateCertificateRequest(); + } + + public static com.google.cloud.certificatemanager.v1.UpdateCertificateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCertificateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateCertificateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateCertificateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateRequestOrBuilder.java new file mode 100644 index 0000000..40983ec --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateCertificateRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface UpdateCertificateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.UpdateCertificateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A definition of the certificate to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the certificate field is set. + */ + boolean hasCertificate(); + /** + * + * + *
+   * Required. A definition of the certificate to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The certificate. + */ + com.google.cloud.certificatemanager.v1.Certificate getCertificate(); + /** + * + * + *
+   * Required. A definition of the certificate to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.Certificate certificate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.certificatemanager.v1.CertificateOrBuilder getCertificateOrBuilder(); + + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateDnsAuthorizationRequest.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateDnsAuthorizationRequest.java new file mode 100644 index 0000000..bf83899 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateDnsAuthorizationRequest.java @@ -0,0 +1,1084 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +/** + * + * + *
+ * Request for the `UpdateDnsAuthorization` method.
+ * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest} + */ +public final class UpdateDnsAuthorizationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest) + UpdateDnsAuthorizationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDnsAuthorizationRequest.newBuilder() to construct. + private UpdateDnsAuthorizationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDnsAuthorizationRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDnsAuthorizationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateDnsAuthorizationRequest( + 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.certificatemanager.v1.DnsAuthorization.Builder subBuilder = null; + if (dnsAuthorization_ != null) { + subBuilder = dnsAuthorization_.toBuilder(); + } + dnsAuthorization_ = + input.readMessage( + com.google.cloud.certificatemanager.v1.DnsAuthorization.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dnsAuthorization_); + dnsAuthorization_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateDnsAuthorizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest.class, + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest.Builder.class); + } + + public static final int DNS_AUTHORIZATION_FIELD_NUMBER = 1; + private com.google.cloud.certificatemanager.v1.DnsAuthorization dnsAuthorization_; + /** + * + * + *
+   * Required. A definition of the dns authorization to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dnsAuthorization field is set. + */ + @java.lang.Override + public boolean hasDnsAuthorization() { + return dnsAuthorization_ != null; + } + /** + * + * + *
+   * Required. A definition of the dns authorization to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dnsAuthorization. + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorization getDnsAuthorization() { + return dnsAuthorization_ == null + ? com.google.cloud.certificatemanager.v1.DnsAuthorization.getDefaultInstance() + : dnsAuthorization_; + } + /** + * + * + *
+   * Required. A definition of the dns authorization to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder + getDnsAuthorizationOrBuilder() { + return getDnsAuthorization(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (dnsAuthorization_ != null) { + output.writeMessage(1, getDnsAuthorization()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dnsAuthorization_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDnsAuthorization()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest)) { + return super.equals(obj); + } + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest other = + (com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest) obj; + + if (hasDnsAuthorization() != other.hasDnsAuthorization()) return false; + if (hasDnsAuthorization()) { + if (!getDnsAuthorization().equals(other.getDnsAuthorization())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDnsAuthorization()) { + hash = (37 * hash) + DNS_AUTHORIZATION_FIELD_NUMBER; + hash = (53 * hash) + getDnsAuthorization().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for the `UpdateDnsAuthorization` method.
+   * 
+ * + * Protobuf type {@code google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest) + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateDnsAuthorizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest.class, + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest.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 (dnsAuthorizationBuilder_ == null) { + dnsAuthorization_ = null; + } else { + dnsAuthorization_ = null; + dnsAuthorizationBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.certificatemanager.v1.CertificateManagerProto + .internal_static_google_cloud_certificatemanager_v1_UpdateDnsAuthorizationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest + getDefaultInstanceForType() { + return com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest build() { + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest buildPartial() { + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest result = + new com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest(this); + if (dnsAuthorizationBuilder_ == null) { + result.dnsAuthorization_ = dnsAuthorization_; + } else { + result.dnsAuthorization_ = dnsAuthorizationBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest) { + return mergeFrom( + (com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest other) { + if (other + == com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest + .getDefaultInstance()) return this; + if (other.hasDnsAuthorization()) { + mergeDnsAuthorization(other.getDnsAuthorization()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.certificatemanager.v1.DnsAuthorization dnsAuthorization_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder> + dnsAuthorizationBuilder_; + /** + * + * + *
+     * Required. A definition of the dns authorization to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dnsAuthorization field is set. + */ + public boolean hasDnsAuthorization() { + return dnsAuthorizationBuilder_ != null || dnsAuthorization_ != null; + } + /** + * + * + *
+     * Required. A definition of the dns authorization to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dnsAuthorization. + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization getDnsAuthorization() { + if (dnsAuthorizationBuilder_ == null) { + return dnsAuthorization_ == null + ? com.google.cloud.certificatemanager.v1.DnsAuthorization.getDefaultInstance() + : dnsAuthorization_; + } else { + return dnsAuthorizationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A definition of the dns authorization to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDnsAuthorization( + com.google.cloud.certificatemanager.v1.DnsAuthorization value) { + if (dnsAuthorizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dnsAuthorization_ = value; + onChanged(); + } else { + dnsAuthorizationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the dns authorization to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDnsAuthorization( + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder builderForValue) { + if (dnsAuthorizationBuilder_ == null) { + dnsAuthorization_ = builderForValue.build(); + onChanged(); + } else { + dnsAuthorizationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the dns authorization to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDnsAuthorization( + com.google.cloud.certificatemanager.v1.DnsAuthorization value) { + if (dnsAuthorizationBuilder_ == null) { + if (dnsAuthorization_ != null) { + dnsAuthorization_ = + com.google.cloud.certificatemanager.v1.DnsAuthorization.newBuilder(dnsAuthorization_) + .mergeFrom(value) + .buildPartial(); + } else { + dnsAuthorization_ = value; + } + onChanged(); + } else { + dnsAuthorizationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the dns authorization to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDnsAuthorization() { + if (dnsAuthorizationBuilder_ == null) { + dnsAuthorization_ = null; + onChanged(); + } else { + dnsAuthorization_ = null; + dnsAuthorizationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A definition of the dns authorization to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder + getDnsAuthorizationBuilder() { + + onChanged(); + return getDnsAuthorizationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A definition of the dns authorization to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder + getDnsAuthorizationOrBuilder() { + if (dnsAuthorizationBuilder_ != null) { + return dnsAuthorizationBuilder_.getMessageOrBuilder(); + } else { + return dnsAuthorization_ == null + ? com.google.cloud.certificatemanager.v1.DnsAuthorization.getDefaultInstance() + : dnsAuthorization_; + } + } + /** + * + * + *
+     * Required. A definition of the dns authorization to update.
+     * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder> + getDnsAuthorizationFieldBuilder() { + if (dnsAuthorizationBuilder_ == null) { + dnsAuthorizationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.certificatemanager.v1.DnsAuthorization, + com.google.cloud.certificatemanager.v1.DnsAuthorization.Builder, + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder>( + getDnsAuthorization(), getParentForChildren(), isClean()); + dnsAuthorization_ = null; + } + return dnsAuthorizationBuilder_; + } + + 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. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The update mask applies to the resource. For the `FieldMask` definition,
+     * see
+     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest) + private static final com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest(); + } + + public static com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDnsAuthorizationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateDnsAuthorizationRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateDnsAuthorizationRequestOrBuilder.java b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateDnsAuthorizationRequestOrBuilder.java new file mode 100644 index 0000000..7a82c9b --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateDnsAuthorizationRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/certificatemanager/v1/certificate_manager.proto + +package com.google.cloud.certificatemanager.v1; + +public interface UpdateDnsAuthorizationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A definition of the dns authorization to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dnsAuthorization field is set. + */ + boolean hasDnsAuthorization(); + /** + * + * + *
+   * Required. A definition of the dns authorization to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dnsAuthorization. + */ + com.google.cloud.certificatemanager.v1.DnsAuthorization getDnsAuthorization(); + /** + * + * + *
+   * Required. A definition of the dns authorization to update.
+   * 
+ * + * + * .google.cloud.certificatemanager.v1.DnsAuthorization dns_authorization = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.certificatemanager.v1.DnsAuthorizationOrBuilder getDnsAuthorizationOrBuilder(); + + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The update mask applies to the resource. For the `FieldMask` definition,
+   * see
+   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-certificate-manager-v1/src/main/proto/google/cloud/certificatemanager/v1/certificate_manager.proto b/proto-google-cloud-certificate-manager-v1/src/main/proto/google/cloud/certificatemanager/v1/certificate_manager.proto new file mode 100644 index 0000000..720d415 --- /dev/null +++ b/proto-google-cloud-certificate-manager-v1/src/main/proto/google/cloud/certificatemanager/v1/certificate_manager.proto @@ -0,0 +1,1071 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.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.certificatemanager.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.CertificateManager.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/certificatemanager/v1;certificatemanager"; +option java_multiple_files = true; +option java_outer_classname = "CertificateManagerProto"; +option java_package = "com.google.cloud.certificatemanager.v1"; +option php_namespace = "Google\\Cloud\\CertificateManager\\V1"; +option ruby_package = "Google::Cloud::CertificateManager::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/TargetHttpsProxies" + pattern: "projects/{project}/locations/{location}/targetHttpsProxies/{targetHttpsProxy}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/TargetSslProxies" + pattern: "projects/{project}/locations/{location}/targetSslProxies/{targetSslProxy}" +}; + +// API Overview +// +// Certificates Manager API allows customers to see and manage all their TLS +// certificates. +// +// Certificates Manager API service provides methods to manage certificates, +// group them into collections, and create serving configuration that can be +// easily applied to other Cloud resources e.g. Target Proxies. +// +// Data Model +// +// The Certificates Manager service exposes the following resources: +// +// * `Certificate` which describes a single TLS certificate. +// * `CertificateMap` which describes a collection of certificates that can be +// attached to a target resource. +// * `CertificateMapEntry` which describes a single configuration entry that +// consists of a SNI and a group of certificates. It's a subresource of +// CertificateMap. +// +// Certificate, CertificateMap and CertificateMapEntry IDs +// have to match "^[a-z0-9-]{1,63}$" regexp, which means that +// - only lower case letters, digits, and hyphen are allowed +// - length of the resource ID has to be in [1,63] range. +// +// Provides methods to manage Cloud Certificate Manager entities. +service CertificateManager { + option (google.api.default_host) = "certificatemanager.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Certificates in a given project and location. + rpc ListCertificates(ListCertificatesRequest) returns (ListCertificatesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/certificates" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Certificate. + rpc GetCertificate(GetCertificateRequest) returns (Certificate) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/certificates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Certificate in a given project and location. + rpc CreateCertificate(CreateCertificateRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/certificates" + body: "certificate" + }; + option (google.api.method_signature) = "parent,certificate,certificate_id"; + option (google.longrunning.operation_info) = { + response_type: "Certificate" + metadata_type: "OperationMetadata" + }; + } + + // Updates a Certificate. + rpc UpdateCertificate(UpdateCertificateRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{certificate.name=projects/*/locations/*/certificates/*}" + body: "certificate" + }; + option (google.api.method_signature) = "certificate,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Certificate" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Certificate. + rpc DeleteCertificate(DeleteCertificateRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/certificates/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists CertificateMaps in a given project and location. + rpc ListCertificateMaps(ListCertificateMapsRequest) returns (ListCertificateMapsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/certificateMaps" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single CertificateMap. + rpc GetCertificateMap(GetCertificateMapRequest) returns (CertificateMap) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/certificateMaps/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new CertificateMap in a given project and location. + rpc CreateCertificateMap(CreateCertificateMapRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/certificateMaps" + body: "certificate_map" + }; + option (google.api.method_signature) = "parent,certificate_map,certificate_map_id"; + option (google.longrunning.operation_info) = { + response_type: "CertificateMap" + metadata_type: "OperationMetadata" + }; + } + + // Updates a CertificateMap. + rpc UpdateCertificateMap(UpdateCertificateMapRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{certificate_map.name=projects/*/locations/*/certificateMaps/*}" + body: "certificate_map" + }; + option (google.api.method_signature) = "certificate_map,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "CertificateMap" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single CertificateMap. A Certificate Map can't be deleted + // if it contains Certificate Map Entries. Remove all the entries from + // the map before calling this method. + rpc DeleteCertificateMap(DeleteCertificateMapRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/certificateMaps/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists CertificateMapEntries in a given project and location. + rpc ListCertificateMapEntries(ListCertificateMapEntriesRequest) returns (ListCertificateMapEntriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single CertificateMapEntry. + rpc GetCertificateMapEntry(GetCertificateMapEntryRequest) returns (CertificateMapEntry) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new CertificateMapEntry in a given project and location. + rpc CreateCertificateMapEntry(CreateCertificateMapEntryRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries" + body: "certificate_map_entry" + }; + option (google.api.method_signature) = "parent,certificate_map_entry,certificate_map_entry_id"; + option (google.longrunning.operation_info) = { + response_type: "CertificateMapEntry" + metadata_type: "OperationMetadata" + }; + } + + // Updates a CertificateMapEntry. + rpc UpdateCertificateMapEntry(UpdateCertificateMapEntryRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{certificate_map_entry.name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}" + body: "certificate_map_entry" + }; + option (google.api.method_signature) = "certificate_map_entry,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "CertificateMapEntry" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single CertificateMapEntry. + rpc DeleteCertificateMapEntry(DeleteCertificateMapEntryRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists DnsAuthorizations in a given project and location. + rpc ListDnsAuthorizations(ListDnsAuthorizationsRequest) returns (ListDnsAuthorizationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/dnsAuthorizations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single DnsAuthorization. + rpc GetDnsAuthorization(GetDnsAuthorizationRequest) returns (DnsAuthorization) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dnsAuthorizations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new DnsAuthorization in a given project and location. + rpc CreateDnsAuthorization(CreateDnsAuthorizationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/dnsAuthorizations" + body: "dns_authorization" + }; + option (google.api.method_signature) = "parent,dns_authorization,dns_authorization_id"; + option (google.longrunning.operation_info) = { + response_type: "DnsAuthorization" + metadata_type: "OperationMetadata" + }; + } + + // Updates a DnsAuthorization. + rpc UpdateDnsAuthorization(UpdateDnsAuthorizationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{dns_authorization.name=projects/*/locations/*/dnsAuthorizations/*}" + body: "dns_authorization" + }; + option (google.api.method_signature) = "dns_authorization,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DnsAuthorization" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single DnsAuthorization. + rpc DeleteDnsAuthorization(DeleteDnsAuthorizationRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dnsAuthorizations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Request for the `ListCertificates` method. +message ListCertificatesRequest { + // Required. The project and location from which the certificate should be listed, + // specified in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Maximum number of certificates to return per call. + int32 page_size = 2; + + // The value returned by the last `ListCertificatesResponse`. Indicates that + // this is a continuation of a prior `ListCertificates` call, and that the + // system should return the next page of data. + string page_token = 3; + + // Filter expression to restrict the Certificates returned. + string filter = 4; + + // A list of Certificate field names used to specify the order of the returned + // results. The default sorting order is ascending. To specify descending + // order for a field, add a suffix " desc". + string order_by = 5; +} + +// Response for the `ListCertificates` method. +message ListCertificatesResponse { + // A list of certificates for the parent resource. + repeated Certificate certificates = 1; + + // If there might be more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; + + // A list of locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for the `GetCertificate` method. +message GetCertificateRequest { + // Required. A name of the certificate to describe. Must be in the format + // `projects/*/locations/*/certificates/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/Certificate" + } + ]; +} + +// Request for the `CreateCertificate` method. +message CreateCertificateRequest { + // Required. The parent resource of the certificate. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. A user-provided name of the certificate. + string certificate_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A definition of the certificate to create. + Certificate certificate = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateCertificate` method. +message UpdateCertificateRequest { + // Required. A definition of the certificate to update. + Certificate certificate = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteCertificate` method. +message DeleteCertificateRequest { + // Required. A name of the certificate to delete. Must be in the format + // `projects/*/locations/*/certificates/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/Certificate" + } + ]; +} + +// Request for the `ListCertificateMaps` method. +message ListCertificateMapsRequest { + // Required. The project and location from which the certificate maps should be listed, + // specified in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Maximum number of certificate maps to return per call. + int32 page_size = 2; + + // The value returned by the last `ListCertificateMapsResponse`. Indicates + // that this is a continuation of a prior `ListCertificateMaps` call, and that + // the system should return the next page of data. + string page_token = 3; + + // Filter expression to restrict the Certificates Maps returned. + string filter = 4; + + // A list of Certificate Map field names used to specify the order of the + // returned results. The default sorting order is ascending. To specify + // descending order for a field, add a suffix " desc". + string order_by = 5; +} + +// Response for the `ListCertificateMaps` method. +message ListCertificateMapsResponse { + // A list of certificate maps for the parent resource. + repeated CertificateMap certificate_maps = 1; + + // If there might be more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for the `GetCertificateMap` method. +message GetCertificateMapRequest { + // Required. A name of the certificate map to describe. Must be in the format + // `projects/*/locations/*/certificateMaps/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/CertificateMap" + } + ]; +} + +// Request for the `CreateCertificateMap` method. +message CreateCertificateMapRequest { + // Required. The parent resource of the certificate map. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. A user-provided name of the certificate map. + string certificate_map_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A definition of the certificate map to create. + CertificateMap certificate_map = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateCertificateMap` method. +message UpdateCertificateMapRequest { + // Required. A definition of the certificate map to update. + CertificateMap certificate_map = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteCertificateMap` method. +message DeleteCertificateMapRequest { + // Required. A name of the certificate map to delete. Must be in the format + // `projects/*/locations/*/certificateMaps/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/CertificateMap" + } + ]; +} + +// Request for the `ListCertificateMapEntries` method. +message ListCertificateMapEntriesRequest { + // Required. The project, location and certificate map from which the certificate map + // entries should be listed, specified in the format + // `projects/*/locations/*/certificateMaps/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/CertificateMap" + } + ]; + + // Maximum number of certificate map entries to return. The service may return + // fewer than this value. + // If unspecified, at most 50 certificate map entries will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // The value returned by the last `ListCertificateMapEntriesResponse`. + // Indicates that this is a continuation of a prior + // `ListCertificateMapEntries` call, and that the system should return the + // next page of data. + string page_token = 3; + + // Filter expression to restrict the returned Certificate Map Entries. + string filter = 4; + + // A list of Certificate Map Entry field names used to specify + // the order of the returned results. The default sorting order is ascending. + // To specify descending order for a field, add a suffix " desc". + string order_by = 5; +} + +// Response for the `ListCertificateMapEntries` method. +message ListCertificateMapEntriesResponse { + // A list of certificate map entries for the parent resource. + repeated CertificateMapEntry certificate_map_entries = 1; + + // If there might be more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for the `GetCertificateMapEntry` method. +message GetCertificateMapEntryRequest { + // Required. A name of the certificate map entry to describe. Must be in the + // format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/CertificateMapEntry" + } + ]; +} + +// Request for the `CreateCertificateMapEntry` method. +message CreateCertificateMapEntryRequest { + // Required. The parent resource of the certificate map entry. Must be in the + // format `projects/*/locations/*/certificateMaps/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/CertificateMap" + } + ]; + + // Required. A user-provided name of the certificate map entry. + string certificate_map_entry_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A definition of the certificate map entry to create. + CertificateMapEntry certificate_map_entry = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateCertificateMapEntry` method. +message UpdateCertificateMapEntryRequest { + // Required. A definition of the certificate map entry to create map entry. + CertificateMapEntry certificate_map_entry = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteCertificateMapEntry` method. +message DeleteCertificateMapEntryRequest { + // Required. A name of the certificate map entry to delete. Must be in the format + // `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/CertificateMapEntry" + } + ]; +} + +// Request for the `ListDnsAuthorizations` method. +message ListDnsAuthorizationsRequest { + // Required. The project and location from which the dns authorizations should be + // listed, specified in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Maximum number of dns authorizations to return per call. + int32 page_size = 2; + + // The value returned by the last `ListDnsAuthorizationsResponse`. Indicates + // that this is a continuation of a prior `ListDnsAuthorizations` call, and + // that the system should return the next page of data. + string page_token = 3; + + // Filter expression to restrict the Dns Authorizations returned. + string filter = 4; + + // A list of Dns Authorization field names used to specify the order of the + // returned results. The default sorting order is ascending. To specify + // descending order for a field, add a suffix " desc". + string order_by = 5; +} + +// Response for the `ListDnsAuthorizations` method. +message ListDnsAuthorizationsResponse { + // A list of dns authorizations for the parent resource. + repeated DnsAuthorization dns_authorizations = 1; + + // If there might be more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for the `GetDnsAuthorization` method. +message GetDnsAuthorizationRequest { + // Required. A name of the dns authorization to describe. Must be in the format + // `projects/*/locations/*/dnsAuthorizations/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/DnsAuthorization" + } + ]; +} + +// Request for the `CreateDnsAuthorization` method. +message CreateDnsAuthorizationRequest { + // Required. The parent resource of the dns authorization. Must be in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. A user-provided name of the dns authorization. + string dns_authorization_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A definition of the dns authorization to create. + DnsAuthorization dns_authorization = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateDnsAuthorization` method. +message UpdateDnsAuthorizationRequest { + // Required. A definition of the dns authorization to update. + DnsAuthorization dns_authorization = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteDnsAuthorization` method. +message DeleteDnsAuthorizationRequest { + // Required. A name of the dns authorization to delete. Must be in the format + // `projects/*/locations/*/dnsAuthorizations/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/DnsAuthorization" + } + ]; +} + +// Represents the metadata of the long-running operation. Output only. +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Server-defined resource path for the target of the operation. + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_message = 5; + + // 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; + + // API version used to start the operation. + string api_version = 7; +} + +// Defines TLS certificate. +message Certificate { + option (google.api.resource) = { + type: "certificatemanager.googleapis.com/Certificate" + pattern: "projects/{project}/locations/{location}/certificates/{certificate}" + }; + + // Certificate data for a SelfManaged Certificate. + // SelfManaged Certificates are uploaded by the user. Updating such + // certificates before they expire remains the user's responsibility. + message SelfManagedCertificate { + // Input only. The PEM-encoded certificate chain. + // Leaf certificate comes first, followed by intermediate ones if any. + string pem_certificate = 1 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. The PEM-encoded private key of the leaf certificate. + string pem_private_key = 2 [(google.api.field_behavior) = INPUT_ONLY]; + } + + // Configuration and state of a Managed Certificate. + // Certificate Manager provisions and renews Managed Certificates + // automatically, for as long as it's authorized to do so. + message ManagedCertificate { + enum State { + STATE_UNSPECIFIED = 0; + + // Certificate Manager attempts to provision or renew the certificate. + // If the process takes longer than expected, consult the + // `provisioning_issue` field. + PROVISIONING = 1; + + // Multiple certificate provisioning attempts failed and Certificate + // Manager gave up. To try again, delete and create a new managed + // Certificate resource. + // For details see the `provisioning_issue` field. + FAILED = 2; + + // The certificate management is working, and a certificate has been + // provisioned. + ACTIVE = 3; + } + + // Information about issues with provisioning a Managed Certificate. + message ProvisioningIssue { + enum Reason { + REASON_UNSPECIFIED = 0; + + // Certificate provisioning failed due to an issue with one or more of + // the domains on the certificate. + // For details of which domains failed, consult the + // `authorization_attempt_info` field. + AUTHORIZATION_ISSUE = 1; + + // Exceeded Certificate Authority quotas or internal rate limits of the + // system. Provisioning may take longer to complete. + RATE_LIMITED = 2; + } + + // Reason for provisioning failures. + Reason reason = 1; + + // Human readable explanation about the issue. Provided to help address + // the configuration issues. + // Not guaranteed to be stable. For programmatic access use Reason enum. + string details = 2; + } + + // State of the latest attempt to authorize a domain for certificate + // issuance. + message AuthorizationAttemptInfo { + enum State { + STATE_UNSPECIFIED = 0; + + // Certificate provisioning for this domain is under way. GCP will + // attempt to authorize the domain. + AUTHORIZING = 1; + + // A managed certificate can be provisioned, no issues for this domain. + AUTHORIZED = 6; + + // Attempt to authorize the domain failed. This prevents the Managed + // Certificate from being issued. + // See `failure_reason` and `details` fields for more information. + FAILED = 7; + } + + enum FailureReason { + FAILURE_REASON_UNSPECIFIED = 0; + + // There was a problem with the user's DNS or load balancer + // configuration for this domain. + CONFIG = 1; + + // Certificate issuance forbidden by an explicit CAA record for the + // domain or a failure to check CAA records for the domain. + CAA = 2; + + // Reached a CA or internal rate-limit for the domain, + // e.g. for certificates per top-level private domain. + RATE_LIMITED = 3; + } + + // Domain name of the authorization attempt. + string domain = 1; + + // State of the domain for managed certificate issuance. + State state = 2; + + // Output only. Reason for failure of the authorization attempt for the domain. + FailureReason failure_reason = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Human readable explanation for reaching the state. Provided to help + // address the configuration issues. + // Not guaranteed to be stable. For programmatic access use Reason enum. + string details = 4; + } + + // Immutable. The domains for which a managed SSL certificate will be generated. + // Wildcard domains are only supported with DNS challenge resolution. + repeated string domains = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Authorizations that will be used for performing domain authorization. + repeated string dns_authorizations = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/DnsAuthorization" + } + ]; + + // Output only. State of the managed certificate resource. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Information about issues with provisioning a Managed Certificate. + ProvisioningIssue provisioning_issue = 3; + + // Output only. Detailed state of the latest authorization attempt for each domain + // specified for managed certificate resource. + repeated AuthorizationAttemptInfo authorization_attempt_info = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Certificate scope. + enum Scope { + // Certificates with default scope are served from core Google data centers. + // If unsure, choose this option. + DEFAULT = 0; + + // Certificates with scope EDGE_CACHE are special-purposed certificates, + // served from non-core Google data centers. + EDGE_CACHE = 1; + } + + // A user-defined name of the certificate. Certificate names must be unique + // globally and match pattern `projects/*/locations/*/certificates/*`. + string name = 1; + + // One or more paragraphs of text description of a certificate. + string description = 8; + + // Output only. The creation timestamp of a Certificate. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of a Certificate. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Set of labels associated with a Certificate. + map labels = 4; + + oneof type { + // If set, defines data of a self-managed certificate. + SelfManagedCertificate self_managed = 5; + + // If set, contains configuration and state of a managed certificate. + ManagedCertificate managed = 11; + } + + // Output only. The list of Subject Alternative Names of dnsName type defined in the + // certificate (see RFC 5280 4.2.1.6) + repeated string san_dnsnames = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The PEM-encoded certificate chain. + string pem_certificate = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The expiry timestamp of a Certificate. + google.protobuf.Timestamp expire_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The scope of the certificate. + Scope scope = 12 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Defines a collection of certificate configurations. +message CertificateMap { + option (google.api.resource) = { + type: "certificatemanager.googleapis.com/CertificateMap" + pattern: "projects/{project}/locations/{location}/certificateMaps/{certificate_map}" + }; + + // Describes a Target Proxy which uses this Certificate Map. + message GclbTarget { + // Defines IP configuration where this Certificate Map is serving. + message IpConfig { + // An external IP address. + string ip_address = 1; + + // Ports. + repeated uint32 ports = 3; + } + + // A Target Proxy to which this map is attached to. + oneof target_proxy { + // A name must be in the format + // `projects/*/locations/*/targetHttpsProxies/*`. + string target_https_proxy = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/TargetHttpsProxies" + }]; + + // A name must be in the format + // `projects/*/locations/*/targetSslProxies/*`. + string target_ssl_proxy = 3 [(google.api.resource_reference) = { + type: "compute.googleapis.com/TargetSslProxies" + }]; + } + + // IP configurations for this Target Proxy where the + // Certificate Map is serving. + repeated IpConfig ip_configs = 2; + } + + // A user-defined name of the Certificate Map. Certificate Map names must be + // unique globally and match pattern + // `projects/*/locations/*/certificateMaps/*`. + string name = 1; + + // One or more paragraphs of text description of a certificate map. + string description = 5; + + // Output only. The creation timestamp of a Certificate Map. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The update timestamp of a Certificate Map. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Set of labels associated with a Certificate Map. + map labels = 3; + + // Output only. A list of GCLB targets which use this Certificate Map. + repeated GclbTarget gclb_targets = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Defines a certificate map entry. +message CertificateMapEntry { + option (google.api.resource) = { + type: "certificatemanager.googleapis.com/CertificateMapEntry" + pattern: "projects/{project}/locations/{location}/certificateMaps/{certificate_map}/certificateMapEntries/{certificate_map_entry}" + }; + + // Defines predefined cases other than SNI-hostname match when this + // configuration should be applied. + enum Matcher { + // A matcher has't been recognized. + MATCHER_UNSPECIFIED = 0; + + // A primary certificate that is served when SNI wasn't specified in the + // request or SNI couldn't be found in the map. + PRIMARY = 1; + } + + // A user-defined name of the Certificate Map Entry. Certificate Map Entry + // names must be unique globally and match pattern + // `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + string name = 1; + + // One or more paragraphs of text description of a certificate map entry. + string description = 9; + + // Output only. The creation timestamp of a Certificate Map Entry. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The update timestamp of a Certificate Map Entry. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Set of labels associated with a Certificate Map Entry. + map labels = 4; + + oneof match { + // A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression + // (`*.example.com`) for a set of hostnames with common suffix. Used as + // Server Name Indication (SNI) for selecting a proper certificate. + string hostname = 5; + + // A predefined matcher for particular cases, other than SNI selection. + Matcher matcher = 10; + } + + // A set of Certificates defines for the given `hostname`. There can be + // defined up to fifteen certificates in each Certificate Map Entry. Each + // certificate must match pattern `projects/*/locations/*/certificates/*`. + repeated string certificates = 7 [(google.api.resource_reference) = { + type: "certificatemanager.googleapis.com/Certificate" + }]; + + // Output only. A serving state of this Certificate Map Entry. + ServingState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A DnsAuthorization resource describes a way to perform domain authorization +// for certificate issuance. +message DnsAuthorization { + option (google.api.resource) = { + type: "certificatemanager.googleapis.com/DnsAuthorization" + pattern: "projects/{project}/locations/{location}/dnsAuthorizations/{dns_authorization}" + }; + + // The structure describing the DNS Resource Record that needs to be added + // to DNS configuration for the authorization to be usable by + // certificate. + message DnsResourceRecord { + // Output only. Fully qualified name of the DNS Resource Record. + // e.g. `_acme-challenge.example.com` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of the DNS Resource Record. + // Currently always set to "CNAME". + string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Data of the DNS Resource Record. + string data = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // A user-defined name of the dns authorization. DnsAuthorization names must + // be unique globally and match pattern + // `projects/*/locations/*/dnsAuthorizations/*`. + string name = 1; + + // Output only. The creation timestamp of a DnsAuthorization. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of a DnsAuthorization. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Set of labels associated with a DnsAuthorization. + map labels = 4; + + // One or more paragraphs of text description of a DnsAuthorization. + string description = 5; + + // Required. Immutable. A domain which is being authorized. A DnsAuthorization resource covers a + // single domain and its wildcard, e.g. authorization for `example.com` can + // be used to issue certificates for `example.com` and `*.example.com`. + string domain = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Output only. DNS Resource Record that needs to be added to DNS configuration. + DnsResourceRecord dns_resource_record = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Defines set of serving states associated with a resource. +enum ServingState { + // The status is undefined. + SERVING_STATE_UNSPECIFIED = 0; + + // The configuration is serving. + ACTIVE = 1; + + // Update is in progress. Some frontends may serve this configuration. + PENDING = 2; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..e809247 --- /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-certificate-manager", + "^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..904ed95 --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + -install-without-bom + jar + Google Certificate Manager Install Without Bom + https://github.com/googleapis/java-certificate-manager + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-certificate-manager + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/samples/pom.xml b/samples/pom.xml new file mode 100644 index 0000000..f85e16b --- /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 Certificate Manager Samples Parent + https://github.com/googleapis/java-certificate-manager + + 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.8 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 0000000..fbcb8d7 --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + -snapshot + jar + Google Certificate Manager Snapshot Samples + https://github.com/googleapis/java-certificate-manager + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-certificate-manager + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 0000000..80ba97b --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + -snippets + jar + Google Certificate Manager Snippets + https://github.com/googleapis/java-certificate-manager + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-certificate-manager + 0.0.0 + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + diff --git a/versions.txt b/versions.txt new file mode 100644 index 0000000..8ef8ae7 --- /dev/null +++ b/versions.txt @@ -0,0 +1,6 @@ +# Format: +# module:released-version:current-version + +google-cloud-certificate-manager:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-certificate-manager-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-certificate-manager-v1:0.0.0:0.0.1-SNAPSHOT