From 5154f6f0dcbee23db2d429f9ed6296b971cd8f5e Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Thu, 23 Sep 2021 14:39:34 -0400 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 | 7 + .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 | 47 + .github/trusted-contribution.yml | 3 + .github/workflows/approve-readme.yaml | 54 + .github/workflows/auto-release.yaml | 88 + .github/workflows/ci.yaml | 81 + .github/workflows/samples.yaml | 14 + .gitignore | 17 + .kokoro/build.bat | 3 + .kokoro/build.sh | 125 + .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 | 91 + .kokoro/nightly/common.cfg | 25 + .kokoro/nightly/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/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 | 67 + .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 | 139 + LICENSE | 201 + README.md | 202 + SECURITY.md | 7 + codecov.yaml | 4 + google-cloud-deploy-bom/pom.xml | 94 + google-cloud-deploy/pom.xml | 111 + .../cloud/deploy/v1/CloudDeployClient.java | 2819 +++++++ .../cloud/deploy/v1/CloudDeploySettings.java | 482 ++ .../cloud/deploy/v1/gapic_metadata.json | 72 + .../google/cloud/deploy/v1/package-info.java | 40 + .../cloud/deploy/v1/stub/CloudDeployStub.java | 210 + .../v1/stub/CloudDeployStubSettings.java | 1358 ++++ .../stub/GrpcCloudDeployCallableFactory.java | 113 + .../deploy/v1/stub/GrpcCloudDeployStub.java | 861 +++ .../deploy/v1/CloudDeployClientTest.java | 1846 +++++ .../cloud/deploy/v1/MockCloudDeploy.java | 59 + .../cloud/deploy/v1/MockCloudDeployImpl.java | 436 ++ grpc-google-cloud-deploy-v1/pom.xml | 69 + .../cloud/deploy/v1/CloudDeployGrpc.java | 2294 ++++++ java.header | 15 + license-checks.xml | 10 + owlbot.py | 24 + pom.xml | 188 + .../clirr-ignored-differences.xml | 19 + proto-google-cloud-deploy-v1/pom.xml | 46 + .../deploy/v1/ApproveRolloutRequest.java | 753 ++ .../v1/ApproveRolloutRequestOrBuilder.java | 71 + .../deploy/v1/ApproveRolloutResponse.java | 456 ++ .../v1/ApproveRolloutResponseOrBuilder.java | 24 + .../google/cloud/deploy/v1/BuildArtifact.java | 826 ++ .../deploy/v1/BuildArtifactOrBuilder.java | 79 + .../cloud/deploy/v1/CloudDeployProto.java | 1125 +++ .../com/google/cloud/deploy/v1/Config.java | 1373 ++++ .../google/cloud/deploy/v1/ConfigName.java | 192 + .../cloud/deploy/v1/ConfigOrBuilder.java | 139 + .../v1/CreateDeliveryPipelineRequest.java | 1482 ++++ ...reateDeliveryPipelineRequestOrBuilder.java | 181 + .../cloud/deploy/v1/CreateReleaseRequest.java | 1471 ++++ .../v1/CreateReleaseRequestOrBuilder.java | 180 + .../cloud/deploy/v1/CreateRolloutRequest.java | 1471 ++++ .../v1/CreateRolloutRequestOrBuilder.java | 180 + .../cloud/deploy/v1/CreateTargetRequest.java | 1464 ++++ .../v1/CreateTargetRequestOrBuilder.java | 180 + .../google/cloud/deploy/v1/DefaultPool.java | 847 ++ .../cloud/deploy/v1/DefaultPoolOrBuilder.java | 85 + .../v1/DeleteDeliveryPipelineRequest.java | 1386 ++++ ...eleteDeliveryPipelineRequestOrBuilder.java | 173 + .../cloud/deploy/v1/DeleteTargetRequest.java | 1285 ++++ .../v1/DeleteTargetRequestOrBuilder.java | 158 + .../cloud/deploy/v1/DeliveryPipeline.java | 3189 ++++++++ .../cloud/deploy/v1/DeliveryPipelineName.java | 227 + .../deploy/v1/DeliveryPipelineOrBuilder.java | 436 ++ .../cloud/deploy/v1/ExecutionConfig.java | 1791 +++++ .../deploy/v1/ExecutionConfigOrBuilder.java | 184 + .../cloud/deploy/v1/GetConfigRequest.java | 648 ++ .../deploy/v1/GetConfigRequestOrBuilder.java | 54 + .../deploy/v1/GetDeliveryPipelineRequest.java | 658 ++ .../GetDeliveryPipelineRequestOrBuilder.java | 56 + .../cloud/deploy/v1/GetReleaseRequest.java | 655 ++ .../deploy/v1/GetReleaseRequestOrBuilder.java | 56 + .../cloud/deploy/v1/GetRolloutRequest.java | 655 ++ .../deploy/v1/GetRolloutRequestOrBuilder.java | 56 + .../cloud/deploy/v1/GetTargetRequest.java | 655 ++ .../deploy/v1/GetTargetRequestOrBuilder.java | 56 + .../google/cloud/deploy/v1/GkeCluster.java | 639 ++ .../cloud/deploy/v1/GkeClusterOrBuilder.java | 52 + .../v1/ListDeliveryPipelinesRequest.java | 1325 ++++ ...ListDeliveryPipelinesRequestOrBuilder.java | 155 + .../v1/ListDeliveryPipelinesResponse.java | 1426 ++++ ...istDeliveryPipelinesResponseOrBuilder.java | 155 + .../cloud/deploy/v1/ListReleasesRequest.java | 1311 ++++ .../v1/ListReleasesRequestOrBuilder.java | 152 + .../cloud/deploy/v1/ListReleasesResponse.java | 1409 ++++ .../v1/ListReleasesResponseOrBuilder.java | 154 + .../cloud/deploy/v1/ListRolloutsRequest.java | 1311 ++++ .../v1/ListRolloutsRequestOrBuilder.java | 152 + .../cloud/deploy/v1/ListRolloutsResponse.java | 1409 ++++ .../v1/ListRolloutsResponseOrBuilder.java | 154 + .../cloud/deploy/v1/ListTargetsRequest.java | 1318 ++++ .../v1/ListTargetsRequestOrBuilder.java | 154 + .../cloud/deploy/v1/ListTargetsResponse.java | 1407 ++++ .../v1/ListTargetsResponseOrBuilder.java | 154 + .../google/cloud/deploy/v1/LocationName.java | 192 + .../cloud/deploy/v1/OperationMetadata.java | 1846 +++++ .../deploy/v1/OperationMetadataOrBuilder.java | 217 + .../cloud/deploy/v1/PipelineCondition.java | 1025 +++ .../deploy/v1/PipelineConditionOrBuilder.java | 95 + .../deploy/v1/PipelineReadyCondition.java | 832 ++ .../v1/PipelineReadyConditionOrBuilder.java | 76 + .../google/cloud/deploy/v1/PrivatePool.java | 1047 +++ .../cloud/deploy/v1/PrivatePoolOrBuilder.java | 116 + .../com/google/cloud/deploy/v1/Release.java | 6843 +++++++++++++++++ .../google/cloud/deploy/v1/ReleaseName.java | 269 + .../cloud/deploy/v1/ReleaseOrBuilder.java | 804 ++ .../com/google/cloud/deploy/v1/Rollout.java | 4771 ++++++++++++ .../google/cloud/deploy/v1/RolloutName.java | 298 + .../cloud/deploy/v1/RolloutOrBuilder.java | 620 ++ .../cloud/deploy/v1/SerialPipeline.java | 966 +++ .../deploy/v1/SerialPipelineOrBuilder.java | 81 + .../cloud/deploy/v1/SkaffoldVersion.java | 899 +++ .../deploy/v1/SkaffoldVersionOrBuilder.java | 85 + .../com/google/cloud/deploy/v1/Stage.java | 958 +++ .../cloud/deploy/v1/StageOrBuilder.java | 115 + .../com/google/cloud/deploy/v1/Target.java | 3791 +++++++++ .../cloud/deploy/v1/TargetArtifact.java | 1141 +++ .../deploy/v1/TargetArtifactOrBuilder.java | 120 + .../google/cloud/deploy/v1/TargetName.java | 223 + .../cloud/deploy/v1/TargetOrBuilder.java | 517 ++ .../deploy/v1/TargetsPresentCondition.java | 1114 +++ .../v1/TargetsPresentConditionOrBuilder.java | 128 + .../v1/UpdateDeliveryPipelineRequest.java | 1529 ++++ ...pdateDeliveryPipelineRequestOrBuilder.java | 189 + .../cloud/deploy/v1/UpdateTargetRequest.java | 1504 ++++ .../v1/UpdateTargetRequestOrBuilder.java | 186 + .../google/cloud/deploy/v1/cloud_deploy.proto | 1390 ++++ renovate.json | 77 + samples/install-without-bom/pom.xml | 84 + samples/pom.xml | 56 + samples/snapshot/pom.xml | 83 + samples/snippets/pom.xml | 47 + versions.txt | 6 + 189 files changed, 85719 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.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/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 codecov.yaml create mode 100644 google-cloud-deploy-bom/pom.xml create mode 100644 google-cloud-deploy/pom.xml create mode 100644 google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java create mode 100644 google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java create mode 100644 google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json create mode 100644 google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/package-info.java create mode 100644 google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java create mode 100644 google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java create mode 100644 google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployCallableFactory.java create mode 100644 google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java create mode 100644 google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java create mode 100644 google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeploy.java create mode 100644 google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java create mode 100644 grpc-google-cloud-deploy-v1/pom.xml create mode 100644 grpc-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.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-deploy-v1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-deploy-v1/pom.xml create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponse.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponseOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifact.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifactOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Config.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ConfigName.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ConfigOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPool.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPoolOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineName.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfig.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfigOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeClusterOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponse.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponseOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponse.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponseOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponse.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponseOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponse.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponseOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/LocationName.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadata.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadataOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineCondition.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineConditionOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyCondition.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyConditionOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePool.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePoolOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseName.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutName.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipeline.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipelineOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersion.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersionOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Stage.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StageOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifact.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifactOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetName.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentConditionOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequest.java create mode 100644 proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequestOrBuilder.java create mode 100644 proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.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..84cdfa1 --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + digest: sha256:db1616f2f70823d8381d859835229e04371d14f59ac78063c5af73c55c3fffbb + image: gcr.io/repo-automation-bots/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..c4f4c96 --- /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/repo-automation-bots/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/deploy/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/$1/proto-google-cloud-deploy-$1/src" +- source: "/google/cloud/deploy/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/$1/grpc-google-cloud-deploy-$1/src" +- source: "/google/cloud/deploy/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/$1/google-cloud-deploy/src" \ No newline at end of file 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..30ae4be --- /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-deploy/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. deploy 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..004e542 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-deploy/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # ☕️ diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 0000000..1a23ea4 --- /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/master/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..1e6162b --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,47 @@ + +# 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 master branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `master` +- pattern: master + # 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" +# 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..7513aca --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,54 @@ +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@v3 + 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..9b4fd4d --- /dev/null +++ b/.github/workflows/auto-release.yaml @@ -0,0 +1,88 @@ +on: + pull_request: +name: auto-release +jobs: + approve: + runs-on: ubuntu-latest + if: contains(github.head_ref, 'release-please') + steps: + - uses: actions/github-script@v3 + 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: release " + if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + return; + } + + // only approve PRs with pom.xml and versions.txt changes + const filesPromise = github.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.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.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.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..3becb5c --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,81 @@ +on: + push: + branches: + - master + pull_request: +name: ci +jobs: + units: + runs-on: ubuntu-latest + strategy: + matrix: + java: [8, 11] + steps: + - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.bat + env: + JOB_TYPE: test + dependencies: + runs-on: ubuntu-latest + strategy: + matrix: + java: [8, 11] + steps: + - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/dependencies.sh + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: lint + clirr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 + - uses: actions/setup-java@v1 + with: + 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..c46230a --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,14 @@ +on: + pull_request: +name: samples +jobs: + checkstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + 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..05826ad --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,3 @@ +:: See documentation in type-shell-output.bat + +"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 0000000..ec16ea8 --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,125 @@ +#!/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 -Dclirr.skip=true -Denforcer.skip=true + RETURN_CODE=$? + ;; +lint) + mvn com.coveo:fmt-maven-plugin:check + RETURN_CODE=$? + ;; +javadoc) + mvn javadoc:javadoc javadoc:test-javadoc + RETURN_CODE=$? + ;; +integration) + mvn -B ${INTEGRATION_TEST_ARGS} \ + -ntp \ + -Penable-integration-tests \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + 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 \ + -Penable-samples \ + -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 -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-deploy +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..a5bb379 --- /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-deploy/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-deploy/.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..8fd313c --- /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-deploy/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-deploy/.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..9030ba8 --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,91 @@ +#!/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 + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" + +# 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..8fd313c --- /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-deploy/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-deploy/.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.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..aa6c63c --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-deploy/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 0000000..5dffb75 --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-deploy/.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..4108788 --- /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-deploy/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-deploy/.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..e226dd4 --- /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-deploy/.kokoro/dependencies.sh" +} 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..aa6c63c --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-deploy/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 0000000..5dffb75 --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-deploy/.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..f5d4460 --- /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-deploy/.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..c4ceb84 --- /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-deploy + +# 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-deploy \ + --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..1867cc7 --- /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-deploy/.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-deploy/.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..44732b0 --- /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-deploy/.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..33f46e4 --- /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-deploy/.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..5ae5579 --- /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-deploy/.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..b1e83a7 --- /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-deploy/.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..53ff51b --- /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-deploy +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..67dcd75 --- /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-deploy/.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..6f4a8d3 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,67 @@ +#!/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-deploy +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# V3 generates docfx yml from javadoc +# generate yml +mvn clean site -B -q -P docFX + +# copy README to docfx-yml dir and rename index.md +cp README.md target/docfx-yml/index.md +# copy CHANGELOG to docfx-yml dir and rename history.md +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..0194e02 --- /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-deploy/.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..756ab9d --- /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-deploy/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-deploy/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-deploy" + } +} + +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..edea75b --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "name": "deploy", + "name_pretty": "Google CLoud Deploy", + "product_documentation": "https://cloud.google.com/deploy/docs", + "api_description": "is a service that automates delivery of your applications to a series of target environments in a defined sequence", + "client_documentation": "https://googleapis.dev/java/google-cloud-deploy/latest/index.html", + "release_level": "beta", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-deploy", + "repo_short": "java-deploy", + "distribution_name": "com.google.cloud:google-cloud-deploy", + "api_id": "deploy.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..f2dbdee --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,139 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). + +## Building the project + +To build, package, and run all unit tests run the command + +``` +mvn clean verify +``` + +### Running Integration tests + +To include integration tests when building the project, you need access to +a GCP Project with a valid service account. + +For instructions on how to generate a service account and corresponding +credentials JSON see: [Creating a Service Account][1]. + +Then run the following to build, package, run all unit tests and run all +integration tests. + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-integration-tests clean verify +``` + +## Code Samples + +Code Samples must be bundled in separate Maven modules, and guarded by a +Maven profile with the name `enable-samples`. + +The samples must be separate from the primary project for a few reasons: +1. Primary projects have a minimum Java version of Java 7 whereas samples have + a minimum Java version of Java 8. Due to this we need the ability to + selectively exclude samples from a build run. +2. Many code samples depend on external GCP services and need + credentials to access the service. +3. Code samples are not released as Maven artifacts and must be excluded from + release builds. + +### Building + +```bash +mvn -Penable-samples clean verify +``` + +Some samples require access to GCP services and require a service account: + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-samples clean verify +``` + +### Profile Config + +1. To add samples in a profile to your Maven project, add the following to your +`pom.xml` + + ```xml + + [...] + + + enable-samples + + sample + + + + [...] + + ``` + +2. [Activate](#profile-activation) the profile. +3. Define your samples in a normal Maven project in the `samples/` directory. + +### 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 +``` + +### Profile Activation + +To include code samples when building and testing the project, enable the +`enable-samples` Maven profile. + +#### Command line + +To activate the Maven profile on the command line add `-Penable-samples` to your +Maven command. + +#### Maven `settings.xml` + +To activate the Maven profile in your `~/.m2/settings.xml` add an entry of +`enable-samples` following the instructions in [Active Profiles][2]. + +This method has the benefit of applying to all projects you build (and is +respected by IntelliJ IDEA) and is recommended if you are going to be +contributing samples to several projects. + +#### IntelliJ IDEA + +To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in +[Activate Maven profiles][3] to activate `enable-samples`. + +[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account +[2]: https://maven.apache.org/settings.html#Active_Profiles +[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles diff --git a/LICENSE b/LICENSE new file mode 100644 index 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..9bc7161 --- /dev/null +++ b/README.md @@ -0,0 +1,202 @@ +# Google Google CLoud Deploy Client for Java + +Java idiomatic client for [Google CLoud Deploy][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-deploy + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies + +```Groovy +implementation 'com.google.cloud:google-cloud-deploy:0.0.0' +``` + +If you are using SBT, add this to your dependencies + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-deploy" % "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 Google CLoud Deploy APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Google CLoud Deploy API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Google CLoud Deploy [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Google CLoud Deploy. +[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-deploy` library. See the [Quickstart](#quickstart) section +to add `google-cloud-deploy` as a dependency in your code. + +## About Google CLoud Deploy + + +[Google CLoud Deploy][product-docs] is a service that automates delivery of your applications to a series of target environments in a defined sequence + +See the [Google CLoud Deploy client library docs][javadocs] to learn how to +use this Google CLoud Deploy Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Google CLoud Deploy uses gRPC for the transport layer. + +## Supported Java Versions + +Java 7 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 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/deploy/docs +[javadocs]: https://googleapis.dev/java/google-cloud-deploy/latest/index.html +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-deploy/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-deploy/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-deploy/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-deploy/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-deploy/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-deploy/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-deploy/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-deploy/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-deploy/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-deploy/java11.html +[stability-image]: https://img.shields.io/badge/stability-beta-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-deploy.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-deploy&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/master/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-deploy/blob/master/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-deploy/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-deploy/blob/master/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=deploy.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/codecov.yaml b/codecov.yaml new file mode 100644 index 0000000..5724ea9 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/google-cloud-deploy-bom/pom.xml b/google-cloud-deploy-bom/pom.xml new file mode 100644 index 0000000..df24636 --- /dev/null +++ b/google-cloud-deploy-bom/pom.xml @@ -0,0 +1,94 @@ + + + 4.0.0 + com.google.cloud + google-cloud-deploy-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 1.0.0 + + + Google Google CLoud Deploy BOM + https://github.com/googleapis/java-deploy + + BOM for Google CLoud Deploy + + + + 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-deploy.git + scm:git:git@github.com:googleapis/java-deploy.git + https://github.com/googleapis/java-deploy + + + + true + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + com.google.cloud + google-cloud-deploy + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-deploy-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-deploy-v1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + diff --git a/google-cloud-deploy/pom.xml b/google-cloud-deploy/pom.xml new file mode 100644 index 0000000..927f821 --- /dev/null +++ b/google-cloud-deploy/pom.xml @@ -0,0 +1,111 @@ + + + 4.0.0 + com.google.cloud + google-cloud-deploy + 0.0.1-SNAPSHOT + jar + Google Google CLoud Deploy + https://github.com/googleapis/java-deploy + Google CLoud Deploy is a service that automates delivery of your applications to a series of target environments in a defined sequence + + com.google.cloud + google-cloud-deploy-parent + 0.0.1-SNAPSHOT + + + google-cloud-deploy + + + + 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-deploy-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-deploy-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-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java new file mode 100644 index 0000000..4066e0e --- /dev/null +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java @@ -0,0 +1,2819 @@ +/* + * 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.deploy.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.deploy.v1.stub.CloudDeployStub; +import com.google.cloud.deploy.v1.stub.CloudDeployStubSettings; +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: CloudDeploy service creates and manages Continuous Delivery operations on + * Google Cloud Platform via Skaffold (https://skaffold.dev). + * + *

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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ *   DeliveryPipelineName name =
+ *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+ *   DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(name);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * CloudDeploySettings cloudDeploySettings =
+ *     CloudDeploySettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CloudDeployClient cloudDeployClient = CloudDeployClient.create(cloudDeploySettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * CloudDeploySettings cloudDeploySettings =
+ *     CloudDeploySettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CloudDeployClient cloudDeployClient = CloudDeployClient.create(cloudDeploySettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (DeliveryPipeline element :
+   *       cloudDeployClient.listDeliveryPipelines(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of pipelines. Format must be + * projects/{project_id}/locations/{location_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeliveryPipelinesPagedResponse listDeliveryPipelines(LocationName parent) { + ListDeliveryPipelinesRequest request = + ListDeliveryPipelinesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDeliveryPipelines(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DeliveryPipelines in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String parent =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+   *   for (DeliveryPipeline element :
+   *       cloudDeployClient.listDeliveryPipelines(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of pipelines. Format must be + * projects/{project_id}/locations/{location_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeliveryPipelinesPagedResponse listDeliveryPipelines(String parent) { + ListDeliveryPipelinesRequest request = + ListDeliveryPipelinesRequest.newBuilder().setParent(parent).build(); + return listDeliveryPipelines(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DeliveryPipelines in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ListDeliveryPipelinesRequest request =
+   *       ListDeliveryPipelinesRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (DeliveryPipeline element :
+   *       cloudDeployClient.listDeliveryPipelines(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 ListDeliveryPipelinesPagedResponse listDeliveryPipelines( + ListDeliveryPipelinesRequest request) { + return listDeliveryPipelinesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DeliveryPipelines in a given project and location. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   DeliveryPipelineName name =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+   *   DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `DeliveryPipeline`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeliveryPipeline getDeliveryPipeline(DeliveryPipelineName name) { + GetDeliveryPipelineRequest request = + GetDeliveryPipelineRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDeliveryPipeline(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String name =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+   *   DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `DeliveryPipeline`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeliveryPipeline getDeliveryPipeline(String name) { + GetDeliveryPipelineRequest request = + GetDeliveryPipelineRequest.newBuilder().setName(name).build(); + return getDeliveryPipeline(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetDeliveryPipelineRequest request =
+   *       GetDeliveryPipelineRequest.newBuilder()
+   *           .setName(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .build();
+   *   DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(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 DeliveryPipeline getDeliveryPipeline(GetDeliveryPipelineRequest request) { + return getDeliveryPipelineCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetDeliveryPipelineRequest request =
+   *       GetDeliveryPipelineRequest.newBuilder()
+   *           .setName(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.getDeliveryPipelineCallable().futureCall(request);
+   *   // Do something.
+   *   DeliveryPipeline response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getDeliveryPipelineCallable() { + return stub.getDeliveryPipelineCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DeliveryPipeline in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build();
+   *   String deliveryPipelineId = "deliveryPipelineId-632411535";
+   *   DeliveryPipeline response =
+   *       cloudDeployClient
+   *           .createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent collection in which the `DeliveryPipeline` should be + * created. Format should be projects/{project_id}/locations/{location_name}. + * @param deliveryPipeline Required. The `DeliveryPipeline` to create. + * @param deliveryPipelineId Required. ID of the `DeliveryPipeline`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDeliveryPipelineAsync( + LocationName parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId) { + CreateDeliveryPipelineRequest request = + CreateDeliveryPipelineRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDeliveryPipeline(deliveryPipeline) + .setDeliveryPipelineId(deliveryPipelineId) + .build(); + return createDeliveryPipelineAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DeliveryPipeline in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String parent =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+   *   DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build();
+   *   String deliveryPipelineId = "deliveryPipelineId-632411535";
+   *   DeliveryPipeline response =
+   *       cloudDeployClient
+   *           .createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent collection in which the `DeliveryPipeline` should be + * created. Format should be projects/{project_id}/locations/{location_name}. + * @param deliveryPipeline Required. The `DeliveryPipeline` to create. + * @param deliveryPipelineId Required. ID of the `DeliveryPipeline`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDeliveryPipelineAsync( + String parent, DeliveryPipeline deliveryPipeline, String deliveryPipelineId) { + CreateDeliveryPipelineRequest request = + CreateDeliveryPipelineRequest.newBuilder() + .setParent(parent) + .setDeliveryPipeline(deliveryPipeline) + .setDeliveryPipelineId(deliveryPipelineId) + .build(); + return createDeliveryPipelineAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DeliveryPipeline in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateDeliveryPipelineRequest request =
+   *       CreateDeliveryPipelineRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setDeliveryPipelineId("deliveryPipelineId-632411535")
+   *           .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   DeliveryPipeline response = cloudDeployClient.createDeliveryPipelineAsync(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 createDeliveryPipelineAsync( + CreateDeliveryPipelineRequest request) { + return createDeliveryPipelineOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DeliveryPipeline in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateDeliveryPipelineRequest request =
+   *       CreateDeliveryPipelineRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setDeliveryPipelineId("deliveryPipelineId-632411535")
+   *           .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cloudDeployClient.createDeliveryPipelineOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DeliveryPipeline response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createDeliveryPipelineOperationCallable() { + return stub.createDeliveryPipelineOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new DeliveryPipeline in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateDeliveryPipelineRequest request =
+   *       CreateDeliveryPipelineRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setDeliveryPipelineId("deliveryPipelineId-632411535")
+   *           .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.createDeliveryPipelineCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createDeliveryPipelineCallable() { + return stub.createDeliveryPipelineCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DeliveryPipeline response =
+   *       cloudDeployClient.updateDeliveryPipelineAsync(deliveryPipeline, updateMask).get();
+   * }
+   * }
+ * + * @param deliveryPipeline Required. The `DeliveryPipeline` to update. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `DeliveryPipeline` resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateDeliveryPipelineAsync( + DeliveryPipeline deliveryPipeline, FieldMask updateMask) { + UpdateDeliveryPipelineRequest request = + UpdateDeliveryPipelineRequest.newBuilder() + .setDeliveryPipeline(deliveryPipeline) + .setUpdateMask(updateMask) + .build(); + return updateDeliveryPipelineAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   UpdateDeliveryPipelineRequest request =
+   *       UpdateDeliveryPipelineRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   DeliveryPipeline response = cloudDeployClient.updateDeliveryPipelineAsync(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 updateDeliveryPipelineAsync( + UpdateDeliveryPipelineRequest request) { + return updateDeliveryPipelineOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   UpdateDeliveryPipelineRequest request =
+   *       UpdateDeliveryPipelineRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cloudDeployClient.updateDeliveryPipelineOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DeliveryPipeline response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateDeliveryPipelineOperationCallable() { + return stub.updateDeliveryPipelineOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   UpdateDeliveryPipelineRequest request =
+   *       UpdateDeliveryPipelineRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.updateDeliveryPipelineCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateDeliveryPipelineCallable() { + return stub.updateDeliveryPipelineCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   DeliveryPipelineName name =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+   *   cloudDeployClient.deleteDeliveryPipelineAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the `DeliveryPipeline` to delete. Format should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDeliveryPipelineAsync( + DeliveryPipelineName name) { + DeleteDeliveryPipelineRequest request = + DeleteDeliveryPipelineRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteDeliveryPipelineAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String name =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+   *   cloudDeployClient.deleteDeliveryPipelineAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the `DeliveryPipeline` to delete. Format should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDeliveryPipelineAsync(String name) { + DeleteDeliveryPipelineRequest request = + DeleteDeliveryPipelineRequest.newBuilder().setName(name).build(); + return deleteDeliveryPipelineAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   DeleteDeliveryPipelineRequest request =
+   *       DeleteDeliveryPipelineRequest.newBuilder()
+   *           .setName(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   cloudDeployClient.deleteDeliveryPipelineAsync(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 deleteDeliveryPipelineAsync( + DeleteDeliveryPipelineRequest request) { + return deleteDeliveryPipelineOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   DeleteDeliveryPipelineRequest request =
+   *       DeleteDeliveryPipelineRequest.newBuilder()
+   *           .setName(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudDeployClient.deleteDeliveryPipelineOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteDeliveryPipelineOperationCallable() { + return stub.deleteDeliveryPipelineOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single DeliveryPipeline. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   DeleteDeliveryPipelineRequest request =
+   *       DeleteDeliveryPipelineRequest.newBuilder()
+   *           .setName(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.deleteDeliveryPipelineCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteDeliveryPipelineCallable() { + return stub.deleteDeliveryPipelineCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Targets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Target element : cloudDeployClient.listTargets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of targets. Format must be + * projects/{project_id}/locations/{location_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTargetsPagedResponse listTargets(LocationName parent) { + ListTargetsRequest request = + ListTargetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTargets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Targets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String parent = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString();
+   *   for (Target element : cloudDeployClient.listTargets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of targets. Format must be + * projects/{project_id}/locations/{location_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTargetsPagedResponse listTargets(String parent) { + ListTargetsRequest request = ListTargetsRequest.newBuilder().setParent(parent).build(); + return listTargets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Targets in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ListTargetsRequest request =
+   *       ListTargetsRequest.newBuilder()
+   *           .setParent(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Target element : cloudDeployClient.listTargets(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 ListTargetsPagedResponse listTargets(ListTargetsRequest request) { + return listTargetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Targets in a given project and location. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   TargetName name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]");
+   *   Target response = cloudDeployClient.getTarget(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `Target`. Format must be + * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Target getTarget(TargetName name) { + GetTargetRequest request = + GetTargetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTarget(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString();
+   *   Target response = cloudDeployClient.getTarget(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `Target`. Format must be + * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Target getTarget(String name) { + GetTargetRequest request = GetTargetRequest.newBuilder().setName(name).build(); + return getTarget(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetTargetRequest request =
+   *       GetTargetRequest.newBuilder()
+   *           .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
+   *           .build();
+   *   Target response = cloudDeployClient.getTarget(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 Target getTarget(GetTargetRequest request) { + return getTargetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetTargetRequest request =
+   *       GetTargetRequest.newBuilder()
+   *           .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.getTargetCallable().futureCall(request);
+   *   // Do something.
+   *   Target response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getTargetCallable() { + return stub.getTargetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Target in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Target target = Target.newBuilder().build();
+   *   String targetId = "targetId-441951604";
+   *   Target response = cloudDeployClient.createTargetAsync(parent, target, targetId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent collection in which the `Target` should be created. Format + * should be projects/{project_id}/locations/{location_name}. + * @param target Required. The `Target` to create. + * @param targetId Required. ID of the `Target`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createTargetAsync( + LocationName parent, Target target, String targetId) { + CreateTargetRequest request = + CreateTargetRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTarget(target) + .setTargetId(targetId) + .build(); + return createTargetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Target in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String parent = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString();
+   *   Target target = Target.newBuilder().build();
+   *   String targetId = "targetId-441951604";
+   *   Target response = cloudDeployClient.createTargetAsync(parent, target, targetId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent collection in which the `Target` should be created. Format + * should be projects/{project_id}/locations/{location_name}. + * @param target Required. The `Target` to create. + * @param targetId Required. ID of the `Target`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createTargetAsync( + String parent, Target target, String targetId) { + CreateTargetRequest request = + CreateTargetRequest.newBuilder() + .setParent(parent) + .setTarget(target) + .setTargetId(targetId) + .build(); + return createTargetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Target in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateTargetRequest request =
+   *       CreateTargetRequest.newBuilder()
+   *           .setParent(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
+   *           .setTargetId("targetId-441951604")
+   *           .setTarget(Target.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   Target response = cloudDeployClient.createTargetAsync(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 createTargetAsync( + CreateTargetRequest request) { + return createTargetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Target in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateTargetRequest request =
+   *       CreateTargetRequest.newBuilder()
+   *           .setParent(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
+   *           .setTargetId("targetId-441951604")
+   *           .setTarget(Target.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cloudDeployClient.createTargetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Target response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createTargetOperationCallable() { + return stub.createTargetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Target in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateTargetRequest request =
+   *       CreateTargetRequest.newBuilder()
+   *           .setParent(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
+   *           .setTargetId("targetId-441951604")
+   *           .setTarget(Target.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.createTargetCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createTargetCallable() { + return stub.createTargetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   Target target = Target.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Target response = cloudDeployClient.updateTargetAsync(target, updateMask).get();
+   * }
+   * }
+ * + * @param target Required. The `Target` to update. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Target resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateTargetAsync( + Target target, FieldMask updateMask) { + UpdateTargetRequest request = + UpdateTargetRequest.newBuilder().setTarget(target).setUpdateMask(updateMask).build(); + return updateTargetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   UpdateTargetRequest request =
+   *       UpdateTargetRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setTarget(Target.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   Target response = cloudDeployClient.updateTargetAsync(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 updateTargetAsync( + UpdateTargetRequest request) { + return updateTargetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   UpdateTargetRequest request =
+   *       UpdateTargetRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setTarget(Target.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cloudDeployClient.updateTargetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Target response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateTargetOperationCallable() { + return stub.updateTargetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   UpdateTargetRequest request =
+   *       UpdateTargetRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setTarget(Target.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.updateTargetCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateTargetCallable() { + return stub.updateTargetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   TargetName name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]");
+   *   cloudDeployClient.deleteTargetAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the `Target` to delete. Format should be + * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteTargetAsync(TargetName name) { + DeleteTargetRequest request = + DeleteTargetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteTargetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString();
+   *   cloudDeployClient.deleteTargetAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the `Target` to delete. Format should be + * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteTargetAsync(String name) { + DeleteTargetRequest request = DeleteTargetRequest.newBuilder().setName(name).build(); + return deleteTargetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   DeleteTargetRequest request =
+   *       DeleteTargetRequest.newBuilder()
+   *           .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   cloudDeployClient.deleteTargetAsync(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 deleteTargetAsync( + DeleteTargetRequest request) { + return deleteTargetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   DeleteTargetRequest request =
+   *       DeleteTargetRequest.newBuilder()
+   *           .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudDeployClient.deleteTargetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteTargetOperationCallable() { + return stub.deleteTargetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Target. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   DeleteTargetRequest request =
+   *       DeleteTargetRequest.newBuilder()
+   *           .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.deleteTargetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteTargetCallable() { + return stub.deleteTargetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Releases in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   DeliveryPipelineName parent =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+   *   for (Release element : cloudDeployClient.listReleases(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The `DeliveryPipeline` which owns this collection of `Release` objects. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReleasesPagedResponse listReleases(DeliveryPipelineName parent) { + ListReleasesRequest request = + ListReleasesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listReleases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Releases in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String parent =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+   *   for (Release element : cloudDeployClient.listReleases(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The `DeliveryPipeline` which owns this collection of `Release` objects. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReleasesPagedResponse listReleases(String parent) { + ListReleasesRequest request = ListReleasesRequest.newBuilder().setParent(parent).build(); + return listReleases(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Releases in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ListReleasesRequest request =
+   *       ListReleasesRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Release element : cloudDeployClient.listReleases(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 ListReleasesPagedResponse listReleases(ListReleasesRequest request) { + return listReleasesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Releases in a given project and location. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ReleaseName name =
+   *       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]");
+   *   Release response = cloudDeployClient.getRelease(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `Release`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Release getRelease(ReleaseName name) { + GetReleaseRequest request = + GetReleaseRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRelease(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Release. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String name =
+   *       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
+   *   Release response = cloudDeployClient.getRelease(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `Release`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Release getRelease(String name) { + GetReleaseRequest request = GetReleaseRequest.newBuilder().setName(name).build(); + return getRelease(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Release. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetReleaseRequest request =
+   *       GetReleaseRequest.newBuilder()
+   *           .setName(
+   *               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
+   *                   .toString())
+   *           .build();
+   *   Release response = cloudDeployClient.getRelease(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 Release getRelease(GetReleaseRequest request) { + return getReleaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Release. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetReleaseRequest request =
+   *       GetReleaseRequest.newBuilder()
+   *           .setName(
+   *               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.getReleaseCallable().futureCall(request);
+   *   // Do something.
+   *   Release response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getReleaseCallable() { + return stub.getReleaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Release in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   DeliveryPipelineName parent =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+   *   Release release = Release.newBuilder().build();
+   *   String releaseId = "releaseId89607042";
+   *   Release response = cloudDeployClient.createReleaseAsync(parent, release, releaseId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent collection in which the `Release` should be created. Format + * should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * @param release Required. The `Release` to create. + * @param releaseId Required. ID of the `Release`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createReleaseAsync( + DeliveryPipelineName parent, Release release, String releaseId) { + CreateReleaseRequest request = + CreateReleaseRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRelease(release) + .setReleaseId(releaseId) + .build(); + return createReleaseAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Release in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String parent =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+   *   Release release = Release.newBuilder().build();
+   *   String releaseId = "releaseId89607042";
+   *   Release response = cloudDeployClient.createReleaseAsync(parent, release, releaseId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent collection in which the `Release` should be created. Format + * should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * @param release Required. The `Release` to create. + * @param releaseId Required. ID of the `Release`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createReleaseAsync( + String parent, Release release, String releaseId) { + CreateReleaseRequest request = + CreateReleaseRequest.newBuilder() + .setParent(parent) + .setRelease(release) + .setReleaseId(releaseId) + .build(); + return createReleaseAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Release in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateReleaseRequest request =
+   *       CreateReleaseRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setReleaseId("releaseId89607042")
+   *           .setRelease(Release.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   Release response = cloudDeployClient.createReleaseAsync(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 createReleaseAsync( + CreateReleaseRequest request) { + return createReleaseOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Release in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateReleaseRequest request =
+   *       CreateReleaseRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setReleaseId("releaseId89607042")
+   *           .setRelease(Release.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cloudDeployClient.createReleaseOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Release response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createReleaseOperationCallable() { + return stub.createReleaseOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Release in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateReleaseRequest request =
+   *       CreateReleaseRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setReleaseId("releaseId89607042")
+   *           .setRelease(Release.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.createReleaseCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createReleaseCallable() { + return stub.createReleaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Approves a Rollout. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   RolloutName name =
+   *       RolloutName.of(
+   *           "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
+   *   ApproveRolloutResponse response = cloudDeployClient.approveRollout(name);
+   * }
+   * }
+ * + * @param name Required. Name of the Rollout. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}/rollouts/{rollout}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApproveRolloutResponse approveRollout(RolloutName name) { + ApproveRolloutRequest request = + ApproveRolloutRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return approveRollout(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Approves a Rollout. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String name =
+   *       RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
+   *           .toString();
+   *   ApproveRolloutResponse response = cloudDeployClient.approveRollout(name);
+   * }
+   * }
+ * + * @param name Required. Name of the Rollout. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}/rollouts/{rollout}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ApproveRolloutResponse approveRollout(String name) { + ApproveRolloutRequest request = ApproveRolloutRequest.newBuilder().setName(name).build(); + return approveRollout(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Approves a Rollout. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ApproveRolloutRequest request =
+   *       ApproveRolloutRequest.newBuilder()
+   *           .setName(
+   *               RolloutName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[DELIVERY_PIPELINE]",
+   *                       "[RELEASE]",
+   *                       "[ROLLOUT]")
+   *                   .toString())
+   *           .setApproved(true)
+   *           .build();
+   *   ApproveRolloutResponse response = cloudDeployClient.approveRollout(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 ApproveRolloutResponse approveRollout(ApproveRolloutRequest request) { + return approveRolloutCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Approves a Rollout. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ApproveRolloutRequest request =
+   *       ApproveRolloutRequest.newBuilder()
+   *           .setName(
+   *               RolloutName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[DELIVERY_PIPELINE]",
+   *                       "[RELEASE]",
+   *                       "[ROLLOUT]")
+   *                   .toString())
+   *           .setApproved(true)
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.approveRolloutCallable().futureCall(request);
+   *   // Do something.
+   *   ApproveRolloutResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + approveRolloutCallable() { + return stub.approveRolloutCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Rollouts in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ReleaseName parent =
+   *       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]");
+   *   for (Rollout element : cloudDeployClient.listRollouts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The `Release` which owns this collection of `Rollout` objects. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRolloutsPagedResponse listRollouts(ReleaseName parent) { + ListRolloutsRequest request = + ListRolloutsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRollouts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Rollouts in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String parent =
+   *       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
+   *   for (Rollout element : cloudDeployClient.listRollouts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The `Release` which owns this collection of `Rollout` objects. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRolloutsPagedResponse listRollouts(String parent) { + ListRolloutsRequest request = ListRolloutsRequest.newBuilder().setParent(parent).build(); + return listRollouts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Rollouts in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ListRolloutsRequest request =
+   *       ListRolloutsRequest.newBuilder()
+   *           .setParent(
+   *               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Rollout element : cloudDeployClient.listRollouts(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 ListRolloutsPagedResponse listRollouts(ListRolloutsRequest request) { + return listRolloutsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Rollouts in a given project and location. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   RolloutName name =
+   *       RolloutName.of(
+   *           "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
+   *   Rollout response = cloudDeployClient.getRollout(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `Rollout`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Rollout getRollout(RolloutName name) { + GetRolloutRequest request = + GetRolloutRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRollout(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Rollout. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String name =
+   *       RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
+   *           .toString();
+   *   Rollout response = cloudDeployClient.getRollout(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `Rollout`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Rollout getRollout(String name) { + GetRolloutRequest request = GetRolloutRequest.newBuilder().setName(name).build(); + return getRollout(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Rollout. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetRolloutRequest request =
+   *       GetRolloutRequest.newBuilder()
+   *           .setName(
+   *               RolloutName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[DELIVERY_PIPELINE]",
+   *                       "[RELEASE]",
+   *                       "[ROLLOUT]")
+   *                   .toString())
+   *           .build();
+   *   Rollout response = cloudDeployClient.getRollout(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 Rollout getRollout(GetRolloutRequest request) { + return getRolloutCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Rollout. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetRolloutRequest request =
+   *       GetRolloutRequest.newBuilder()
+   *           .setName(
+   *               RolloutName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[DELIVERY_PIPELINE]",
+   *                       "[RELEASE]",
+   *                       "[ROLLOUT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.getRolloutCallable().futureCall(request);
+   *   // Do something.
+   *   Rollout response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRolloutCallable() { + return stub.getRolloutCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Rollout in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ReleaseName parent =
+   *       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]");
+   *   Rollout rollout = Rollout.newBuilder().build();
+   *   String rolloutId = "rolloutId551248556";
+   *   Rollout response = cloudDeployClient.createRolloutAsync(parent, rollout, rolloutId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent collection in which the `Rollout` should be created. Format + * should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * @param rollout Required. The `Rollout` to create. + * @param rolloutId Required. ID of the `Rollout`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRolloutAsync( + ReleaseName parent, Rollout rollout, String rolloutId) { + CreateRolloutRequest request = + CreateRolloutRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRollout(rollout) + .setRolloutId(rolloutId) + .build(); + return createRolloutAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Rollout in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String parent =
+   *       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
+   *   Rollout rollout = Rollout.newBuilder().build();
+   *   String rolloutId = "rolloutId551248556";
+   *   Rollout response = cloudDeployClient.createRolloutAsync(parent, rollout, rolloutId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent collection in which the `Rollout` should be created. Format + * should be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * @param rollout Required. The `Rollout` to create. + * @param rolloutId Required. ID of the `Rollout`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRolloutAsync( + String parent, Rollout rollout, String rolloutId) { + CreateRolloutRequest request = + CreateRolloutRequest.newBuilder() + .setParent(parent) + .setRollout(rollout) + .setRolloutId(rolloutId) + .build(); + return createRolloutAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Rollout in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateRolloutRequest request =
+   *       CreateRolloutRequest.newBuilder()
+   *           .setParent(
+   *               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
+   *                   .toString())
+   *           .setRolloutId("rolloutId551248556")
+   *           .setRollout(Rollout.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   Rollout response = cloudDeployClient.createRolloutAsync(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 createRolloutAsync( + CreateRolloutRequest request) { + return createRolloutOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Rollout in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateRolloutRequest request =
+   *       CreateRolloutRequest.newBuilder()
+   *           .setParent(
+   *               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
+   *                   .toString())
+   *           .setRolloutId("rolloutId551248556")
+   *           .setRollout(Rollout.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cloudDeployClient.createRolloutOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Rollout response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createRolloutOperationCallable() { + return stub.createRolloutOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Rollout in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   CreateRolloutRequest request =
+   *       CreateRolloutRequest.newBuilder()
+   *           .setParent(
+   *               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
+   *                   .toString())
+   *           .setRolloutId("rolloutId551248556")
+   *           .setRollout(Rollout.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.createRolloutCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createRolloutCallable() { + return stub.createRolloutCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration for a location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ConfigName name = ConfigName.of("[PROJECT]", "[LOCATION]");
+   *   Config response = cloudDeployClient.getConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of requested configuration. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Config getConfig(ConfigName name) { + GetConfigRequest request = + GetConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration for a location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String name = ConfigName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Config response = cloudDeployClient.getConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of requested configuration. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Config getConfig(String name) { + GetConfigRequest request = GetConfigRequest.newBuilder().setName(name).build(); + return getConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration for a location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetConfigRequest request =
+   *       GetConfigRequest.newBuilder()
+   *           .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   Config response = cloudDeployClient.getConfig(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 Config getConfig(GetConfigRequest request) { + return getConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration for a location. + * + *

Sample code: + * + *

{@code
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetConfigRequest request =
+   *       GetConfigRequest.newBuilder()
+   *           .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.getConfigCallable().futureCall(request);
+   *   // Do something.
+   *   Config response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getConfigCallable() { + return stub.getConfigCallable(); + } + + @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 ListDeliveryPipelinesPagedResponse + extends AbstractPagedListResponse< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + DeliveryPipeline, + ListDeliveryPipelinesPage, + ListDeliveryPipelinesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDeliveryPipelinesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDeliveryPipelinesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDeliveryPipelinesPagedResponse(ListDeliveryPipelinesPage page) { + super(page, ListDeliveryPipelinesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDeliveryPipelinesPage + extends AbstractPage< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + DeliveryPipeline, + ListDeliveryPipelinesPage> { + + private ListDeliveryPipelinesPage( + PageContext + context, + ListDeliveryPipelinesResponse response) { + super(context, response); + } + + private static ListDeliveryPipelinesPage createEmptyPage() { + return new ListDeliveryPipelinesPage(null, null); + } + + @Override + protected ListDeliveryPipelinesPage createPage( + PageContext + context, + ListDeliveryPipelinesResponse response) { + return new ListDeliveryPipelinesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDeliveryPipelinesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + DeliveryPipeline, + ListDeliveryPipelinesPage, + ListDeliveryPipelinesFixedSizeCollection> { + + private ListDeliveryPipelinesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDeliveryPipelinesFixedSizeCollection createEmptyCollection() { + return new ListDeliveryPipelinesFixedSizeCollection(null, 0); + } + + @Override + protected ListDeliveryPipelinesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDeliveryPipelinesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTargetsPagedResponse + extends AbstractPagedListResponse< + ListTargetsRequest, + ListTargetsResponse, + Target, + ListTargetsPage, + ListTargetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTargetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListTargetsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListTargetsPagedResponse(ListTargetsPage page) { + super(page, ListTargetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTargetsPage + extends AbstractPage { + + private ListTargetsPage( + PageContext context, + ListTargetsResponse response) { + super(context, response); + } + + private static ListTargetsPage createEmptyPage() { + return new ListTargetsPage(null, null); + } + + @Override + protected ListTargetsPage createPage( + PageContext context, + ListTargetsResponse response) { + return new ListTargetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTargetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTargetsRequest, + ListTargetsResponse, + Target, + ListTargetsPage, + ListTargetsFixedSizeCollection> { + + private ListTargetsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTargetsFixedSizeCollection createEmptyCollection() { + return new ListTargetsFixedSizeCollection(null, 0); + } + + @Override + protected ListTargetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTargetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListReleasesPagedResponse + extends AbstractPagedListResponse< + ListReleasesRequest, + ListReleasesResponse, + Release, + ListReleasesPage, + ListReleasesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListReleasesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListReleasesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListReleasesPagedResponse(ListReleasesPage page) { + super(page, ListReleasesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListReleasesPage + extends AbstractPage { + + private ListReleasesPage( + PageContext context, + ListReleasesResponse response) { + super(context, response); + } + + private static ListReleasesPage createEmptyPage() { + return new ListReleasesPage(null, null); + } + + @Override + protected ListReleasesPage createPage( + PageContext context, + ListReleasesResponse response) { + return new ListReleasesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListReleasesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListReleasesRequest, + ListReleasesResponse, + Release, + ListReleasesPage, + ListReleasesFixedSizeCollection> { + + private ListReleasesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListReleasesFixedSizeCollection createEmptyCollection() { + return new ListReleasesFixedSizeCollection(null, 0); + } + + @Override + protected ListReleasesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListReleasesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListRolloutsPagedResponse + extends AbstractPagedListResponse< + ListRolloutsRequest, + ListRolloutsResponse, + Rollout, + ListRolloutsPage, + ListRolloutsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRolloutsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRolloutsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRolloutsPagedResponse(ListRolloutsPage page) { + super(page, ListRolloutsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRolloutsPage + extends AbstractPage { + + private ListRolloutsPage( + PageContext context, + ListRolloutsResponse response) { + super(context, response); + } + + private static ListRolloutsPage createEmptyPage() { + return new ListRolloutsPage(null, null); + } + + @Override + protected ListRolloutsPage createPage( + PageContext context, + ListRolloutsResponse response) { + return new ListRolloutsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRolloutsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRolloutsRequest, + ListRolloutsResponse, + Rollout, + ListRolloutsPage, + ListRolloutsFixedSizeCollection> { + + private ListRolloutsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRolloutsFixedSizeCollection createEmptyCollection() { + return new ListRolloutsFixedSizeCollection(null, 0); + } + + @Override + protected ListRolloutsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRolloutsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java new file mode 100644 index 0000000..b1eea4f --- /dev/null +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java @@ -0,0 +1,482 @@ +/* + * 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.deploy.v1; + +import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; + +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.deploy.v1.stub.CloudDeployStubSettings; +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 CloudDeployClient}. + * + *

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

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

{@code
+ * CloudDeploySettings.Builder cloudDeploySettingsBuilder = CloudDeploySettings.newBuilder();
+ * cloudDeploySettingsBuilder
+ *     .getDeliveryPipelineSettings()
+ *     .setRetrySettings(
+ *         cloudDeploySettingsBuilder
+ *             .getDeliveryPipelineSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CloudDeploySettings cloudDeploySettings = cloudDeploySettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class CloudDeploySettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listDeliveryPipelines. */ + public PagedCallSettings< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + ListDeliveryPipelinesPagedResponse> + listDeliveryPipelinesSettings() { + return ((CloudDeployStubSettings) getStubSettings()).listDeliveryPipelinesSettings(); + } + + /** Returns the object with the settings used for calls to getDeliveryPipeline. */ + public UnaryCallSettings + getDeliveryPipelineSettings() { + return ((CloudDeployStubSettings) getStubSettings()).getDeliveryPipelineSettings(); + } + + /** Returns the object with the settings used for calls to createDeliveryPipeline. */ + public UnaryCallSettings + createDeliveryPipelineSettings() { + return ((CloudDeployStubSettings) getStubSettings()).createDeliveryPipelineSettings(); + } + + /** Returns the object with the settings used for calls to createDeliveryPipeline. */ + public OperationCallSettings + createDeliveryPipelineOperationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).createDeliveryPipelineOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateDeliveryPipeline. */ + public UnaryCallSettings + updateDeliveryPipelineSettings() { + return ((CloudDeployStubSettings) getStubSettings()).updateDeliveryPipelineSettings(); + } + + /** Returns the object with the settings used for calls to updateDeliveryPipeline. */ + public OperationCallSettings + updateDeliveryPipelineOperationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).updateDeliveryPipelineOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDeliveryPipeline. */ + public UnaryCallSettings + deleteDeliveryPipelineSettings() { + return ((CloudDeployStubSettings) getStubSettings()).deleteDeliveryPipelineSettings(); + } + + /** Returns the object with the settings used for calls to deleteDeliveryPipeline. */ + public OperationCallSettings + deleteDeliveryPipelineOperationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).deleteDeliveryPipelineOperationSettings(); + } + + /** Returns the object with the settings used for calls to listTargets. */ + public PagedCallSettings + listTargetsSettings() { + return ((CloudDeployStubSettings) getStubSettings()).listTargetsSettings(); + } + + /** Returns the object with the settings used for calls to getTarget. */ + public UnaryCallSettings getTargetSettings() { + return ((CloudDeployStubSettings) getStubSettings()).getTargetSettings(); + } + + /** Returns the object with the settings used for calls to createTarget. */ + public UnaryCallSettings createTargetSettings() { + return ((CloudDeployStubSettings) getStubSettings()).createTargetSettings(); + } + + /** Returns the object with the settings used for calls to createTarget. */ + public OperationCallSettings + createTargetOperationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).createTargetOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateTarget. */ + public UnaryCallSettings updateTargetSettings() { + return ((CloudDeployStubSettings) getStubSettings()).updateTargetSettings(); + } + + /** Returns the object with the settings used for calls to updateTarget. */ + public OperationCallSettings + updateTargetOperationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).updateTargetOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteTarget. */ + public UnaryCallSettings deleteTargetSettings() { + return ((CloudDeployStubSettings) getStubSettings()).deleteTargetSettings(); + } + + /** Returns the object with the settings used for calls to deleteTarget. */ + public OperationCallSettings + deleteTargetOperationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).deleteTargetOperationSettings(); + } + + /** Returns the object with the settings used for calls to listReleases. */ + public PagedCallSettings + listReleasesSettings() { + return ((CloudDeployStubSettings) getStubSettings()).listReleasesSettings(); + } + + /** Returns the object with the settings used for calls to getRelease. */ + public UnaryCallSettings getReleaseSettings() { + return ((CloudDeployStubSettings) getStubSettings()).getReleaseSettings(); + } + + /** Returns the object with the settings used for calls to createRelease. */ + public UnaryCallSettings createReleaseSettings() { + return ((CloudDeployStubSettings) getStubSettings()).createReleaseSettings(); + } + + /** Returns the object with the settings used for calls to createRelease. */ + public OperationCallSettings + createReleaseOperationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).createReleaseOperationSettings(); + } + + /** Returns the object with the settings used for calls to approveRollout. */ + public UnaryCallSettings approveRolloutSettings() { + return ((CloudDeployStubSettings) getStubSettings()).approveRolloutSettings(); + } + + /** Returns the object with the settings used for calls to listRollouts. */ + public PagedCallSettings + listRolloutsSettings() { + return ((CloudDeployStubSettings) getStubSettings()).listRolloutsSettings(); + } + + /** Returns the object with the settings used for calls to getRollout. */ + public UnaryCallSettings getRolloutSettings() { + return ((CloudDeployStubSettings) getStubSettings()).getRolloutSettings(); + } + + /** Returns the object with the settings used for calls to createRollout. */ + public UnaryCallSettings createRolloutSettings() { + return ((CloudDeployStubSettings) getStubSettings()).createRolloutSettings(); + } + + /** Returns the object with the settings used for calls to createRollout. */ + public OperationCallSettings + createRolloutOperationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).createRolloutOperationSettings(); + } + + /** Returns the object with the settings used for calls to getConfig. */ + public UnaryCallSettings getConfigSettings() { + return ((CloudDeployStubSettings) getStubSettings()).getConfigSettings(); + } + + public static final CloudDeploySettings create(CloudDeployStubSettings stub) throws IOException { + return new CloudDeploySettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CloudDeployStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CloudDeployStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CloudDeployStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CloudDeployStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CloudDeployStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CloudDeployStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudDeployStubSettings.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 CloudDeploySettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CloudDeploySettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(CloudDeployStubSettings.newBuilder(clientContext)); + } + + protected Builder(CloudDeploySettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CloudDeployStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(CloudDeployStubSettings.newBuilder()); + } + + public CloudDeployStubSettings.Builder getStubSettingsBuilder() { + return ((CloudDeployStubSettings.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 listDeliveryPipelines. */ + public PagedCallSettings.Builder< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + ListDeliveryPipelinesPagedResponse> + listDeliveryPipelinesSettings() { + return getStubSettingsBuilder().listDeliveryPipelinesSettings(); + } + + /** Returns the builder for the settings used for calls to getDeliveryPipeline. */ + public UnaryCallSettings.Builder + getDeliveryPipelineSettings() { + return getStubSettingsBuilder().getDeliveryPipelineSettings(); + } + + /** Returns the builder for the settings used for calls to createDeliveryPipeline. */ + public UnaryCallSettings.Builder + createDeliveryPipelineSettings() { + return getStubSettingsBuilder().createDeliveryPipelineSettings(); + } + + /** Returns the builder for the settings used for calls to createDeliveryPipeline. */ + public OperationCallSettings.Builder< + CreateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata> + createDeliveryPipelineOperationSettings() { + return getStubSettingsBuilder().createDeliveryPipelineOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDeliveryPipeline. */ + public UnaryCallSettings.Builder + updateDeliveryPipelineSettings() { + return getStubSettingsBuilder().updateDeliveryPipelineSettings(); + } + + /** Returns the builder for the settings used for calls to updateDeliveryPipeline. */ + public OperationCallSettings.Builder< + UpdateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata> + updateDeliveryPipelineOperationSettings() { + return getStubSettingsBuilder().updateDeliveryPipelineOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDeliveryPipeline. */ + public UnaryCallSettings.Builder + deleteDeliveryPipelineSettings() { + return getStubSettingsBuilder().deleteDeliveryPipelineSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDeliveryPipeline. */ + public OperationCallSettings.Builder + deleteDeliveryPipelineOperationSettings() { + return getStubSettingsBuilder().deleteDeliveryPipelineOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listTargets. */ + public PagedCallSettings.Builder< + ListTargetsRequest, ListTargetsResponse, ListTargetsPagedResponse> + listTargetsSettings() { + return getStubSettingsBuilder().listTargetsSettings(); + } + + /** Returns the builder for the settings used for calls to getTarget. */ + public UnaryCallSettings.Builder getTargetSettings() { + return getStubSettingsBuilder().getTargetSettings(); + } + + /** Returns the builder for the settings used for calls to createTarget. */ + public UnaryCallSettings.Builder createTargetSettings() { + return getStubSettingsBuilder().createTargetSettings(); + } + + /** Returns the builder for the settings used for calls to createTarget. */ + public OperationCallSettings.Builder + createTargetOperationSettings() { + return getStubSettingsBuilder().createTargetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateTarget. */ + public UnaryCallSettings.Builder updateTargetSettings() { + return getStubSettingsBuilder().updateTargetSettings(); + } + + /** Returns the builder for the settings used for calls to updateTarget. */ + public OperationCallSettings.Builder + updateTargetOperationSettings() { + return getStubSettingsBuilder().updateTargetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTarget. */ + public UnaryCallSettings.Builder deleteTargetSettings() { + return getStubSettingsBuilder().deleteTargetSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTarget. */ + public OperationCallSettings.Builder + deleteTargetOperationSettings() { + return getStubSettingsBuilder().deleteTargetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listReleases. */ + public PagedCallSettings.Builder< + ListReleasesRequest, ListReleasesResponse, ListReleasesPagedResponse> + listReleasesSettings() { + return getStubSettingsBuilder().listReleasesSettings(); + } + + /** Returns the builder for the settings used for calls to getRelease. */ + public UnaryCallSettings.Builder getReleaseSettings() { + return getStubSettingsBuilder().getReleaseSettings(); + } + + /** Returns the builder for the settings used for calls to createRelease. */ + public UnaryCallSettings.Builder createReleaseSettings() { + return getStubSettingsBuilder().createReleaseSettings(); + } + + /** Returns the builder for the settings used for calls to createRelease. */ + public OperationCallSettings.Builder + createReleaseOperationSettings() { + return getStubSettingsBuilder().createReleaseOperationSettings(); + } + + /** Returns the builder for the settings used for calls to approveRollout. */ + public UnaryCallSettings.Builder + approveRolloutSettings() { + return getStubSettingsBuilder().approveRolloutSettings(); + } + + /** Returns the builder for the settings used for calls to listRollouts. */ + public PagedCallSettings.Builder< + ListRolloutsRequest, ListRolloutsResponse, ListRolloutsPagedResponse> + listRolloutsSettings() { + return getStubSettingsBuilder().listRolloutsSettings(); + } + + /** Returns the builder for the settings used for calls to getRollout. */ + public UnaryCallSettings.Builder getRolloutSettings() { + return getStubSettingsBuilder().getRolloutSettings(); + } + + /** Returns the builder for the settings used for calls to createRollout. */ + public UnaryCallSettings.Builder createRolloutSettings() { + return getStubSettingsBuilder().createRolloutSettings(); + } + + /** Returns the builder for the settings used for calls to createRollout. */ + public OperationCallSettings.Builder + createRolloutOperationSettings() { + return getStubSettingsBuilder().createRolloutOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getConfig. */ + public UnaryCallSettings.Builder getConfigSettings() { + return getStubSettingsBuilder().getConfigSettings(); + } + + @Override + public CloudDeploySettings build() throws IOException { + return new CloudDeploySettings(this); + } + } +} diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json new file mode 100644 index 0000000..ceb3857 --- /dev/null +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json @@ -0,0 +1,72 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.deploy.v1", + "libraryPackage": "com.google.cloud.deploy.v1", + "services": { + "CloudDeploy": { + "clients": { + "grpc": { + "libraryClient": "CloudDeployClient", + "rpcs": { + "ApproveRollout": { + "methods": ["approveRollout", "approveRollout", "approveRollout", "approveRolloutCallable"] + }, + "CreateDeliveryPipeline": { + "methods": ["createDeliveryPipelineAsync", "createDeliveryPipelineAsync", "createDeliveryPipelineAsync", "createDeliveryPipelineOperationCallable", "createDeliveryPipelineCallable"] + }, + "CreateRelease": { + "methods": ["createReleaseAsync", "createReleaseAsync", "createReleaseAsync", "createReleaseOperationCallable", "createReleaseCallable"] + }, + "CreateRollout": { + "methods": ["createRolloutAsync", "createRolloutAsync", "createRolloutAsync", "createRolloutOperationCallable", "createRolloutCallable"] + }, + "CreateTarget": { + "methods": ["createTargetAsync", "createTargetAsync", "createTargetAsync", "createTargetOperationCallable", "createTargetCallable"] + }, + "DeleteDeliveryPipeline": { + "methods": ["deleteDeliveryPipelineAsync", "deleteDeliveryPipelineAsync", "deleteDeliveryPipelineAsync", "deleteDeliveryPipelineOperationCallable", "deleteDeliveryPipelineCallable"] + }, + "DeleteTarget": { + "methods": ["deleteTargetAsync", "deleteTargetAsync", "deleteTargetAsync", "deleteTargetOperationCallable", "deleteTargetCallable"] + }, + "GetConfig": { + "methods": ["getConfig", "getConfig", "getConfig", "getConfigCallable"] + }, + "GetDeliveryPipeline": { + "methods": ["getDeliveryPipeline", "getDeliveryPipeline", "getDeliveryPipeline", "getDeliveryPipelineCallable"] + }, + "GetRelease": { + "methods": ["getRelease", "getRelease", "getRelease", "getReleaseCallable"] + }, + "GetRollout": { + "methods": ["getRollout", "getRollout", "getRollout", "getRolloutCallable"] + }, + "GetTarget": { + "methods": ["getTarget", "getTarget", "getTarget", "getTargetCallable"] + }, + "ListDeliveryPipelines": { + "methods": ["listDeliveryPipelines", "listDeliveryPipelines", "listDeliveryPipelines", "listDeliveryPipelinesPagedCallable", "listDeliveryPipelinesCallable"] + }, + "ListReleases": { + "methods": ["listReleases", "listReleases", "listReleases", "listReleasesPagedCallable", "listReleasesCallable"] + }, + "ListRollouts": { + "methods": ["listRollouts", "listRollouts", "listRollouts", "listRolloutsPagedCallable", "listRolloutsCallable"] + }, + "ListTargets": { + "methods": ["listTargets", "listTargets", "listTargets", "listTargetsPagedCallable", "listTargetsCallable"] + }, + "UpdateDeliveryPipeline": { + "methods": ["updateDeliveryPipelineAsync", "updateDeliveryPipelineAsync", "updateDeliveryPipelineOperationCallable", "updateDeliveryPipelineCallable"] + }, + "UpdateTarget": { + "methods": ["updateTargetAsync", "updateTargetAsync", "updateTargetOperationCallable", "updateTargetCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/package-info.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/package-info.java new file mode 100644 index 0000000..2b90d25 --- /dev/null +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/package-info.java @@ -0,0 +1,40 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Google Cloud Deploy API + * + *

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

======================= CloudDeployClient ======================= + * + *

Service Description: CloudDeploy service creates and manages Continuous Delivery operations on + * Google Cloud Platform via Skaffold (https://skaffold.dev). + * + *

Sample for CloudDeployClient: + * + *

{@code
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ *   DeliveryPipelineName name =
+ *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+ *   DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.deploy.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java new file mode 100644 index 0000000..a0c53a1 --- /dev/null +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java @@ -0,0 +1,210 @@ +/* + * 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.deploy.v1.stub; + +import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; + +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.deploy.v1.ApproveRolloutRequest; +import com.google.cloud.deploy.v1.ApproveRolloutResponse; +import com.google.cloud.deploy.v1.Config; +import com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.CreateReleaseRequest; +import com.google.cloud.deploy.v1.CreateRolloutRequest; +import com.google.cloud.deploy.v1.CreateTargetRequest; +import com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.DeleteTargetRequest; +import com.google.cloud.deploy.v1.DeliveryPipeline; +import com.google.cloud.deploy.v1.GetConfigRequest; +import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.GetReleaseRequest; +import com.google.cloud.deploy.v1.GetRolloutRequest; +import com.google.cloud.deploy.v1.GetTargetRequest; +import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest; +import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse; +import com.google.cloud.deploy.v1.ListReleasesRequest; +import com.google.cloud.deploy.v1.ListReleasesResponse; +import com.google.cloud.deploy.v1.ListRolloutsRequest; +import com.google.cloud.deploy.v1.ListRolloutsResponse; +import com.google.cloud.deploy.v1.ListTargetsRequest; +import com.google.cloud.deploy.v1.ListTargetsResponse; +import com.google.cloud.deploy.v1.OperationMetadata; +import com.google.cloud.deploy.v1.Release; +import com.google.cloud.deploy.v1.Rollout; +import com.google.cloud.deploy.v1.Target; +import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.UpdateTargetRequest; +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 CloudDeploy service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class CloudDeployStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listDeliveryPipelinesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listDeliveryPipelinesPagedCallable()"); + } + + public UnaryCallable + listDeliveryPipelinesCallable() { + throw new UnsupportedOperationException("Not implemented: listDeliveryPipelinesCallable()"); + } + + public UnaryCallable getDeliveryPipelineCallable() { + throw new UnsupportedOperationException("Not implemented: getDeliveryPipelineCallable()"); + } + + public OperationCallable + createDeliveryPipelineOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createDeliveryPipelineOperationCallable()"); + } + + public UnaryCallable createDeliveryPipelineCallable() { + throw new UnsupportedOperationException("Not implemented: createDeliveryPipelineCallable()"); + } + + public OperationCallable + updateDeliveryPipelineOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateDeliveryPipelineOperationCallable()"); + } + + public UnaryCallable updateDeliveryPipelineCallable() { + throw new UnsupportedOperationException("Not implemented: updateDeliveryPipelineCallable()"); + } + + public OperationCallable + deleteDeliveryPipelineOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteDeliveryPipelineOperationCallable()"); + } + + public UnaryCallable deleteDeliveryPipelineCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDeliveryPipelineCallable()"); + } + + public UnaryCallable listTargetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTargetsPagedCallable()"); + } + + public UnaryCallable listTargetsCallable() { + throw new UnsupportedOperationException("Not implemented: listTargetsCallable()"); + } + + public UnaryCallable getTargetCallable() { + throw new UnsupportedOperationException("Not implemented: getTargetCallable()"); + } + + public OperationCallable + createTargetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createTargetOperationCallable()"); + } + + public UnaryCallable createTargetCallable() { + throw new UnsupportedOperationException("Not implemented: createTargetCallable()"); + } + + public OperationCallable + updateTargetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateTargetOperationCallable()"); + } + + public UnaryCallable updateTargetCallable() { + throw new UnsupportedOperationException("Not implemented: updateTargetCallable()"); + } + + public OperationCallable + deleteTargetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTargetOperationCallable()"); + } + + public UnaryCallable deleteTargetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTargetCallable()"); + } + + public UnaryCallable listReleasesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listReleasesPagedCallable()"); + } + + public UnaryCallable listReleasesCallable() { + throw new UnsupportedOperationException("Not implemented: listReleasesCallable()"); + } + + public UnaryCallable getReleaseCallable() { + throw new UnsupportedOperationException("Not implemented: getReleaseCallable()"); + } + + public OperationCallable + createReleaseOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createReleaseOperationCallable()"); + } + + public UnaryCallable createReleaseCallable() { + throw new UnsupportedOperationException("Not implemented: createReleaseCallable()"); + } + + public UnaryCallable approveRolloutCallable() { + throw new UnsupportedOperationException("Not implemented: approveRolloutCallable()"); + } + + public UnaryCallable listRolloutsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRolloutsPagedCallable()"); + } + + public UnaryCallable listRolloutsCallable() { + throw new UnsupportedOperationException("Not implemented: listRolloutsCallable()"); + } + + public UnaryCallable getRolloutCallable() { + throw new UnsupportedOperationException("Not implemented: getRolloutCallable()"); + } + + public OperationCallable + createRolloutOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createRolloutOperationCallable()"); + } + + public UnaryCallable createRolloutCallable() { + throw new UnsupportedOperationException("Not implemented: createRolloutCallable()"); + } + + public UnaryCallable getConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getConfigCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java new file mode 100644 index 0000000..d4aff8d --- /dev/null +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java @@ -0,0 +1,1358 @@ +/* + * 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.deploy.v1.stub; + +import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; + +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.deploy.v1.ApproveRolloutRequest; +import com.google.cloud.deploy.v1.ApproveRolloutResponse; +import com.google.cloud.deploy.v1.Config; +import com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.CreateReleaseRequest; +import com.google.cloud.deploy.v1.CreateRolloutRequest; +import com.google.cloud.deploy.v1.CreateTargetRequest; +import com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.DeleteTargetRequest; +import com.google.cloud.deploy.v1.DeliveryPipeline; +import com.google.cloud.deploy.v1.GetConfigRequest; +import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.GetReleaseRequest; +import com.google.cloud.deploy.v1.GetRolloutRequest; +import com.google.cloud.deploy.v1.GetTargetRequest; +import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest; +import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse; +import com.google.cloud.deploy.v1.ListReleasesRequest; +import com.google.cloud.deploy.v1.ListReleasesResponse; +import com.google.cloud.deploy.v1.ListRolloutsRequest; +import com.google.cloud.deploy.v1.ListRolloutsResponse; +import com.google.cloud.deploy.v1.ListTargetsRequest; +import com.google.cloud.deploy.v1.ListTargetsResponse; +import com.google.cloud.deploy.v1.OperationMetadata; +import com.google.cloud.deploy.v1.Release; +import com.google.cloud.deploy.v1.Rollout; +import com.google.cloud.deploy.v1.Target; +import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.UpdateTargetRequest; +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 CloudDeployStub}. + * + *

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

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

{@code
+ * CloudDeployStubSettings.Builder cloudDeploySettingsBuilder =
+ *     CloudDeployStubSettings.newBuilder();
+ * cloudDeploySettingsBuilder
+ *     .getDeliveryPipelineSettings()
+ *     .setRetrySettings(
+ *         cloudDeploySettingsBuilder
+ *             .getDeliveryPipelineSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CloudDeployStubSettings cloudDeploySettings = cloudDeploySettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class CloudDeployStubSettings 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< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + ListDeliveryPipelinesPagedResponse> + listDeliveryPipelinesSettings; + private final UnaryCallSettings + getDeliveryPipelineSettings; + private final UnaryCallSettings + createDeliveryPipelineSettings; + private final OperationCallSettings< + CreateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata> + createDeliveryPipelineOperationSettings; + private final UnaryCallSettings + updateDeliveryPipelineSettings; + private final OperationCallSettings< + UpdateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata> + updateDeliveryPipelineOperationSettings; + private final UnaryCallSettings + deleteDeliveryPipelineSettings; + private final OperationCallSettings + deleteDeliveryPipelineOperationSettings; + private final PagedCallSettings + listTargetsSettings; + private final UnaryCallSettings getTargetSettings; + private final UnaryCallSettings createTargetSettings; + private final OperationCallSettings + createTargetOperationSettings; + private final UnaryCallSettings updateTargetSettings; + private final OperationCallSettings + updateTargetOperationSettings; + private final UnaryCallSettings deleteTargetSettings; + private final OperationCallSettings + deleteTargetOperationSettings; + private final PagedCallSettings< + ListReleasesRequest, ListReleasesResponse, ListReleasesPagedResponse> + listReleasesSettings; + private final UnaryCallSettings getReleaseSettings; + private final UnaryCallSettings createReleaseSettings; + private final OperationCallSettings + createReleaseOperationSettings; + private final UnaryCallSettings + approveRolloutSettings; + private final PagedCallSettings< + ListRolloutsRequest, ListRolloutsResponse, ListRolloutsPagedResponse> + listRolloutsSettings; + private final UnaryCallSettings getRolloutSettings; + private final UnaryCallSettings createRolloutSettings; + private final OperationCallSettings + createRolloutOperationSettings; + private final UnaryCallSettings getConfigSettings; + + private static final PagedListDescriptor< + ListDeliveryPipelinesRequest, ListDeliveryPipelinesResponse, DeliveryPipeline> + LIST_DELIVERY_PIPELINES_PAGE_STR_DESC = + new PagedListDescriptor< + ListDeliveryPipelinesRequest, ListDeliveryPipelinesResponse, DeliveryPipeline>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDeliveryPipelinesRequest injectToken( + ListDeliveryPipelinesRequest payload, String token) { + return ListDeliveryPipelinesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDeliveryPipelinesRequest injectPageSize( + ListDeliveryPipelinesRequest payload, int pageSize) { + return ListDeliveryPipelinesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDeliveryPipelinesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDeliveryPipelinesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListDeliveryPipelinesResponse payload) { + return payload.getDeliveryPipelinesList() == null + ? ImmutableList.of() + : payload.getDeliveryPipelinesList(); + } + }; + + private static final PagedListDescriptor + LIST_TARGETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTargetsRequest injectToken(ListTargetsRequest payload, String token) { + return ListTargetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTargetsRequest injectPageSize(ListTargetsRequest payload, int pageSize) { + return ListTargetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTargetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTargetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTargetsResponse payload) { + return payload.getTargetsList() == null + ? ImmutableList.of() + : payload.getTargetsList(); + } + }; + + private static final PagedListDescriptor + LIST_RELEASES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListReleasesRequest injectToken(ListReleasesRequest payload, String token) { + return ListReleasesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListReleasesRequest injectPageSize(ListReleasesRequest payload, int pageSize) { + return ListReleasesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListReleasesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListReleasesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListReleasesResponse payload) { + return payload.getReleasesList() == null + ? ImmutableList.of() + : payload.getReleasesList(); + } + }; + + private static final PagedListDescriptor + LIST_ROLLOUTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRolloutsRequest injectToken(ListRolloutsRequest payload, String token) { + return ListRolloutsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRolloutsRequest injectPageSize(ListRolloutsRequest payload, int pageSize) { + return ListRolloutsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRolloutsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRolloutsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRolloutsResponse payload) { + return payload.getRolloutsList() == null + ? ImmutableList.of() + : payload.getRolloutsList(); + } + }; + + private static final PagedListResponseFactory< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + ListDeliveryPipelinesPagedResponse> + LIST_DELIVERY_PIPELINES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + ListDeliveryPipelinesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDeliveryPipelinesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListDeliveryPipelinesRequest, ListDeliveryPipelinesResponse, DeliveryPipeline> + pageContext = + PageContext.create( + callable, LIST_DELIVERY_PIPELINES_PAGE_STR_DESC, request, context); + return ListDeliveryPipelinesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTargetsRequest, ListTargetsResponse, ListTargetsPagedResponse> + LIST_TARGETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTargetsRequest, ListTargetsResponse, ListTargetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTargetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TARGETS_PAGE_STR_DESC, request, context); + return ListTargetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListReleasesRequest, ListReleasesResponse, ListReleasesPagedResponse> + LIST_RELEASES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListReleasesRequest, ListReleasesResponse, ListReleasesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListReleasesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_RELEASES_PAGE_STR_DESC, request, context); + return ListReleasesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListRolloutsRequest, ListRolloutsResponse, ListRolloutsPagedResponse> + LIST_ROLLOUTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRolloutsRequest, ListRolloutsResponse, ListRolloutsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRolloutsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ROLLOUTS_PAGE_STR_DESC, request, context); + return ListRolloutsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listDeliveryPipelines. */ + public PagedCallSettings< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + ListDeliveryPipelinesPagedResponse> + listDeliveryPipelinesSettings() { + return listDeliveryPipelinesSettings; + } + + /** Returns the object with the settings used for calls to getDeliveryPipeline. */ + public UnaryCallSettings + getDeliveryPipelineSettings() { + return getDeliveryPipelineSettings; + } + + /** Returns the object with the settings used for calls to createDeliveryPipeline. */ + public UnaryCallSettings + createDeliveryPipelineSettings() { + return createDeliveryPipelineSettings; + } + + /** Returns the object with the settings used for calls to createDeliveryPipeline. */ + public OperationCallSettings + createDeliveryPipelineOperationSettings() { + return createDeliveryPipelineOperationSettings; + } + + /** Returns the object with the settings used for calls to updateDeliveryPipeline. */ + public UnaryCallSettings + updateDeliveryPipelineSettings() { + return updateDeliveryPipelineSettings; + } + + /** Returns the object with the settings used for calls to updateDeliveryPipeline. */ + public OperationCallSettings + updateDeliveryPipelineOperationSettings() { + return updateDeliveryPipelineOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteDeliveryPipeline. */ + public UnaryCallSettings + deleteDeliveryPipelineSettings() { + return deleteDeliveryPipelineSettings; + } + + /** Returns the object with the settings used for calls to deleteDeliveryPipeline. */ + public OperationCallSettings + deleteDeliveryPipelineOperationSettings() { + return deleteDeliveryPipelineOperationSettings; + } + + /** Returns the object with the settings used for calls to listTargets. */ + public PagedCallSettings + listTargetsSettings() { + return listTargetsSettings; + } + + /** Returns the object with the settings used for calls to getTarget. */ + public UnaryCallSettings getTargetSettings() { + return getTargetSettings; + } + + /** Returns the object with the settings used for calls to createTarget. */ + public UnaryCallSettings createTargetSettings() { + return createTargetSettings; + } + + /** Returns the object with the settings used for calls to createTarget. */ + public OperationCallSettings + createTargetOperationSettings() { + return createTargetOperationSettings; + } + + /** Returns the object with the settings used for calls to updateTarget. */ + public UnaryCallSettings updateTargetSettings() { + return updateTargetSettings; + } + + /** Returns the object with the settings used for calls to updateTarget. */ + public OperationCallSettings + updateTargetOperationSettings() { + return updateTargetOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteTarget. */ + public UnaryCallSettings deleteTargetSettings() { + return deleteTargetSettings; + } + + /** Returns the object with the settings used for calls to deleteTarget. */ + public OperationCallSettings + deleteTargetOperationSettings() { + return deleteTargetOperationSettings; + } + + /** Returns the object with the settings used for calls to listReleases. */ + public PagedCallSettings + listReleasesSettings() { + return listReleasesSettings; + } + + /** Returns the object with the settings used for calls to getRelease. */ + public UnaryCallSettings getReleaseSettings() { + return getReleaseSettings; + } + + /** Returns the object with the settings used for calls to createRelease. */ + public UnaryCallSettings createReleaseSettings() { + return createReleaseSettings; + } + + /** Returns the object with the settings used for calls to createRelease. */ + public OperationCallSettings + createReleaseOperationSettings() { + return createReleaseOperationSettings; + } + + /** Returns the object with the settings used for calls to approveRollout. */ + public UnaryCallSettings approveRolloutSettings() { + return approveRolloutSettings; + } + + /** Returns the object with the settings used for calls to listRollouts. */ + public PagedCallSettings + listRolloutsSettings() { + return listRolloutsSettings; + } + + /** Returns the object with the settings used for calls to getRollout. */ + public UnaryCallSettings getRolloutSettings() { + return getRolloutSettings; + } + + /** Returns the object with the settings used for calls to createRollout. */ + public UnaryCallSettings createRolloutSettings() { + return createRolloutSettings; + } + + /** Returns the object with the settings used for calls to createRollout. */ + public OperationCallSettings + createRolloutOperationSettings() { + return createRolloutOperationSettings; + } + + /** Returns the object with the settings used for calls to getConfig. */ + public UnaryCallSettings getConfigSettings() { + return getConfigSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CloudDeployStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCloudDeployStub.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 "clouddeploy.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "clouddeploy.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(CloudDeployStubSettings.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 CloudDeployStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listDeliveryPipelinesSettings = settingsBuilder.listDeliveryPipelinesSettings().build(); + getDeliveryPipelineSettings = settingsBuilder.getDeliveryPipelineSettings().build(); + createDeliveryPipelineSettings = settingsBuilder.createDeliveryPipelineSettings().build(); + createDeliveryPipelineOperationSettings = + settingsBuilder.createDeliveryPipelineOperationSettings().build(); + updateDeliveryPipelineSettings = settingsBuilder.updateDeliveryPipelineSettings().build(); + updateDeliveryPipelineOperationSettings = + settingsBuilder.updateDeliveryPipelineOperationSettings().build(); + deleteDeliveryPipelineSettings = settingsBuilder.deleteDeliveryPipelineSettings().build(); + deleteDeliveryPipelineOperationSettings = + settingsBuilder.deleteDeliveryPipelineOperationSettings().build(); + listTargetsSettings = settingsBuilder.listTargetsSettings().build(); + getTargetSettings = settingsBuilder.getTargetSettings().build(); + createTargetSettings = settingsBuilder.createTargetSettings().build(); + createTargetOperationSettings = settingsBuilder.createTargetOperationSettings().build(); + updateTargetSettings = settingsBuilder.updateTargetSettings().build(); + updateTargetOperationSettings = settingsBuilder.updateTargetOperationSettings().build(); + deleteTargetSettings = settingsBuilder.deleteTargetSettings().build(); + deleteTargetOperationSettings = settingsBuilder.deleteTargetOperationSettings().build(); + listReleasesSettings = settingsBuilder.listReleasesSettings().build(); + getReleaseSettings = settingsBuilder.getReleaseSettings().build(); + createReleaseSettings = settingsBuilder.createReleaseSettings().build(); + createReleaseOperationSettings = settingsBuilder.createReleaseOperationSettings().build(); + approveRolloutSettings = settingsBuilder.approveRolloutSettings().build(); + listRolloutsSettings = settingsBuilder.listRolloutsSettings().build(); + getRolloutSettings = settingsBuilder.getRolloutSettings().build(); + createRolloutSettings = settingsBuilder.createRolloutSettings().build(); + createRolloutOperationSettings = settingsBuilder.createRolloutOperationSettings().build(); + getConfigSettings = settingsBuilder.getConfigSettings().build(); + } + + /** Builder for CloudDeployStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + ListDeliveryPipelinesPagedResponse> + listDeliveryPipelinesSettings; + private final UnaryCallSettings.Builder + getDeliveryPipelineSettings; + private final UnaryCallSettings.Builder + createDeliveryPipelineSettings; + private final OperationCallSettings.Builder< + CreateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata> + createDeliveryPipelineOperationSettings; + private final UnaryCallSettings.Builder + updateDeliveryPipelineSettings; + private final OperationCallSettings.Builder< + UpdateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata> + updateDeliveryPipelineOperationSettings; + private final UnaryCallSettings.Builder + deleteDeliveryPipelineSettings; + private final OperationCallSettings.Builder< + DeleteDeliveryPipelineRequest, Empty, OperationMetadata> + deleteDeliveryPipelineOperationSettings; + private final PagedCallSettings.Builder< + ListTargetsRequest, ListTargetsResponse, ListTargetsPagedResponse> + listTargetsSettings; + private final UnaryCallSettings.Builder getTargetSettings; + private final UnaryCallSettings.Builder createTargetSettings; + private final OperationCallSettings.Builder + createTargetOperationSettings; + private final UnaryCallSettings.Builder updateTargetSettings; + private final OperationCallSettings.Builder + updateTargetOperationSettings; + private final UnaryCallSettings.Builder deleteTargetSettings; + private final OperationCallSettings.Builder + deleteTargetOperationSettings; + private final PagedCallSettings.Builder< + ListReleasesRequest, ListReleasesResponse, ListReleasesPagedResponse> + listReleasesSettings; + private final UnaryCallSettings.Builder getReleaseSettings; + private final UnaryCallSettings.Builder createReleaseSettings; + private final OperationCallSettings.Builder + createReleaseOperationSettings; + private final UnaryCallSettings.Builder + approveRolloutSettings; + private final PagedCallSettings.Builder< + ListRolloutsRequest, ListRolloutsResponse, ListRolloutsPagedResponse> + listRolloutsSettings; + private final UnaryCallSettings.Builder getRolloutSettings; + private final UnaryCallSettings.Builder createRolloutSettings; + private final OperationCallSettings.Builder + createRolloutOperationSettings; + private final UnaryCallSettings.Builder getConfigSettings; + 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))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listDeliveryPipelinesSettings = + PagedCallSettings.newBuilder(LIST_DELIVERY_PIPELINES_PAGE_STR_FACT); + getDeliveryPipelineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDeliveryPipelineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDeliveryPipelineOperationSettings = OperationCallSettings.newBuilder(); + updateDeliveryPipelineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDeliveryPipelineOperationSettings = OperationCallSettings.newBuilder(); + deleteDeliveryPipelineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDeliveryPipelineOperationSettings = OperationCallSettings.newBuilder(); + listTargetsSettings = PagedCallSettings.newBuilder(LIST_TARGETS_PAGE_STR_FACT); + getTargetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createTargetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createTargetOperationSettings = OperationCallSettings.newBuilder(); + updateTargetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateTargetOperationSettings = OperationCallSettings.newBuilder(); + deleteTargetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteTargetOperationSettings = OperationCallSettings.newBuilder(); + listReleasesSettings = PagedCallSettings.newBuilder(LIST_RELEASES_PAGE_STR_FACT); + getReleaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createReleaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createReleaseOperationSettings = OperationCallSettings.newBuilder(); + approveRolloutSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listRolloutsSettings = PagedCallSettings.newBuilder(LIST_ROLLOUTS_PAGE_STR_FACT); + getRolloutSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createRolloutSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createRolloutOperationSettings = OperationCallSettings.newBuilder(); + getConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDeliveryPipelinesSettings, + getDeliveryPipelineSettings, + createDeliveryPipelineSettings, + updateDeliveryPipelineSettings, + deleteDeliveryPipelineSettings, + listTargetsSettings, + getTargetSettings, + createTargetSettings, + updateTargetSettings, + deleteTargetSettings, + listReleasesSettings, + getReleaseSettings, + createReleaseSettings, + approveRolloutSettings, + listRolloutsSettings, + getRolloutSettings, + createRolloutSettings, + getConfigSettings); + initDefaults(this); + } + + protected Builder(CloudDeployStubSettings settings) { + super(settings); + + listDeliveryPipelinesSettings = settings.listDeliveryPipelinesSettings.toBuilder(); + getDeliveryPipelineSettings = settings.getDeliveryPipelineSettings.toBuilder(); + createDeliveryPipelineSettings = settings.createDeliveryPipelineSettings.toBuilder(); + createDeliveryPipelineOperationSettings = + settings.createDeliveryPipelineOperationSettings.toBuilder(); + updateDeliveryPipelineSettings = settings.updateDeliveryPipelineSettings.toBuilder(); + updateDeliveryPipelineOperationSettings = + settings.updateDeliveryPipelineOperationSettings.toBuilder(); + deleteDeliveryPipelineSettings = settings.deleteDeliveryPipelineSettings.toBuilder(); + deleteDeliveryPipelineOperationSettings = + settings.deleteDeliveryPipelineOperationSettings.toBuilder(); + listTargetsSettings = settings.listTargetsSettings.toBuilder(); + getTargetSettings = settings.getTargetSettings.toBuilder(); + createTargetSettings = settings.createTargetSettings.toBuilder(); + createTargetOperationSettings = settings.createTargetOperationSettings.toBuilder(); + updateTargetSettings = settings.updateTargetSettings.toBuilder(); + updateTargetOperationSettings = settings.updateTargetOperationSettings.toBuilder(); + deleteTargetSettings = settings.deleteTargetSettings.toBuilder(); + deleteTargetOperationSettings = settings.deleteTargetOperationSettings.toBuilder(); + listReleasesSettings = settings.listReleasesSettings.toBuilder(); + getReleaseSettings = settings.getReleaseSettings.toBuilder(); + createReleaseSettings = settings.createReleaseSettings.toBuilder(); + createReleaseOperationSettings = settings.createReleaseOperationSettings.toBuilder(); + approveRolloutSettings = settings.approveRolloutSettings.toBuilder(); + listRolloutsSettings = settings.listRolloutsSettings.toBuilder(); + getRolloutSettings = settings.getRolloutSettings.toBuilder(); + createRolloutSettings = settings.createRolloutSettings.toBuilder(); + createRolloutOperationSettings = settings.createRolloutOperationSettings.toBuilder(); + getConfigSettings = settings.getConfigSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDeliveryPipelinesSettings, + getDeliveryPipelineSettings, + createDeliveryPipelineSettings, + updateDeliveryPipelineSettings, + deleteDeliveryPipelineSettings, + listTargetsSettings, + getTargetSettings, + createTargetSettings, + updateTargetSettings, + deleteTargetSettings, + listReleasesSettings, + getReleaseSettings, + createReleaseSettings, + approveRolloutSettings, + listRolloutsSettings, + getRolloutSettings, + createRolloutSettings, + getConfigSettings); + } + + 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 + .listDeliveryPipelinesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDeliveryPipelineSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createDeliveryPipelineSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateDeliveryPipelineSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteDeliveryPipelineSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listTargetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getTargetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createTargetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateTargetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteTargetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listReleasesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getReleaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createReleaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .approveRolloutSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listRolloutsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getRolloutSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createRolloutSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createDeliveryPipelineOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DeliveryPipeline.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 + .updateDeliveryPipelineOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DeliveryPipeline.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 + .deleteDeliveryPipelineOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_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 + .createTargetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Target.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 + .updateTargetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Target.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 + .deleteTargetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_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 + .createReleaseOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Release.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 + .createRolloutOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Rollout.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 listDeliveryPipelines. */ + public PagedCallSettings.Builder< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + ListDeliveryPipelinesPagedResponse> + listDeliveryPipelinesSettings() { + return listDeliveryPipelinesSettings; + } + + /** Returns the builder for the settings used for calls to getDeliveryPipeline. */ + public UnaryCallSettings.Builder + getDeliveryPipelineSettings() { + return getDeliveryPipelineSettings; + } + + /** Returns the builder for the settings used for calls to createDeliveryPipeline. */ + public UnaryCallSettings.Builder + createDeliveryPipelineSettings() { + return createDeliveryPipelineSettings; + } + + /** Returns the builder for the settings used for calls to createDeliveryPipeline. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata> + createDeliveryPipelineOperationSettings() { + return createDeliveryPipelineOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateDeliveryPipeline. */ + public UnaryCallSettings.Builder + updateDeliveryPipelineSettings() { + return updateDeliveryPipelineSettings; + } + + /** Returns the builder for the settings used for calls to updateDeliveryPipeline. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata> + updateDeliveryPipelineOperationSettings() { + return updateDeliveryPipelineOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDeliveryPipeline. */ + public UnaryCallSettings.Builder + deleteDeliveryPipelineSettings() { + return deleteDeliveryPipelineSettings; + } + + /** Returns the builder for the settings used for calls to deleteDeliveryPipeline. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteDeliveryPipelineOperationSettings() { + return deleteDeliveryPipelineOperationSettings; + } + + /** Returns the builder for the settings used for calls to listTargets. */ + public PagedCallSettings.Builder< + ListTargetsRequest, ListTargetsResponse, ListTargetsPagedResponse> + listTargetsSettings() { + return listTargetsSettings; + } + + /** Returns the builder for the settings used for calls to getTarget. */ + public UnaryCallSettings.Builder getTargetSettings() { + return getTargetSettings; + } + + /** Returns the builder for the settings used for calls to createTarget. */ + public UnaryCallSettings.Builder createTargetSettings() { + return createTargetSettings; + } + + /** Returns the builder for the settings used for calls to createTarget. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createTargetOperationSettings() { + return createTargetOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateTarget. */ + public UnaryCallSettings.Builder updateTargetSettings() { + return updateTargetSettings; + } + + /** Returns the builder for the settings used for calls to updateTarget. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateTargetOperationSettings() { + return updateTargetOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteTarget. */ + public UnaryCallSettings.Builder deleteTargetSettings() { + return deleteTargetSettings; + } + + /** Returns the builder for the settings used for calls to deleteTarget. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteTargetOperationSettings() { + return deleteTargetOperationSettings; + } + + /** Returns the builder for the settings used for calls to listReleases. */ + public PagedCallSettings.Builder< + ListReleasesRequest, ListReleasesResponse, ListReleasesPagedResponse> + listReleasesSettings() { + return listReleasesSettings; + } + + /** Returns the builder for the settings used for calls to getRelease. */ + public UnaryCallSettings.Builder getReleaseSettings() { + return getReleaseSettings; + } + + /** Returns the builder for the settings used for calls to createRelease. */ + public UnaryCallSettings.Builder createReleaseSettings() { + return createReleaseSettings; + } + + /** Returns the builder for the settings used for calls to createRelease. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createReleaseOperationSettings() { + return createReleaseOperationSettings; + } + + /** Returns the builder for the settings used for calls to approveRollout. */ + public UnaryCallSettings.Builder + approveRolloutSettings() { + return approveRolloutSettings; + } + + /** Returns the builder for the settings used for calls to listRollouts. */ + public PagedCallSettings.Builder< + ListRolloutsRequest, ListRolloutsResponse, ListRolloutsPagedResponse> + listRolloutsSettings() { + return listRolloutsSettings; + } + + /** Returns the builder for the settings used for calls to getRollout. */ + public UnaryCallSettings.Builder getRolloutSettings() { + return getRolloutSettings; + } + + /** Returns the builder for the settings used for calls to createRollout. */ + public UnaryCallSettings.Builder createRolloutSettings() { + return createRolloutSettings; + } + + /** Returns the builder for the settings used for calls to createRollout. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createRolloutOperationSettings() { + return createRolloutOperationSettings; + } + + /** Returns the builder for the settings used for calls to getConfig. */ + public UnaryCallSettings.Builder getConfigSettings() { + return getConfigSettings; + } + + @Override + public CloudDeployStubSettings build() throws IOException { + return new CloudDeployStubSettings(this); + } + } +} diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployCallableFactory.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployCallableFactory.java new file mode 100644 index 0000000..191fb9e --- /dev/null +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployCallableFactory.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.deploy.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 CloudDeploy service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcCloudDeployCallableFactory 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-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java new file mode 100644 index 0000000..2050e20 --- /dev/null +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java @@ -0,0 +1,861 @@ +/* + * 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.deploy.v1.stub; + +import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; + +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.deploy.v1.ApproveRolloutRequest; +import com.google.cloud.deploy.v1.ApproveRolloutResponse; +import com.google.cloud.deploy.v1.Config; +import com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.CreateReleaseRequest; +import com.google.cloud.deploy.v1.CreateRolloutRequest; +import com.google.cloud.deploy.v1.CreateTargetRequest; +import com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.DeleteTargetRequest; +import com.google.cloud.deploy.v1.DeliveryPipeline; +import com.google.cloud.deploy.v1.GetConfigRequest; +import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.GetReleaseRequest; +import com.google.cloud.deploy.v1.GetRolloutRequest; +import com.google.cloud.deploy.v1.GetTargetRequest; +import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest; +import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse; +import com.google.cloud.deploy.v1.ListReleasesRequest; +import com.google.cloud.deploy.v1.ListReleasesResponse; +import com.google.cloud.deploy.v1.ListRolloutsRequest; +import com.google.cloud.deploy.v1.ListRolloutsResponse; +import com.google.cloud.deploy.v1.ListTargetsRequest; +import com.google.cloud.deploy.v1.ListTargetsResponse; +import com.google.cloud.deploy.v1.OperationMetadata; +import com.google.cloud.deploy.v1.Release; +import com.google.cloud.deploy.v1.Rollout; +import com.google.cloud.deploy.v1.Target; +import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.UpdateTargetRequest; +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 CloudDeploy service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcCloudDeployStub extends CloudDeployStub { + private static final MethodDescriptor + listDeliveryPipelinesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListDeliveryPipelines") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDeliveryPipelinesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDeliveryPipelinesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDeliveryPipelineMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetDeliveryPipeline") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDeliveryPipelineRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DeliveryPipeline.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createDeliveryPipelineMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/CreateDeliveryPipeline") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDeliveryPipelineRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDeliveryPipelineMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/UpdateDeliveryPipeline") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDeliveryPipelineRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDeliveryPipelineMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/DeleteDeliveryPipeline") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDeliveryPipelineRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listTargetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListTargets") + .setRequestMarshaller(ProtoUtils.marshaller(ListTargetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTargetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getTargetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetTarget") + .setRequestMarshaller(ProtoUtils.marshaller(GetTargetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Target.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createTargetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/CreateTarget") + .setRequestMarshaller(ProtoUtils.marshaller(CreateTargetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateTargetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/UpdateTarget") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateTargetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteTargetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/DeleteTarget") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteTargetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listReleasesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListReleases") + .setRequestMarshaller(ProtoUtils.marshaller(ListReleasesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListReleasesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getReleaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetRelease") + .setRequestMarshaller(ProtoUtils.marshaller(GetReleaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Release.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createReleaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/CreateRelease") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateReleaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + approveRolloutMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ApproveRollout") + .setRequestMarshaller( + ProtoUtils.marshaller(ApproveRolloutRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ApproveRolloutResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listRolloutsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListRollouts") + .setRequestMarshaller(ProtoUtils.marshaller(ListRolloutsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRolloutsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getRolloutMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetRollout") + .setRequestMarshaller(ProtoUtils.marshaller(GetRolloutRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Rollout.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createRolloutMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/CreateRollout") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateRolloutRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetConfig") + .setRequestMarshaller(ProtoUtils.marshaller(GetConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Config.getDefaultInstance())) + .build(); + + private final UnaryCallable + listDeliveryPipelinesCallable; + private final UnaryCallable + listDeliveryPipelinesPagedCallable; + private final UnaryCallable + getDeliveryPipelineCallable; + private final UnaryCallable + createDeliveryPipelineCallable; + private final OperationCallable< + CreateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata> + createDeliveryPipelineOperationCallable; + private final UnaryCallable + updateDeliveryPipelineCallable; + private final OperationCallable< + UpdateDeliveryPipelineRequest, DeliveryPipeline, OperationMetadata> + updateDeliveryPipelineOperationCallable; + private final UnaryCallable + deleteDeliveryPipelineCallable; + private final OperationCallable + deleteDeliveryPipelineOperationCallable; + private final UnaryCallable listTargetsCallable; + private final UnaryCallable + listTargetsPagedCallable; + private final UnaryCallable getTargetCallable; + private final UnaryCallable createTargetCallable; + private final OperationCallable + createTargetOperationCallable; + private final UnaryCallable updateTargetCallable; + private final OperationCallable + updateTargetOperationCallable; + private final UnaryCallable deleteTargetCallable; + private final OperationCallable + deleteTargetOperationCallable; + private final UnaryCallable listReleasesCallable; + private final UnaryCallable + listReleasesPagedCallable; + private final UnaryCallable getReleaseCallable; + private final UnaryCallable createReleaseCallable; + private final OperationCallable + createReleaseOperationCallable; + private final UnaryCallable approveRolloutCallable; + private final UnaryCallable listRolloutsCallable; + private final UnaryCallable + listRolloutsPagedCallable; + private final UnaryCallable getRolloutCallable; + private final UnaryCallable createRolloutCallable; + private final OperationCallable + createRolloutOperationCallable; + private final UnaryCallable getConfigCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCloudDeployStub create(CloudDeployStubSettings settings) + throws IOException { + return new GrpcCloudDeployStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCloudDeployStub create(ClientContext clientContext) throws IOException { + return new GrpcCloudDeployStub(CloudDeployStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCloudDeployStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCloudDeployStub( + CloudDeployStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcCloudDeployStub, 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 GrpcCloudDeployStub(CloudDeployStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcCloudDeployCallableFactory()); + } + + /** + * Constructs an instance of GrpcCloudDeployStub, 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 GrpcCloudDeployStub( + CloudDeployStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listDeliveryPipelinesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listDeliveryPipelinesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + getDeliveryPipelineTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDeliveryPipelineMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + createDeliveryPipelineTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDeliveryPipelineMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateDeliveryPipelineTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDeliveryPipelineMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "delivery_pipeline.name", + String.valueOf(request.getDeliveryPipeline().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + deleteDeliveryPipelineTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDeliveryPipelineMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listTargetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTargetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getTargetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTargetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createTargetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTargetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateTargetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTargetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("target.name", String.valueOf(request.getTarget().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteTargetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTargetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listReleasesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listReleasesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getReleaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getReleaseMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createReleaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createReleaseMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + approveRolloutTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(approveRolloutMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listRolloutsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRolloutsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getRolloutTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRolloutMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createRolloutTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createRolloutMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getConfigMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.listDeliveryPipelinesCallable = + callableFactory.createUnaryCallable( + listDeliveryPipelinesTransportSettings, + settings.listDeliveryPipelinesSettings(), + clientContext); + this.listDeliveryPipelinesPagedCallable = + callableFactory.createPagedCallable( + listDeliveryPipelinesTransportSettings, + settings.listDeliveryPipelinesSettings(), + clientContext); + this.getDeliveryPipelineCallable = + callableFactory.createUnaryCallable( + getDeliveryPipelineTransportSettings, + settings.getDeliveryPipelineSettings(), + clientContext); + this.createDeliveryPipelineCallable = + callableFactory.createUnaryCallable( + createDeliveryPipelineTransportSettings, + settings.createDeliveryPipelineSettings(), + clientContext); + this.createDeliveryPipelineOperationCallable = + callableFactory.createOperationCallable( + createDeliveryPipelineTransportSettings, + settings.createDeliveryPipelineOperationSettings(), + clientContext, + operationsStub); + this.updateDeliveryPipelineCallable = + callableFactory.createUnaryCallable( + updateDeliveryPipelineTransportSettings, + settings.updateDeliveryPipelineSettings(), + clientContext); + this.updateDeliveryPipelineOperationCallable = + callableFactory.createOperationCallable( + updateDeliveryPipelineTransportSettings, + settings.updateDeliveryPipelineOperationSettings(), + clientContext, + operationsStub); + this.deleteDeliveryPipelineCallable = + callableFactory.createUnaryCallable( + deleteDeliveryPipelineTransportSettings, + settings.deleteDeliveryPipelineSettings(), + clientContext); + this.deleteDeliveryPipelineOperationCallable = + callableFactory.createOperationCallable( + deleteDeliveryPipelineTransportSettings, + settings.deleteDeliveryPipelineOperationSettings(), + clientContext, + operationsStub); + this.listTargetsCallable = + callableFactory.createUnaryCallable( + listTargetsTransportSettings, settings.listTargetsSettings(), clientContext); + this.listTargetsPagedCallable = + callableFactory.createPagedCallable( + listTargetsTransportSettings, settings.listTargetsSettings(), clientContext); + this.getTargetCallable = + callableFactory.createUnaryCallable( + getTargetTransportSettings, settings.getTargetSettings(), clientContext); + this.createTargetCallable = + callableFactory.createUnaryCallable( + createTargetTransportSettings, settings.createTargetSettings(), clientContext); + this.createTargetOperationCallable = + callableFactory.createOperationCallable( + createTargetTransportSettings, + settings.createTargetOperationSettings(), + clientContext, + operationsStub); + this.updateTargetCallable = + callableFactory.createUnaryCallable( + updateTargetTransportSettings, settings.updateTargetSettings(), clientContext); + this.updateTargetOperationCallable = + callableFactory.createOperationCallable( + updateTargetTransportSettings, + settings.updateTargetOperationSettings(), + clientContext, + operationsStub); + this.deleteTargetCallable = + callableFactory.createUnaryCallable( + deleteTargetTransportSettings, settings.deleteTargetSettings(), clientContext); + this.deleteTargetOperationCallable = + callableFactory.createOperationCallable( + deleteTargetTransportSettings, + settings.deleteTargetOperationSettings(), + clientContext, + operationsStub); + this.listReleasesCallable = + callableFactory.createUnaryCallable( + listReleasesTransportSettings, settings.listReleasesSettings(), clientContext); + this.listReleasesPagedCallable = + callableFactory.createPagedCallable( + listReleasesTransportSettings, settings.listReleasesSettings(), clientContext); + this.getReleaseCallable = + callableFactory.createUnaryCallable( + getReleaseTransportSettings, settings.getReleaseSettings(), clientContext); + this.createReleaseCallable = + callableFactory.createUnaryCallable( + createReleaseTransportSettings, settings.createReleaseSettings(), clientContext); + this.createReleaseOperationCallable = + callableFactory.createOperationCallable( + createReleaseTransportSettings, + settings.createReleaseOperationSettings(), + clientContext, + operationsStub); + this.approveRolloutCallable = + callableFactory.createUnaryCallable( + approveRolloutTransportSettings, settings.approveRolloutSettings(), clientContext); + this.listRolloutsCallable = + callableFactory.createUnaryCallable( + listRolloutsTransportSettings, settings.listRolloutsSettings(), clientContext); + this.listRolloutsPagedCallable = + callableFactory.createPagedCallable( + listRolloutsTransportSettings, settings.listRolloutsSettings(), clientContext); + this.getRolloutCallable = + callableFactory.createUnaryCallable( + getRolloutTransportSettings, settings.getRolloutSettings(), clientContext); + this.createRolloutCallable = + callableFactory.createUnaryCallable( + createRolloutTransportSettings, settings.createRolloutSettings(), clientContext); + this.createRolloutOperationCallable = + callableFactory.createOperationCallable( + createRolloutTransportSettings, + settings.createRolloutOperationSettings(), + clientContext, + operationsStub); + this.getConfigCallable = + callableFactory.createUnaryCallable( + getConfigTransportSettings, settings.getConfigSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listDeliveryPipelinesCallable() { + return listDeliveryPipelinesCallable; + } + + @Override + public UnaryCallable + listDeliveryPipelinesPagedCallable() { + return listDeliveryPipelinesPagedCallable; + } + + @Override + public UnaryCallable getDeliveryPipelineCallable() { + return getDeliveryPipelineCallable; + } + + @Override + public UnaryCallable createDeliveryPipelineCallable() { + return createDeliveryPipelineCallable; + } + + @Override + public OperationCallable + createDeliveryPipelineOperationCallable() { + return createDeliveryPipelineOperationCallable; + } + + @Override + public UnaryCallable updateDeliveryPipelineCallable() { + return updateDeliveryPipelineCallable; + } + + @Override + public OperationCallable + updateDeliveryPipelineOperationCallable() { + return updateDeliveryPipelineOperationCallable; + } + + @Override + public UnaryCallable deleteDeliveryPipelineCallable() { + return deleteDeliveryPipelineCallable; + } + + @Override + public OperationCallable + deleteDeliveryPipelineOperationCallable() { + return deleteDeliveryPipelineOperationCallable; + } + + @Override + public UnaryCallable listTargetsCallable() { + return listTargetsCallable; + } + + @Override + public UnaryCallable listTargetsPagedCallable() { + return listTargetsPagedCallable; + } + + @Override + public UnaryCallable getTargetCallable() { + return getTargetCallable; + } + + @Override + public UnaryCallable createTargetCallable() { + return createTargetCallable; + } + + @Override + public OperationCallable + createTargetOperationCallable() { + return createTargetOperationCallable; + } + + @Override + public UnaryCallable updateTargetCallable() { + return updateTargetCallable; + } + + @Override + public OperationCallable + updateTargetOperationCallable() { + return updateTargetOperationCallable; + } + + @Override + public UnaryCallable deleteTargetCallable() { + return deleteTargetCallable; + } + + @Override + public OperationCallable + deleteTargetOperationCallable() { + return deleteTargetOperationCallable; + } + + @Override + public UnaryCallable listReleasesCallable() { + return listReleasesCallable; + } + + @Override + public UnaryCallable listReleasesPagedCallable() { + return listReleasesPagedCallable; + } + + @Override + public UnaryCallable getReleaseCallable() { + return getReleaseCallable; + } + + @Override + public UnaryCallable createReleaseCallable() { + return createReleaseCallable; + } + + @Override + public OperationCallable + createReleaseOperationCallable() { + return createReleaseOperationCallable; + } + + @Override + public UnaryCallable approveRolloutCallable() { + return approveRolloutCallable; + } + + @Override + public UnaryCallable listRolloutsCallable() { + return listRolloutsCallable; + } + + @Override + public UnaryCallable listRolloutsPagedCallable() { + return listRolloutsPagedCallable; + } + + @Override + public UnaryCallable getRolloutCallable() { + return getRolloutCallable; + } + + @Override + public UnaryCallable createRolloutCallable() { + return createRolloutCallable; + } + + @Override + public OperationCallable + createRolloutOperationCallable() { + return createRolloutOperationCallable; + } + + @Override + public UnaryCallable getConfigCallable() { + return getConfigCallable; + } + + @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-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java new file mode 100644 index 0000000..8b755b0 --- /dev/null +++ b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java @@ -0,0 +1,1846 @@ +/* + * 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.deploy.v1; + +import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; + +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 CloudDeployClientTest { + private static MockCloudDeploy mockCloudDeploy; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private CloudDeployClient client; + + @BeforeClass + public static void startStaticServer() { + mockCloudDeploy = new MockCloudDeploy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockCloudDeploy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + CloudDeploySettings settings = + CloudDeploySettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudDeployClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listDeliveryPipelinesTest() throws Exception { + DeliveryPipeline responsesElement = DeliveryPipeline.newBuilder().build(); + ListDeliveryPipelinesResponse expectedResponse = + ListDeliveryPipelinesResponse.newBuilder() + .setNextPageToken("") + .addAllDeliveryPipelines(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDeliveryPipelinesPagedResponse pagedListResponse = client.listDeliveryPipelines(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeliveryPipelinesList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeliveryPipelinesRequest actualRequest = + ((ListDeliveryPipelinesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeliveryPipelinesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDeliveryPipelines(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeliveryPipelinesTest2() throws Exception { + DeliveryPipeline responsesElement = DeliveryPipeline.newBuilder().build(); + ListDeliveryPipelinesResponse expectedResponse = + ListDeliveryPipelinesResponse.newBuilder() + .setNextPageToken("") + .addAllDeliveryPipelines(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDeliveryPipelinesPagedResponse pagedListResponse = client.listDeliveryPipelines(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeliveryPipelinesList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeliveryPipelinesRequest actualRequest = + ((ListDeliveryPipelinesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeliveryPipelinesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDeliveryPipelines(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeliveryPipelineTest() throws Exception { + DeliveryPipeline expectedResponse = + DeliveryPipeline.newBuilder() + .setName( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCondition(PipelineCondition.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + DeliveryPipelineName name = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + + DeliveryPipeline actualResponse = client.getDeliveryPipeline(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeliveryPipelineRequest actualRequest = ((GetDeliveryPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeliveryPipelineExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + DeliveryPipelineName name = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + client.getDeliveryPipeline(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeliveryPipelineTest2() throws Exception { + DeliveryPipeline expectedResponse = + DeliveryPipeline.newBuilder() + .setName( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCondition(PipelineCondition.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + + DeliveryPipeline actualResponse = client.getDeliveryPipeline(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeliveryPipelineRequest actualRequest = ((GetDeliveryPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeliveryPipelineExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.getDeliveryPipeline(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeliveryPipelineTest() throws Exception { + DeliveryPipeline expectedResponse = + DeliveryPipeline.newBuilder() + .setName( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCondition(PipelineCondition.newBuilder().build()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDeliveryPipelineTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build(); + String deliveryPipelineId = "deliveryPipelineId-632411535"; + + DeliveryPipeline actualResponse = + client.createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeliveryPipelineRequest actualRequest = + ((CreateDeliveryPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(deliveryPipeline, actualRequest.getDeliveryPipeline()); + Assert.assertEquals(deliveryPipelineId, actualRequest.getDeliveryPipelineId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeliveryPipelineExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build(); + String deliveryPipelineId = "deliveryPipelineId-632411535"; + client.createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId).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 createDeliveryPipelineTest2() throws Exception { + DeliveryPipeline expectedResponse = + DeliveryPipeline.newBuilder() + .setName( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCondition(PipelineCondition.newBuilder().build()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDeliveryPipelineTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + String parent = "parent-995424086"; + DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build(); + String deliveryPipelineId = "deliveryPipelineId-632411535"; + + DeliveryPipeline actualResponse = + client.createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeliveryPipelineRequest actualRequest = + ((CreateDeliveryPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(deliveryPipeline, actualRequest.getDeliveryPipeline()); + Assert.assertEquals(deliveryPipelineId, actualRequest.getDeliveryPipelineId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeliveryPipelineExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build(); + String deliveryPipelineId = "deliveryPipelineId-632411535"; + client.createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId).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 updateDeliveryPipelineTest() throws Exception { + DeliveryPipeline expectedResponse = + DeliveryPipeline.newBuilder() + .setName( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCondition(PipelineCondition.newBuilder().build()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDeliveryPipelineTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DeliveryPipeline actualResponse = + client.updateDeliveryPipelineAsync(deliveryPipeline, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDeliveryPipelineRequest actualRequest = + ((UpdateDeliveryPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(deliveryPipeline, actualRequest.getDeliveryPipeline()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDeliveryPipelineExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDeliveryPipelineAsync(deliveryPipeline, 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 deleteDeliveryPipelineTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDeliveryPipelineTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + DeliveryPipelineName name = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + + client.deleteDeliveryPipelineAsync(name).get(); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDeliveryPipelineRequest actualRequest = + ((DeleteDeliveryPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDeliveryPipelineExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + DeliveryPipelineName name = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + client.deleteDeliveryPipelineAsync(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 deleteDeliveryPipelineTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDeliveryPipelineTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteDeliveryPipelineAsync(name).get(); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDeliveryPipelineRequest actualRequest = + ((DeleteDeliveryPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDeliveryPipelineExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.deleteDeliveryPipelineAsync(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 listTargetsTest() throws Exception { + Target responsesElement = Target.newBuilder().build(); + ListTargetsResponse expectedResponse = + ListTargetsResponse.newBuilder() + .setNextPageToken("") + .addAllTargets(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListTargetsPagedResponse pagedListResponse = client.listTargets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTargetsList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTargetsRequest actualRequest = ((ListTargetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTargetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listTargets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTargetsTest2() throws Exception { + Target responsesElement = Target.newBuilder().build(); + ListTargetsResponse expectedResponse = + ListTargetsResponse.newBuilder() + .setNextPageToken("") + .addAllTargets(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTargetsPagedResponse pagedListResponse = client.listTargets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTargetsList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTargetsRequest actualRequest = ((ListTargetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTargetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTargets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTargetTest() throws Exception { + Target expectedResponse = + Target.newBuilder() + .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString()) + .setTargetId("targetId-441951604") + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setRequireApproval(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllExecutionConfigs(new ArrayList()) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + TargetName name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]"); + + Target actualResponse = client.getTarget(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTargetRequest actualRequest = ((GetTargetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTargetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + TargetName name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]"); + client.getTarget(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTargetTest2() throws Exception { + Target expectedResponse = + Target.newBuilder() + .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString()) + .setTargetId("targetId-441951604") + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setRequireApproval(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllExecutionConfigs(new ArrayList()) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + + Target actualResponse = client.getTarget(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTargetRequest actualRequest = ((GetTargetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTargetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.getTarget(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTargetTest() throws Exception { + Target expectedResponse = + Target.newBuilder() + .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString()) + .setTargetId("targetId-441951604") + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setRequireApproval(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllExecutionConfigs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createTargetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Target target = Target.newBuilder().build(); + String targetId = "targetId-441951604"; + + Target actualResponse = client.createTargetAsync(parent, target, targetId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTargetRequest actualRequest = ((CreateTargetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(target, actualRequest.getTarget()); + Assert.assertEquals(targetId, actualRequest.getTargetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTargetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Target target = Target.newBuilder().build(); + String targetId = "targetId-441951604"; + client.createTargetAsync(parent, target, targetId).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 createTargetTest2() throws Exception { + Target expectedResponse = + Target.newBuilder() + .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString()) + .setTargetId("targetId-441951604") + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setRequireApproval(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllExecutionConfigs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createTargetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + String parent = "parent-995424086"; + Target target = Target.newBuilder().build(); + String targetId = "targetId-441951604"; + + Target actualResponse = client.createTargetAsync(parent, target, targetId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTargetRequest actualRequest = ((CreateTargetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(target, actualRequest.getTarget()); + Assert.assertEquals(targetId, actualRequest.getTargetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTargetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + Target target = Target.newBuilder().build(); + String targetId = "targetId-441951604"; + client.createTargetAsync(parent, target, targetId).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 updateTargetTest() throws Exception { + Target expectedResponse = + Target.newBuilder() + .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString()) + .setTargetId("targetId-441951604") + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setRequireApproval(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllExecutionConfigs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateTargetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + Target target = Target.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Target actualResponse = client.updateTargetAsync(target, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTargetRequest actualRequest = ((UpdateTargetRequest) actualRequests.get(0)); + + Assert.assertEquals(target, actualRequest.getTarget()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateTargetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + Target target = Target.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTargetAsync(target, 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 deleteTargetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteTargetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + TargetName name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]"); + + client.deleteTargetAsync(name).get(); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTargetRequest actualRequest = ((DeleteTargetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTargetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + TargetName name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]"); + client.deleteTargetAsync(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 deleteTargetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteTargetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteTargetAsync(name).get(); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTargetRequest actualRequest = ((DeleteTargetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTargetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.deleteTargetAsync(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 listReleasesTest() throws Exception { + Release responsesElement = Release.newBuilder().build(); + ListReleasesResponse expectedResponse = + ListReleasesResponse.newBuilder() + .setNextPageToken("") + .addAllReleases(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + + ListReleasesPagedResponse pagedListResponse = client.listReleases(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReleasesList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReleasesRequest actualRequest = ((ListReleasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReleasesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + client.listReleases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReleasesTest2() throws Exception { + Release responsesElement = Release.newBuilder().build(); + ListReleasesResponse expectedResponse = + ListReleasesResponse.newBuilder() + .setNextPageToken("") + .addAllReleases(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListReleasesPagedResponse pagedListResponse = client.listReleases(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReleasesList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReleasesRequest actualRequest = ((ListReleasesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReleasesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + client.listReleases(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReleaseTest() throws Exception { + Release expectedResponse = + Release.newBuilder() + .setName( + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setRenderStartTime(Timestamp.newBuilder().build()) + .setRenderEndTime(Timestamp.newBuilder().build()) + .setSkaffoldConfigUri("skaffoldConfigUri1907228268") + .setSkaffoldConfigPath("skaffoldConfigPath-1005630683") + .addAllBuildArtifacts(new ArrayList()) + .setDeliveryPipelineSnapshot(DeliveryPipeline.newBuilder().build()) + .addAllTargetSnapshots(new ArrayList()) + .setEtag("etag3123477") + .setSkaffoldVersion("skaffoldVersion229290234") + .putAllTargetArtifacts(new HashMap()) + .putAllTargetRenders(new HashMap()) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + ReleaseName name = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]"); + + Release actualResponse = client.getRelease(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReleaseRequest actualRequest = ((GetReleaseRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReleaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + ReleaseName name = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]"); + client.getRelease(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReleaseTest2() throws Exception { + Release expectedResponse = + Release.newBuilder() + .setName( + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setRenderStartTime(Timestamp.newBuilder().build()) + .setRenderEndTime(Timestamp.newBuilder().build()) + .setSkaffoldConfigUri("skaffoldConfigUri1907228268") + .setSkaffoldConfigPath("skaffoldConfigPath-1005630683") + .addAllBuildArtifacts(new ArrayList()) + .setDeliveryPipelineSnapshot(DeliveryPipeline.newBuilder().build()) + .addAllTargetSnapshots(new ArrayList()) + .setEtag("etag3123477") + .setSkaffoldVersion("skaffoldVersion229290234") + .putAllTargetArtifacts(new HashMap()) + .putAllTargetRenders(new HashMap()) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + + Release actualResponse = client.getRelease(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReleaseRequest actualRequest = ((GetReleaseRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReleaseExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.getRelease(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReleaseTest() throws Exception { + Release expectedResponse = + Release.newBuilder() + .setName( + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setRenderStartTime(Timestamp.newBuilder().build()) + .setRenderEndTime(Timestamp.newBuilder().build()) + .setSkaffoldConfigUri("skaffoldConfigUri1907228268") + .setSkaffoldConfigPath("skaffoldConfigPath-1005630683") + .addAllBuildArtifacts(new ArrayList()) + .setDeliveryPipelineSnapshot(DeliveryPipeline.newBuilder().build()) + .addAllTargetSnapshots(new ArrayList()) + .setEtag("etag3123477") + .setSkaffoldVersion("skaffoldVersion229290234") + .putAllTargetArtifacts(new HashMap()) + .putAllTargetRenders(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createReleaseTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + Release release = Release.newBuilder().build(); + String releaseId = "releaseId89607042"; + + Release actualResponse = client.createReleaseAsync(parent, release, releaseId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReleaseRequest actualRequest = ((CreateReleaseRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(release, actualRequest.getRelease()); + Assert.assertEquals(releaseId, actualRequest.getReleaseId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReleaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + Release release = Release.newBuilder().build(); + String releaseId = "releaseId89607042"; + client.createReleaseAsync(parent, release, releaseId).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 createReleaseTest2() throws Exception { + Release expectedResponse = + Release.newBuilder() + .setName( + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setRenderStartTime(Timestamp.newBuilder().build()) + .setRenderEndTime(Timestamp.newBuilder().build()) + .setSkaffoldConfigUri("skaffoldConfigUri1907228268") + .setSkaffoldConfigPath("skaffoldConfigPath-1005630683") + .addAllBuildArtifacts(new ArrayList()) + .setDeliveryPipelineSnapshot(DeliveryPipeline.newBuilder().build()) + .addAllTargetSnapshots(new ArrayList()) + .setEtag("etag3123477") + .setSkaffoldVersion("skaffoldVersion229290234") + .putAllTargetArtifacts(new HashMap()) + .putAllTargetRenders(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createReleaseTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + String parent = "parent-995424086"; + Release release = Release.newBuilder().build(); + String releaseId = "releaseId89607042"; + + Release actualResponse = client.createReleaseAsync(parent, release, releaseId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReleaseRequest actualRequest = ((CreateReleaseRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(release, actualRequest.getRelease()); + Assert.assertEquals(releaseId, actualRequest.getReleaseId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReleaseExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + Release release = Release.newBuilder().build(); + String releaseId = "releaseId89607042"; + client.createReleaseAsync(parent, release, releaseId).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 approveRolloutTest() throws Exception { + ApproveRolloutResponse expectedResponse = ApproveRolloutResponse.newBuilder().build(); + mockCloudDeploy.addResponse(expectedResponse); + + RolloutName name = + RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + + ApproveRolloutResponse actualResponse = client.approveRollout(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ApproveRolloutRequest actualRequest = ((ApproveRolloutRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void approveRolloutExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + RolloutName name = + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + client.approveRollout(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void approveRolloutTest2() throws Exception { + ApproveRolloutResponse expectedResponse = ApproveRolloutResponse.newBuilder().build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + + ApproveRolloutResponse actualResponse = client.approveRollout(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ApproveRolloutRequest actualRequest = ((ApproveRolloutRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void approveRolloutExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.approveRollout(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRolloutsTest() throws Exception { + Rollout responsesElement = Rollout.newBuilder().build(); + ListRolloutsResponse expectedResponse = + ListRolloutsResponse.newBuilder() + .setNextPageToken("") + .addAllRollouts(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + ReleaseName parent = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]"); + + ListRolloutsPagedResponse pagedListResponse = client.listRollouts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRolloutsList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRolloutsRequest actualRequest = ((ListRolloutsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRolloutsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + ReleaseName parent = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]"); + client.listRollouts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRolloutsTest2() throws Exception { + Rollout responsesElement = Rollout.newBuilder().build(); + ListRolloutsResponse expectedResponse = + ListRolloutsResponse.newBuilder() + .setNextPageToken("") + .addAllRollouts(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRolloutsPagedResponse pagedListResponse = client.listRollouts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRolloutsList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRolloutsRequest actualRequest = ((ListRolloutsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRolloutsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRollouts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRolloutTest() throws Exception { + Rollout expectedResponse = + Rollout.newBuilder() + .setName( + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setApproveTime(Timestamp.newBuilder().build()) + .setEnqueueTime(Timestamp.newBuilder().build()) + .setDeployStartTime(Timestamp.newBuilder().build()) + .setDeployEndTime(Timestamp.newBuilder().build()) + .setTargetId("targetId-441951604") + .setFailureReason("failureReason-1990598546") + .setDeployingBuild("deployingBuild-1935837805") + .setEtag("etag3123477") + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + RolloutName name = + RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + + Rollout actualResponse = client.getRollout(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRolloutRequest actualRequest = ((GetRolloutRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRolloutExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + RolloutName name = + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + client.getRollout(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRolloutTest2() throws Exception { + Rollout expectedResponse = + Rollout.newBuilder() + .setName( + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setApproveTime(Timestamp.newBuilder().build()) + .setEnqueueTime(Timestamp.newBuilder().build()) + .setDeployStartTime(Timestamp.newBuilder().build()) + .setDeployEndTime(Timestamp.newBuilder().build()) + .setTargetId("targetId-441951604") + .setFailureReason("failureReason-1990598546") + .setDeployingBuild("deployingBuild-1935837805") + .setEtag("etag3123477") + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + + Rollout actualResponse = client.getRollout(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRolloutRequest actualRequest = ((GetRolloutRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRolloutExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.getRollout(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRolloutTest() throws Exception { + Rollout expectedResponse = + Rollout.newBuilder() + .setName( + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setApproveTime(Timestamp.newBuilder().build()) + .setEnqueueTime(Timestamp.newBuilder().build()) + .setDeployStartTime(Timestamp.newBuilder().build()) + .setDeployEndTime(Timestamp.newBuilder().build()) + .setTargetId("targetId-441951604") + .setFailureReason("failureReason-1990598546") + .setDeployingBuild("deployingBuild-1935837805") + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRolloutTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + ReleaseName parent = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]"); + Rollout rollout = Rollout.newBuilder().build(); + String rolloutId = "rolloutId551248556"; + + Rollout actualResponse = client.createRolloutAsync(parent, rollout, rolloutId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRolloutRequest actualRequest = ((CreateRolloutRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(rollout, actualRequest.getRollout()); + Assert.assertEquals(rolloutId, actualRequest.getRolloutId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRolloutExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + ReleaseName parent = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]"); + Rollout rollout = Rollout.newBuilder().build(); + String rolloutId = "rolloutId551248556"; + client.createRolloutAsync(parent, rollout, rolloutId).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 createRolloutTest2() throws Exception { + Rollout expectedResponse = + Rollout.newBuilder() + .setName( + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setApproveTime(Timestamp.newBuilder().build()) + .setEnqueueTime(Timestamp.newBuilder().build()) + .setDeployStartTime(Timestamp.newBuilder().build()) + .setDeployEndTime(Timestamp.newBuilder().build()) + .setTargetId("targetId-441951604") + .setFailureReason("failureReason-1990598546") + .setDeployingBuild("deployingBuild-1935837805") + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRolloutTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + String parent = "parent-995424086"; + Rollout rollout = Rollout.newBuilder().build(); + String rolloutId = "rolloutId551248556"; + + Rollout actualResponse = client.createRolloutAsync(parent, rollout, rolloutId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRolloutRequest actualRequest = ((CreateRolloutRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(rollout, actualRequest.getRollout()); + Assert.assertEquals(rolloutId, actualRequest.getRolloutId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRolloutExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + Rollout rollout = Rollout.newBuilder().build(); + String rolloutId = "rolloutId551248556"; + client.createRolloutAsync(parent, rollout, rolloutId).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 getConfigTest() throws Exception { + Config expectedResponse = + Config.newBuilder() + .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllSupportedVersions(new ArrayList()) + .setDefaultSkaffoldVersion("defaultSkaffoldVersion-1555289991") + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + ConfigName name = ConfigName.of("[PROJECT]", "[LOCATION]"); + + Config actualResponse = client.getConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConfigRequest actualRequest = ((GetConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + ConfigName name = ConfigName.of("[PROJECT]", "[LOCATION]"); + client.getConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConfigTest2() throws Exception { + Config expectedResponse = + Config.newBuilder() + .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllSupportedVersions(new ArrayList()) + .setDefaultSkaffoldVersion("defaultSkaffoldVersion-1555289991") + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + + Config actualResponse = client.getConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConfigRequest actualRequest = ((GetConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.getConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeploy.java b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeploy.java new file mode 100644 index 0000000..e0528d6 --- /dev/null +++ b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeploy.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.deploy.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 MockCloudDeploy implements MockGrpcService { + private final MockCloudDeployImpl serviceImpl; + + public MockCloudDeploy() { + serviceImpl = new MockCloudDeployImpl(); + } + + @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-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java new file mode 100644 index 0000000..13b8d26 --- /dev/null +++ b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java @@ -0,0 +1,436 @@ +/* + * 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.deploy.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.deploy.v1.CloudDeployGrpc.CloudDeployImplBase; +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 MockCloudDeployImpl extends CloudDeployImplBase { + private List requests; + private Queue responses; + + public MockCloudDeployImpl() { + 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 listDeliveryPipelines( + ListDeliveryPipelinesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDeliveryPipelinesResponse) { + requests.add(request); + responseObserver.onNext(((ListDeliveryPipelinesResponse) 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 ListDeliveryPipelines, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDeliveryPipelinesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDeliveryPipeline( + GetDeliveryPipelineRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DeliveryPipeline) { + requests.add(request); + responseObserver.onNext(((DeliveryPipeline) 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 GetDeliveryPipeline, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DeliveryPipeline.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDeliveryPipeline( + CreateDeliveryPipelineRequest 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 CreateDeliveryPipeline, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDeliveryPipeline( + UpdateDeliveryPipelineRequest 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 UpdateDeliveryPipeline, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDeliveryPipeline( + DeleteDeliveryPipelineRequest 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 DeleteDeliveryPipeline, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTargets( + ListTargetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListTargetsResponse) { + requests.add(request); + responseObserver.onNext(((ListTargetsResponse) 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 ListTargets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListTargetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTarget(GetTargetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Target) { + requests.add(request); + responseObserver.onNext(((Target) 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 GetTarget, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Target.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createTarget( + CreateTargetRequest 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 CreateTarget, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateTarget( + UpdateTargetRequest 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 UpdateTarget, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteTarget( + DeleteTargetRequest 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 DeleteTarget, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listReleases( + ListReleasesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListReleasesResponse) { + requests.add(request); + responseObserver.onNext(((ListReleasesResponse) 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 ListReleases, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListReleasesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRelease(GetReleaseRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Release) { + requests.add(request); + responseObserver.onNext(((Release) 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 GetRelease, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Release.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createRelease( + CreateReleaseRequest 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 CreateRelease, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void approveRollout( + ApproveRolloutRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ApproveRolloutResponse) { + requests.add(request); + responseObserver.onNext(((ApproveRolloutResponse) 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 ApproveRollout, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ApproveRolloutResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRollouts( + ListRolloutsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRolloutsResponse) { + requests.add(request); + responseObserver.onNext(((ListRolloutsResponse) 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 ListRollouts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRolloutsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRollout(GetRolloutRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Rollout) { + requests.add(request); + responseObserver.onNext(((Rollout) 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 GetRollout, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Rollout.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createRollout( + CreateRolloutRequest 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 CreateRollout, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getConfig(GetConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Config) { + requests.add(request); + responseObserver.onNext(((Config) 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 GetConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Config.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/grpc-google-cloud-deploy-v1/pom.xml b/grpc-google-cloud-deploy-v1/pom.xml new file mode 100644 index 0000000..1ac63ea --- /dev/null +++ b/grpc-google-cloud-deploy-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-deploy-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-deploy-v1 + GRPC library for google-cloud-deploy + + com.google.cloud + google-cloud-deploy-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-deploy-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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.java b/grpc-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.java new file mode 100644 index 0000000..3c17dee --- /dev/null +++ b/grpc-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.java @@ -0,0 +1,2294 @@ +/* + * 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.deploy.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * CloudDeploy service creates and manages Continuous Delivery operations
+ * on Google Cloud Platform via Skaffold (https://skaffold.dev).
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/deploy/v1/cloud_deploy.proto") +public final class CloudDeployGrpc { + + private CloudDeployGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.deploy.v1.CloudDeploy"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest, + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse> + getListDeliveryPipelinesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDeliveryPipelines", + requestType = com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest.class, + responseType = com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest, + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse> + getListDeliveryPipelinesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest, + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse> + getListDeliveryPipelinesMethod; + if ((getListDeliveryPipelinesMethod = CloudDeployGrpc.getListDeliveryPipelinesMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getListDeliveryPipelinesMethod = CloudDeployGrpc.getListDeliveryPipelinesMethod) + == null) { + CloudDeployGrpc.getListDeliveryPipelinesMethod = + getListDeliveryPipelinesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListDeliveryPipelines")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("ListDeliveryPipelines")) + .build(); + } + } + } + return getListDeliveryPipelinesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest, + com.google.cloud.deploy.v1.DeliveryPipeline> + getGetDeliveryPipelineMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDeliveryPipeline", + requestType = com.google.cloud.deploy.v1.GetDeliveryPipelineRequest.class, + responseType = com.google.cloud.deploy.v1.DeliveryPipeline.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest, + com.google.cloud.deploy.v1.DeliveryPipeline> + getGetDeliveryPipelineMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest, + com.google.cloud.deploy.v1.DeliveryPipeline> + getGetDeliveryPipelineMethod; + if ((getGetDeliveryPipelineMethod = CloudDeployGrpc.getGetDeliveryPipelineMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getGetDeliveryPipelineMethod = CloudDeployGrpc.getGetDeliveryPipelineMethod) == null) { + CloudDeployGrpc.getGetDeliveryPipelineMethod = + getGetDeliveryPipelineMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetDeliveryPipeline")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("GetDeliveryPipeline")) + .build(); + } + } + } + return getGetDeliveryPipelineMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest, + com.google.longrunning.Operation> + getCreateDeliveryPipelineMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDeliveryPipeline", + requestType = com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest, + com.google.longrunning.Operation> + getCreateDeliveryPipelineMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest, + com.google.longrunning.Operation> + getCreateDeliveryPipelineMethod; + if ((getCreateDeliveryPipelineMethod = CloudDeployGrpc.getCreateDeliveryPipelineMethod) + == null) { + synchronized (CloudDeployGrpc.class) { + if ((getCreateDeliveryPipelineMethod = CloudDeployGrpc.getCreateDeliveryPipelineMethod) + == null) { + CloudDeployGrpc.getCreateDeliveryPipelineMethod = + getCreateDeliveryPipelineMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateDeliveryPipeline")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("CreateDeliveryPipeline")) + .build(); + } + } + } + return getCreateDeliveryPipelineMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest, + com.google.longrunning.Operation> + getUpdateDeliveryPipelineMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDeliveryPipeline", + requestType = com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest, + com.google.longrunning.Operation> + getUpdateDeliveryPipelineMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest, + com.google.longrunning.Operation> + getUpdateDeliveryPipelineMethod; + if ((getUpdateDeliveryPipelineMethod = CloudDeployGrpc.getUpdateDeliveryPipelineMethod) + == null) { + synchronized (CloudDeployGrpc.class) { + if ((getUpdateDeliveryPipelineMethod = CloudDeployGrpc.getUpdateDeliveryPipelineMethod) + == null) { + CloudDeployGrpc.getUpdateDeliveryPipelineMethod = + getUpdateDeliveryPipelineMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateDeliveryPipeline")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("UpdateDeliveryPipeline")) + .build(); + } + } + } + return getUpdateDeliveryPipelineMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest, + com.google.longrunning.Operation> + getDeleteDeliveryPipelineMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDeliveryPipeline", + requestType = com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest, + com.google.longrunning.Operation> + getDeleteDeliveryPipelineMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest, + com.google.longrunning.Operation> + getDeleteDeliveryPipelineMethod; + if ((getDeleteDeliveryPipelineMethod = CloudDeployGrpc.getDeleteDeliveryPipelineMethod) + == null) { + synchronized (CloudDeployGrpc.class) { + if ((getDeleteDeliveryPipelineMethod = CloudDeployGrpc.getDeleteDeliveryPipelineMethod) + == null) { + CloudDeployGrpc.getDeleteDeliveryPipelineMethod = + getDeleteDeliveryPipelineMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteDeliveryPipeline")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("DeleteDeliveryPipeline")) + .build(); + } + } + } + return getDeleteDeliveryPipelineMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListTargetsRequest, + com.google.cloud.deploy.v1.ListTargetsResponse> + getListTargetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTargets", + requestType = com.google.cloud.deploy.v1.ListTargetsRequest.class, + responseType = com.google.cloud.deploy.v1.ListTargetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListTargetsRequest, + com.google.cloud.deploy.v1.ListTargetsResponse> + getListTargetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListTargetsRequest, + com.google.cloud.deploy.v1.ListTargetsResponse> + getListTargetsMethod; + if ((getListTargetsMethod = CloudDeployGrpc.getListTargetsMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getListTargetsMethod = CloudDeployGrpc.getListTargetsMethod) == null) { + CloudDeployGrpc.getListTargetsMethod = + getListTargetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTargets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListTargetsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListTargetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("ListTargets")) + .build(); + } + } + } + return getListTargetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetTargetRequest, com.google.cloud.deploy.v1.Target> + getGetTargetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTarget", + requestType = com.google.cloud.deploy.v1.GetTargetRequest.class, + responseType = com.google.cloud.deploy.v1.Target.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetTargetRequest, com.google.cloud.deploy.v1.Target> + getGetTargetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetTargetRequest, com.google.cloud.deploy.v1.Target> + getGetTargetMethod; + if ((getGetTargetMethod = CloudDeployGrpc.getGetTargetMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getGetTargetMethod = CloudDeployGrpc.getGetTargetMethod) == null) { + CloudDeployGrpc.getGetTargetMethod = + getGetTargetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTarget")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.GetTargetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.Target.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("GetTarget")) + .build(); + } + } + } + return getGetTargetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateTargetRequest, com.google.longrunning.Operation> + getCreateTargetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTarget", + requestType = com.google.cloud.deploy.v1.CreateTargetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateTargetRequest, com.google.longrunning.Operation> + getCreateTargetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateTargetRequest, com.google.longrunning.Operation> + getCreateTargetMethod; + if ((getCreateTargetMethod = CloudDeployGrpc.getCreateTargetMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getCreateTargetMethod = CloudDeployGrpc.getCreateTargetMethod) == null) { + CloudDeployGrpc.getCreateTargetMethod = + getCreateTargetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTarget")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.CreateTargetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("CreateTarget")) + .build(); + } + } + } + return getCreateTargetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.UpdateTargetRequest, com.google.longrunning.Operation> + getUpdateTargetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTarget", + requestType = com.google.cloud.deploy.v1.UpdateTargetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.UpdateTargetRequest, com.google.longrunning.Operation> + getUpdateTargetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.UpdateTargetRequest, com.google.longrunning.Operation> + getUpdateTargetMethod; + if ((getUpdateTargetMethod = CloudDeployGrpc.getUpdateTargetMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getUpdateTargetMethod = CloudDeployGrpc.getUpdateTargetMethod) == null) { + CloudDeployGrpc.getUpdateTargetMethod = + getUpdateTargetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTarget")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.UpdateTargetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("UpdateTarget")) + .build(); + } + } + } + return getUpdateTargetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.DeleteTargetRequest, com.google.longrunning.Operation> + getDeleteTargetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTarget", + requestType = com.google.cloud.deploy.v1.DeleteTargetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.DeleteTargetRequest, com.google.longrunning.Operation> + getDeleteTargetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.DeleteTargetRequest, com.google.longrunning.Operation> + getDeleteTargetMethod; + if ((getDeleteTargetMethod = CloudDeployGrpc.getDeleteTargetMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getDeleteTargetMethod = CloudDeployGrpc.getDeleteTargetMethod) == null) { + CloudDeployGrpc.getDeleteTargetMethod = + getDeleteTargetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTarget")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.DeleteTargetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("DeleteTarget")) + .build(); + } + } + } + return getDeleteTargetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListReleasesRequest, + com.google.cloud.deploy.v1.ListReleasesResponse> + getListReleasesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListReleases", + requestType = com.google.cloud.deploy.v1.ListReleasesRequest.class, + responseType = com.google.cloud.deploy.v1.ListReleasesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListReleasesRequest, + com.google.cloud.deploy.v1.ListReleasesResponse> + getListReleasesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListReleasesRequest, + com.google.cloud.deploy.v1.ListReleasesResponse> + getListReleasesMethod; + if ((getListReleasesMethod = CloudDeployGrpc.getListReleasesMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getListReleasesMethod = CloudDeployGrpc.getListReleasesMethod) == null) { + CloudDeployGrpc.getListReleasesMethod = + getListReleasesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListReleases")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListReleasesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListReleasesResponse.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("ListReleases")) + .build(); + } + } + } + return getListReleasesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetReleaseRequest, com.google.cloud.deploy.v1.Release> + getGetReleaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRelease", + requestType = com.google.cloud.deploy.v1.GetReleaseRequest.class, + responseType = com.google.cloud.deploy.v1.Release.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetReleaseRequest, com.google.cloud.deploy.v1.Release> + getGetReleaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetReleaseRequest, com.google.cloud.deploy.v1.Release> + getGetReleaseMethod; + if ((getGetReleaseMethod = CloudDeployGrpc.getGetReleaseMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getGetReleaseMethod = CloudDeployGrpc.getGetReleaseMethod) == null) { + CloudDeployGrpc.getGetReleaseMethod = + getGetReleaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRelease")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.GetReleaseRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.Release.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("GetRelease")) + .build(); + } + } + } + return getGetReleaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateReleaseRequest, com.google.longrunning.Operation> + getCreateReleaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateRelease", + requestType = com.google.cloud.deploy.v1.CreateReleaseRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateReleaseRequest, com.google.longrunning.Operation> + getCreateReleaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateReleaseRequest, com.google.longrunning.Operation> + getCreateReleaseMethod; + if ((getCreateReleaseMethod = CloudDeployGrpc.getCreateReleaseMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getCreateReleaseMethod = CloudDeployGrpc.getCreateReleaseMethod) == null) { + CloudDeployGrpc.getCreateReleaseMethod = + getCreateReleaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateRelease")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.CreateReleaseRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("CreateRelease")) + .build(); + } + } + } + return getCreateReleaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ApproveRolloutRequest, + com.google.cloud.deploy.v1.ApproveRolloutResponse> + getApproveRolloutMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ApproveRollout", + requestType = com.google.cloud.deploy.v1.ApproveRolloutRequest.class, + responseType = com.google.cloud.deploy.v1.ApproveRolloutResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ApproveRolloutRequest, + com.google.cloud.deploy.v1.ApproveRolloutResponse> + getApproveRolloutMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ApproveRolloutRequest, + com.google.cloud.deploy.v1.ApproveRolloutResponse> + getApproveRolloutMethod; + if ((getApproveRolloutMethod = CloudDeployGrpc.getApproveRolloutMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getApproveRolloutMethod = CloudDeployGrpc.getApproveRolloutMethod) == null) { + CloudDeployGrpc.getApproveRolloutMethod = + getApproveRolloutMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ApproveRollout")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ApproveRolloutRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ApproveRolloutResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("ApproveRollout")) + .build(); + } + } + } + return getApproveRolloutMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListRolloutsRequest, + com.google.cloud.deploy.v1.ListRolloutsResponse> + getListRolloutsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRollouts", + requestType = com.google.cloud.deploy.v1.ListRolloutsRequest.class, + responseType = com.google.cloud.deploy.v1.ListRolloutsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListRolloutsRequest, + com.google.cloud.deploy.v1.ListRolloutsResponse> + getListRolloutsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListRolloutsRequest, + com.google.cloud.deploy.v1.ListRolloutsResponse> + getListRolloutsMethod; + if ((getListRolloutsMethod = CloudDeployGrpc.getListRolloutsMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getListRolloutsMethod = CloudDeployGrpc.getListRolloutsMethod) == null) { + CloudDeployGrpc.getListRolloutsMethod = + getListRolloutsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRollouts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListRolloutsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListRolloutsResponse.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("ListRollouts")) + .build(); + } + } + } + return getListRolloutsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetRolloutRequest, com.google.cloud.deploy.v1.Rollout> + getGetRolloutMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRollout", + requestType = com.google.cloud.deploy.v1.GetRolloutRequest.class, + responseType = com.google.cloud.deploy.v1.Rollout.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetRolloutRequest, com.google.cloud.deploy.v1.Rollout> + getGetRolloutMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetRolloutRequest, com.google.cloud.deploy.v1.Rollout> + getGetRolloutMethod; + if ((getGetRolloutMethod = CloudDeployGrpc.getGetRolloutMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getGetRolloutMethod = CloudDeployGrpc.getGetRolloutMethod) == null) { + CloudDeployGrpc.getGetRolloutMethod = + getGetRolloutMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRollout")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.GetRolloutRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.Rollout.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("GetRollout")) + .build(); + } + } + } + return getGetRolloutMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateRolloutRequest, com.google.longrunning.Operation> + getCreateRolloutMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateRollout", + requestType = com.google.cloud.deploy.v1.CreateRolloutRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateRolloutRequest, com.google.longrunning.Operation> + getCreateRolloutMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateRolloutRequest, com.google.longrunning.Operation> + getCreateRolloutMethod; + if ((getCreateRolloutMethod = CloudDeployGrpc.getCreateRolloutMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getCreateRolloutMethod = CloudDeployGrpc.getCreateRolloutMethod) == null) { + CloudDeployGrpc.getCreateRolloutMethod = + getCreateRolloutMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateRollout")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.CreateRolloutRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("CreateRollout")) + .build(); + } + } + } + return getCreateRolloutMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetConfigRequest, com.google.cloud.deploy.v1.Config> + getGetConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetConfig", + requestType = com.google.cloud.deploy.v1.GetConfigRequest.class, + responseType = com.google.cloud.deploy.v1.Config.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetConfigRequest, com.google.cloud.deploy.v1.Config> + getGetConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetConfigRequest, com.google.cloud.deploy.v1.Config> + getGetConfigMethod; + if ((getGetConfigMethod = CloudDeployGrpc.getGetConfigMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getGetConfigMethod = CloudDeployGrpc.getGetConfigMethod) == null) { + CloudDeployGrpc.getGetConfigMethod = + getGetConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.GetConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.Config.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("GetConfig")) + .build(); + } + } + } + return getGetConfigMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CloudDeployStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudDeployStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudDeployStub(channel, callOptions); + } + }; + return CloudDeployStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CloudDeployBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudDeployBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudDeployBlockingStub(channel, callOptions); + } + }; + return CloudDeployBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CloudDeployFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudDeployFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudDeployFutureStub(channel, callOptions); + } + }; + return CloudDeployFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * CloudDeploy service creates and manages Continuous Delivery operations
+   * on Google Cloud Platform via Skaffold (https://skaffold.dev).
+   * 
+ */ + public abstract static class CloudDeployImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists DeliveryPipelines in a given project and location.
+     * 
+ */ + public void listDeliveryPipelines( + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDeliveryPipelinesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single DeliveryPipeline.
+     * 
+ */ + public void getDeliveryPipeline( + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDeliveryPipelineMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new DeliveryPipeline in a given project and location.
+     * 
+ */ + public void createDeliveryPipeline( + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDeliveryPipelineMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single DeliveryPipeline.
+     * 
+ */ + public void updateDeliveryPipeline( + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDeliveryPipelineMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single DeliveryPipeline.
+     * 
+ */ + public void deleteDeliveryPipeline( + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDeliveryPipelineMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Targets in a given project and location.
+     * 
+ */ + public void listTargets( + com.google.cloud.deploy.v1.ListTargetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListTargetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Target.
+     * 
+ */ + public void getTarget( + com.google.cloud.deploy.v1.GetTargetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTargetMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Target in a given project and location.
+     * 
+ */ + public void createTarget( + com.google.cloud.deploy.v1.CreateTargetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateTargetMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Target.
+     * 
+ */ + public void updateTarget( + com.google.cloud.deploy.v1.UpdateTargetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateTargetMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Target.
+     * 
+ */ + public void deleteTarget( + com.google.cloud.deploy.v1.DeleteTargetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteTargetMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Releases in a given project and location.
+     * 
+ */ + public void listReleases( + com.google.cloud.deploy.v1.ListReleasesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListReleasesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Release.
+     * 
+ */ + public void getRelease( + com.google.cloud.deploy.v1.GetReleaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetReleaseMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Release in a given project and location.
+     * 
+ */ + public void createRelease( + com.google.cloud.deploy.v1.CreateReleaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateReleaseMethod(), responseObserver); + } + + /** + * + * + *
+     * Approves a Rollout.
+     * 
+ */ + public void approveRollout( + com.google.cloud.deploy.v1.ApproveRolloutRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getApproveRolloutMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Rollouts in a given project and location.
+     * 
+ */ + public void listRollouts( + com.google.cloud.deploy.v1.ListRolloutsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRolloutsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Rollout.
+     * 
+ */ + public void getRollout( + com.google.cloud.deploy.v1.GetRolloutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRolloutMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Rollout in a given project and location.
+     * 
+ */ + public void createRollout( + com.google.cloud.deploy.v1.CreateRolloutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateRolloutMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the configuration for a location.
+     * 
+ */ + public void getConfig( + com.google.cloud.deploy.v1.GetConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConfigMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListDeliveryPipelinesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest, + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse>( + this, METHODID_LIST_DELIVERY_PIPELINES))) + .addMethod( + getGetDeliveryPipelineMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest, + com.google.cloud.deploy.v1.DeliveryPipeline>( + this, METHODID_GET_DELIVERY_PIPELINE))) + .addMethod( + getCreateDeliveryPipelineMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_DELIVERY_PIPELINE))) + .addMethod( + getUpdateDeliveryPipelineMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_DELIVERY_PIPELINE))) + .addMethod( + getDeleteDeliveryPipelineMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_DELIVERY_PIPELINE))) + .addMethod( + getListTargetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.ListTargetsRequest, + com.google.cloud.deploy.v1.ListTargetsResponse>(this, METHODID_LIST_TARGETS))) + .addMethod( + getGetTargetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.GetTargetRequest, + com.google.cloud.deploy.v1.Target>(this, METHODID_GET_TARGET))) + .addMethod( + getCreateTargetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.CreateTargetRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_TARGET))) + .addMethod( + getUpdateTargetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.UpdateTargetRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_TARGET))) + .addMethod( + getDeleteTargetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.DeleteTargetRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_TARGET))) + .addMethod( + getListReleasesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.ListReleasesRequest, + com.google.cloud.deploy.v1.ListReleasesResponse>( + this, METHODID_LIST_RELEASES))) + .addMethod( + getGetReleaseMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.GetReleaseRequest, + com.google.cloud.deploy.v1.Release>(this, METHODID_GET_RELEASE))) + .addMethod( + getCreateReleaseMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.CreateReleaseRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_RELEASE))) + .addMethod( + getApproveRolloutMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.ApproveRolloutRequest, + com.google.cloud.deploy.v1.ApproveRolloutResponse>( + this, METHODID_APPROVE_ROLLOUT))) + .addMethod( + getListRolloutsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.ListRolloutsRequest, + com.google.cloud.deploy.v1.ListRolloutsResponse>( + this, METHODID_LIST_ROLLOUTS))) + .addMethod( + getGetRolloutMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.GetRolloutRequest, + com.google.cloud.deploy.v1.Rollout>(this, METHODID_GET_ROLLOUT))) + .addMethod( + getCreateRolloutMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.CreateRolloutRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_ROLLOUT))) + .addMethod( + getGetConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.GetConfigRequest, + com.google.cloud.deploy.v1.Config>(this, METHODID_GET_CONFIG))) + .build(); + } + } + + /** + * + * + *
+   * CloudDeploy service creates and manages Continuous Delivery operations
+   * on Google Cloud Platform via Skaffold (https://skaffold.dev).
+   * 
+ */ + public static final class CloudDeployStub + extends io.grpc.stub.AbstractAsyncStub { + private CloudDeployStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudDeployStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudDeployStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists DeliveryPipelines in a given project and location.
+     * 
+ */ + public void listDeliveryPipelines( + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDeliveryPipelinesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single DeliveryPipeline.
+     * 
+ */ + public void getDeliveryPipeline( + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDeliveryPipelineMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new DeliveryPipeline in a given project and location.
+     * 
+ */ + public void createDeliveryPipeline( + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDeliveryPipelineMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single DeliveryPipeline.
+     * 
+ */ + public void updateDeliveryPipeline( + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDeliveryPipelineMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single DeliveryPipeline.
+     * 
+ */ + public void deleteDeliveryPipeline( + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDeliveryPipelineMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Targets in a given project and location.
+     * 
+ */ + public void listTargets( + com.google.cloud.deploy.v1.ListTargetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTargetsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Target.
+     * 
+ */ + public void getTarget( + com.google.cloud.deploy.v1.GetTargetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTargetMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Target in a given project and location.
+     * 
+ */ + public void createTarget( + com.google.cloud.deploy.v1.CreateTargetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateTargetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Target.
+     * 
+ */ + public void updateTarget( + com.google.cloud.deploy.v1.UpdateTargetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateTargetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Target.
+     * 
+ */ + public void deleteTarget( + com.google.cloud.deploy.v1.DeleteTargetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteTargetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Releases in a given project and location.
+     * 
+ */ + public void listReleases( + com.google.cloud.deploy.v1.ListReleasesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListReleasesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Release.
+     * 
+ */ + public void getRelease( + com.google.cloud.deploy.v1.GetReleaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetReleaseMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Release in a given project and location.
+     * 
+ */ + public void createRelease( + com.google.cloud.deploy.v1.CreateReleaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateReleaseMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Approves a Rollout.
+     * 
+ */ + public void approveRollout( + com.google.cloud.deploy.v1.ApproveRolloutRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getApproveRolloutMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Rollouts in a given project and location.
+     * 
+ */ + public void listRollouts( + com.google.cloud.deploy.v1.ListRolloutsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRolloutsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Rollout.
+     * 
+ */ + public void getRollout( + com.google.cloud.deploy.v1.GetRolloutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRolloutMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Rollout in a given project and location.
+     * 
+ */ + public void createRollout( + com.google.cloud.deploy.v1.CreateRolloutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateRolloutMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the configuration for a location.
+     * 
+ */ + public void getConfig( + com.google.cloud.deploy.v1.GetConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetConfigMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * + * + *
+   * CloudDeploy service creates and manages Continuous Delivery operations
+   * on Google Cloud Platform via Skaffold (https://skaffold.dev).
+   * 
+ */ + public static final class CloudDeployBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CloudDeployBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudDeployBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudDeployBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists DeliveryPipelines in a given project and location.
+     * 
+ */ + public com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse listDeliveryPipelines( + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDeliveryPipelinesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single DeliveryPipeline.
+     * 
+ */ + public com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipeline( + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDeliveryPipelineMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new DeliveryPipeline in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createDeliveryPipeline( + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDeliveryPipelineMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single DeliveryPipeline.
+     * 
+ */ + public com.google.longrunning.Operation updateDeliveryPipeline( + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDeliveryPipelineMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single DeliveryPipeline.
+     * 
+ */ + public com.google.longrunning.Operation deleteDeliveryPipeline( + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDeliveryPipelineMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Targets in a given project and location.
+     * 
+ */ + public com.google.cloud.deploy.v1.ListTargetsResponse listTargets( + com.google.cloud.deploy.v1.ListTargetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTargetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Target.
+     * 
+ */ + public com.google.cloud.deploy.v1.Target getTarget( + com.google.cloud.deploy.v1.GetTargetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTargetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Target in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createTarget( + com.google.cloud.deploy.v1.CreateTargetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateTargetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Target.
+     * 
+ */ + public com.google.longrunning.Operation updateTarget( + com.google.cloud.deploy.v1.UpdateTargetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateTargetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Target.
+     * 
+ */ + public com.google.longrunning.Operation deleteTarget( + com.google.cloud.deploy.v1.DeleteTargetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteTargetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Releases in a given project and location.
+     * 
+ */ + public com.google.cloud.deploy.v1.ListReleasesResponse listReleases( + com.google.cloud.deploy.v1.ListReleasesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListReleasesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Release.
+     * 
+ */ + public com.google.cloud.deploy.v1.Release getRelease( + com.google.cloud.deploy.v1.GetReleaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetReleaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Release in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createRelease( + com.google.cloud.deploy.v1.CreateReleaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateReleaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Approves a Rollout.
+     * 
+ */ + public com.google.cloud.deploy.v1.ApproveRolloutResponse approveRollout( + com.google.cloud.deploy.v1.ApproveRolloutRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getApproveRolloutMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Rollouts in a given project and location.
+     * 
+ */ + public com.google.cloud.deploy.v1.ListRolloutsResponse listRollouts( + com.google.cloud.deploy.v1.ListRolloutsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRolloutsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Rollout.
+     * 
+ */ + public com.google.cloud.deploy.v1.Rollout getRollout( + com.google.cloud.deploy.v1.GetRolloutRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRolloutMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Rollout in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createRollout( + com.google.cloud.deploy.v1.CreateRolloutRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateRolloutMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the configuration for a location.
+     * 
+ */ + public com.google.cloud.deploy.v1.Config getConfig( + com.google.cloud.deploy.v1.GetConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetConfigMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * CloudDeploy service creates and manages Continuous Delivery operations
+   * on Google Cloud Platform via Skaffold (https://skaffold.dev).
+   * 
+ */ + public static final class CloudDeployFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CloudDeployFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudDeployFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudDeployFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists DeliveryPipelines in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse> + listDeliveryPipelines(com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDeliveryPipelinesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single DeliveryPipeline.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.DeliveryPipeline> + getDeliveryPipeline(com.google.cloud.deploy.v1.GetDeliveryPipelineRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDeliveryPipelineMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new DeliveryPipeline in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDeliveryPipeline(com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDeliveryPipelineMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single DeliveryPipeline.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDeliveryPipeline(com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDeliveryPipelineMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single DeliveryPipeline.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDeliveryPipeline(com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDeliveryPipelineMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Targets in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.ListTargetsResponse> + listTargets(com.google.cloud.deploy.v1.ListTargetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTargetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getTarget(com.google.cloud.deploy.v1.GetTargetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTargetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Target in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createTarget(com.google.cloud.deploy.v1.CreateTargetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateTargetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateTarget(com.google.cloud.deploy.v1.UpdateTargetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateTargetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteTarget(com.google.cloud.deploy.v1.DeleteTargetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteTargetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Releases in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.ListReleasesResponse> + listReleases(com.google.cloud.deploy.v1.ListReleasesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListReleasesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Release.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getRelease(com.google.cloud.deploy.v1.GetReleaseRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetReleaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Release in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createRelease(com.google.cloud.deploy.v1.CreateReleaseRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateReleaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Approves a Rollout.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.ApproveRolloutResponse> + approveRollout(com.google.cloud.deploy.v1.ApproveRolloutRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getApproveRolloutMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Rollouts in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.ListRolloutsResponse> + listRollouts(com.google.cloud.deploy.v1.ListRolloutsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRolloutsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Rollout.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getRollout(com.google.cloud.deploy.v1.GetRolloutRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRolloutMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Rollout in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createRollout(com.google.cloud.deploy.v1.CreateRolloutRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateRolloutMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the configuration for a location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getConfig(com.google.cloud.deploy.v1.GetConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetConfigMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_DELIVERY_PIPELINES = 0; + private static final int METHODID_GET_DELIVERY_PIPELINE = 1; + private static final int METHODID_CREATE_DELIVERY_PIPELINE = 2; + private static final int METHODID_UPDATE_DELIVERY_PIPELINE = 3; + private static final int METHODID_DELETE_DELIVERY_PIPELINE = 4; + private static final int METHODID_LIST_TARGETS = 5; + private static final int METHODID_GET_TARGET = 6; + private static final int METHODID_CREATE_TARGET = 7; + private static final int METHODID_UPDATE_TARGET = 8; + private static final int METHODID_DELETE_TARGET = 9; + private static final int METHODID_LIST_RELEASES = 10; + private static final int METHODID_GET_RELEASE = 11; + private static final int METHODID_CREATE_RELEASE = 12; + private static final int METHODID_APPROVE_ROLLOUT = 13; + private static final int METHODID_LIST_ROLLOUTS = 14; + private static final int METHODID_GET_ROLLOUT = 15; + private static final int METHODID_CREATE_ROLLOUT = 16; + private static final int METHODID_GET_CONFIG = 17; + + 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 CloudDeployImplBase serviceImpl; + private final int methodId; + + MethodHandlers(CloudDeployImplBase 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_DELIVERY_PIPELINES: + serviceImpl.listDeliveryPipelines( + (com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse>) + responseObserver); + break; + case METHODID_GET_DELIVERY_PIPELINE: + serviceImpl.getDeliveryPipeline( + (com.google.cloud.deploy.v1.GetDeliveryPipelineRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_DELIVERY_PIPELINE: + serviceImpl.createDeliveryPipeline( + (com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DELIVERY_PIPELINE: + serviceImpl.updateDeliveryPipeline( + (com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DELIVERY_PIPELINE: + serviceImpl.deleteDeliveryPipeline( + (com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TARGETS: + serviceImpl.listTargets( + (com.google.cloud.deploy.v1.ListTargetsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_TARGET: + serviceImpl.getTarget( + (com.google.cloud.deploy.v1.GetTargetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_TARGET: + serviceImpl.createTarget( + (com.google.cloud.deploy.v1.CreateTargetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_TARGET: + serviceImpl.updateTarget( + (com.google.cloud.deploy.v1.UpdateTargetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_TARGET: + serviceImpl.deleteTarget( + (com.google.cloud.deploy.v1.DeleteTargetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_RELEASES: + serviceImpl.listReleases( + (com.google.cloud.deploy.v1.ListReleasesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_RELEASE: + serviceImpl.getRelease( + (com.google.cloud.deploy.v1.GetReleaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_RELEASE: + serviceImpl.createRelease( + (com.google.cloud.deploy.v1.CreateReleaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_APPROVE_ROLLOUT: + serviceImpl.approveRollout( + (com.google.cloud.deploy.v1.ApproveRolloutRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ROLLOUTS: + serviceImpl.listRollouts( + (com.google.cloud.deploy.v1.ListRolloutsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ROLLOUT: + serviceImpl.getRollout( + (com.google.cloud.deploy.v1.GetRolloutRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_ROLLOUT: + serviceImpl.createRollout( + (com.google.cloud.deploy.v1.CreateRolloutRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CONFIG: + serviceImpl.getConfig( + (com.google.cloud.deploy.v1.GetConfigRequest) 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 CloudDeployBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CloudDeployBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CloudDeploy"); + } + } + + private static final class CloudDeployFileDescriptorSupplier + extends CloudDeployBaseDescriptorSupplier { + CloudDeployFileDescriptorSupplier() {} + } + + private static final class CloudDeployMethodDescriptorSupplier + extends CloudDeployBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + CloudDeployMethodDescriptorSupplier(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 (CloudDeployGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CloudDeployFileDescriptorSupplier()) + .addMethod(getListDeliveryPipelinesMethod()) + .addMethod(getGetDeliveryPipelineMethod()) + .addMethod(getCreateDeliveryPipelineMethod()) + .addMethod(getUpdateDeliveryPipelineMethod()) + .addMethod(getDeleteDeliveryPipelineMethod()) + .addMethod(getListTargetsMethod()) + .addMethod(getGetTargetMethod()) + .addMethod(getCreateTargetMethod()) + .addMethod(getUpdateTargetMethod()) + .addMethod(getDeleteTargetMethod()) + .addMethod(getListReleasesMethod()) + .addMethod(getGetReleaseMethod()) + .addMethod(getCreateReleaseMethod()) + .addMethod(getApproveRolloutMethod()) + .addMethod(getListRolloutsMethod()) + .addMethod(getGetRolloutMethod()) + .addMethod(getCreateRolloutMethod()) + .addMethod(getGetConfigMethod()) + .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..ce27254 --- /dev/null +++ b/pom.xml @@ -0,0 +1,188 @@ + + + 4.0.0 + com.google.cloud + google-cloud-deploy-parent + pom + 0.0.1-SNAPSHOT + Google Google CLoud Deploy Parent + https://github.com/googleapis/java-deploy + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 1.0.0 + + + + + chingor + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + neenushaji + Neenu Shaji + neenushaji@google.com + Google LLC + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-deploy.git + scm:git:git@github.com:googleapis/java-deploy.git + https://github.com/googleapis/java-deploy + HEAD + + + https://github.com/googleapis/java-deploy/issues + GitHub Issues + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-deploy-parent + + + + + + com.google.cloud + google-cloud-deploy + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-deploy-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-deploy-v1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 2.1.0 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-deploy + grpc-google-cloud-deploy-v1 + proto-google-cloud-deploy-v1 + google-cloud-deploy-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-deploy-v1/clirr-ignored-differences.xml b/proto-google-cloud-deploy-v1/clirr-ignored-differences.xml new file mode 100644 index 0000000..3b351ba --- /dev/null +++ b/proto-google-cloud-deploy-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/deploy/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/deploy/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/deploy/v1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-deploy-v1/pom.xml b/proto-google-cloud-deploy-v1/pom.xml new file mode 100644 index 0000000..46cfad4 --- /dev/null +++ b/proto-google-cloud-deploy-v1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-deploy-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-deploy-v1 + Proto library for google-cloud-deploy + + com.google.cloud + google-cloud-deploy-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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java new file mode 100644 index 0000000..2244109 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java @@ -0,0 +1,753 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object used by `ApproveRollout`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ApproveRolloutRequest} + */ +public final class ApproveRolloutRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ApproveRolloutRequest) + ApproveRolloutRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApproveRolloutRequest.newBuilder() to construct. + private ApproveRolloutRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApproveRolloutRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApproveRolloutRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ApproveRolloutRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + approved_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ApproveRolloutRequest.class, + com.google.cloud.deploy.v1.ApproveRolloutRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the Rollout. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/{rollout}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the Rollout. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/{rollout}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPROVED_FIELD_NUMBER = 2; + private boolean approved_; + /** + * + * + *
+   * Required. True = approve; false = reject
+   * 
+ * + * bool approved = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The approved. + */ + @java.lang.Override + public boolean getApproved() { + return approved_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (approved_ != false) { + output.writeBool(2, approved_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (approved_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, approved_); + } + 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.deploy.v1.ApproveRolloutRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ApproveRolloutRequest other = + (com.google.cloud.deploy.v1.ApproveRolloutRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getApproved() != other.getApproved()) 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) + APPROVED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getApproved()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.ApproveRolloutRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutRequest 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.deploy.v1.ApproveRolloutRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutRequest parseFrom( + 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.deploy.v1.ApproveRolloutRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutRequest parseFrom( + java.io.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.deploy.v1.ApproveRolloutRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutRequest parseDelimitedFrom( + java.io.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.deploy.v1.ApproveRolloutRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.ApproveRolloutRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object used by `ApproveRollout`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ApproveRolloutRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ApproveRolloutRequest) + com.google.cloud.deploy.v1.ApproveRolloutRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ApproveRolloutRequest.class, + com.google.cloud.deploy.v1.ApproveRolloutRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ApproveRolloutRequest.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_ = ""; + + approved_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ApproveRolloutRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ApproveRolloutRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ApproveRolloutRequest build() { + com.google.cloud.deploy.v1.ApproveRolloutRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ApproveRolloutRequest buildPartial() { + com.google.cloud.deploy.v1.ApproveRolloutRequest result = + new com.google.cloud.deploy.v1.ApproveRolloutRequest(this); + result.name_ = name_; + result.approved_ = approved_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.ApproveRolloutRequest) { + return mergeFrom((com.google.cloud.deploy.v1.ApproveRolloutRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ApproveRolloutRequest other) { + if (other == com.google.cloud.deploy.v1.ApproveRolloutRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getApproved() != false) { + setApproved(other.getApproved()); + } + 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.deploy.v1.ApproveRolloutRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.ApproveRolloutRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the Rollout. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/{rollout}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the Rollout. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/{rollout}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the Rollout. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/{rollout}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the Rollout. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/{rollout}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the Rollout. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/{rollout}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private boolean approved_; + /** + * + * + *
+     * Required. True = approve; false = reject
+     * 
+ * + * bool approved = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The approved. + */ + @java.lang.Override + public boolean getApproved() { + return approved_; + } + /** + * + * + *
+     * Required. True = approve; false = reject
+     * 
+ * + * bool approved = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The approved to set. + * @return This builder for chaining. + */ + public Builder setApproved(boolean value) { + + approved_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. True = approve; false = reject
+     * 
+ * + * bool approved = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearApproved() { + + approved_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.ApproveRolloutRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ApproveRolloutRequest) + private static final com.google.cloud.deploy.v1.ApproveRolloutRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ApproveRolloutRequest(); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApproveRolloutRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApproveRolloutRequest(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.deploy.v1.ApproveRolloutRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequestOrBuilder.java new file mode 100644 index 0000000..e0f7a5f --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequestOrBuilder.java @@ -0,0 +1,71 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ApproveRolloutRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ApproveRolloutRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the Rollout. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/{rollout}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the Rollout. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/{rollout}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. True = approve; false = reject
+   * 
+ * + * bool approved = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The approved. + */ + boolean getApproved(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponse.java new file mode 100644 index 0000000..d944706 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponse.java @@ -0,0 +1,456 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The response object from `ApproveRollout`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ApproveRolloutResponse} + */ +public final class ApproveRolloutResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ApproveRolloutResponse) + ApproveRolloutResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApproveRolloutResponse.newBuilder() to construct. + private ApproveRolloutResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApproveRolloutResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApproveRolloutResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ApproveRolloutResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ApproveRolloutResponse.class, + com.google.cloud.deploy.v1.ApproveRolloutResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.ApproveRolloutResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ApproveRolloutResponse other = + (com.google.cloud.deploy.v1.ApproveRolloutResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.ApproveRolloutResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutResponse 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.deploy.v1.ApproveRolloutResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutResponse parseFrom( + 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.deploy.v1.ApproveRolloutResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutResponse parseFrom( + java.io.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.deploy.v1.ApproveRolloutResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutResponse parseDelimitedFrom( + java.io.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.deploy.v1.ApproveRolloutResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.ApproveRolloutResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 response object from `ApproveRollout`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ApproveRolloutResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ApproveRolloutResponse) + com.google.cloud.deploy.v1.ApproveRolloutResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ApproveRolloutResponse.class, + com.google.cloud.deploy.v1.ApproveRolloutResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ApproveRolloutResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ApproveRolloutResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ApproveRolloutResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ApproveRolloutResponse build() { + com.google.cloud.deploy.v1.ApproveRolloutResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ApproveRolloutResponse buildPartial() { + com.google.cloud.deploy.v1.ApproveRolloutResponse result = + new com.google.cloud.deploy.v1.ApproveRolloutResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.ApproveRolloutResponse) { + return mergeFrom((com.google.cloud.deploy.v1.ApproveRolloutResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ApproveRolloutResponse other) { + if (other == com.google.cloud.deploy.v1.ApproveRolloutResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.ApproveRolloutResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.deploy.v1.ApproveRolloutResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.ApproveRolloutResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ApproveRolloutResponse) + private static final com.google.cloud.deploy.v1.ApproveRolloutResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ApproveRolloutResponse(); + } + + public static com.google.cloud.deploy.v1.ApproveRolloutResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApproveRolloutResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApproveRolloutResponse(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.deploy.v1.ApproveRolloutResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponseOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponseOrBuilder.java new file mode 100644 index 0000000..a8f0ac6 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ApproveRolloutResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ApproveRolloutResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifact.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifact.java new file mode 100644 index 0000000..c9f3fab --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifact.java @@ -0,0 +1,826 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Description of an a image to use during Skaffold rendering.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.BuildArtifact} + */ +public final class BuildArtifact extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.BuildArtifact) + BuildArtifactOrBuilder { + private static final long serialVersionUID = 0L; + // Use BuildArtifact.newBuilder() to construct. + private BuildArtifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BuildArtifact() { + image_ = ""; + tag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BuildArtifact(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BuildArtifact( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + tag_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + image_ = 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_BuildArtifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_BuildArtifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.BuildArtifact.class, + com.google.cloud.deploy.v1.BuildArtifact.Builder.class); + } + + public static final int IMAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object image_; + /** + * + * + *
+   * Image name in Skaffold configuration.
+   * 
+ * + * string image = 3; + * + * @return The image. + */ + @java.lang.Override + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } + } + /** + * + * + *
+   * Image name in Skaffold configuration.
+   * 
+ * + * string image = 3; + * + * @return The bytes for image. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAG_FIELD_NUMBER = 2; + private volatile java.lang.Object tag_; + /** + * + * + *
+   * Image tag to use. This will generally be the full path to an image, such
+   * as "gcr.io/my-project/busybox:1.2.3" or
+   * "gcr.io/my-project/busybox@sha256:abc123".
+   * 
+ * + * string tag = 2; + * + * @return The tag. + */ + @java.lang.Override + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } + } + /** + * + * + *
+   * Image tag to use. This will generally be the full path to an image, such
+   * as "gcr.io/my-project/busybox:1.2.3" or
+   * "gcr.io/my-project/busybox@sha256:abc123".
+   * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = 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 (!getTagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); + } + if (!getImageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, image_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); + } + if (!getImageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, image_); + } + 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.deploy.v1.BuildArtifact)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.BuildArtifact other = (com.google.cloud.deploy.v1.BuildArtifact) obj; + + if (!getImage().equals(other.getImage())) return false; + if (!getTag().equals(other.getTag())) 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) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.BuildArtifact parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.BuildArtifact 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.deploy.v1.BuildArtifact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.BuildArtifact parseFrom( + 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.deploy.v1.BuildArtifact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.BuildArtifact parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.BuildArtifact parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.BuildArtifact parseFrom( + java.io.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.deploy.v1.BuildArtifact parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.BuildArtifact parseDelimitedFrom( + java.io.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.deploy.v1.BuildArtifact parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.BuildArtifact parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.BuildArtifact prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Description of an a image to use during Skaffold rendering.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.BuildArtifact} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.BuildArtifact) + com.google.cloud.deploy.v1.BuildArtifactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_BuildArtifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_BuildArtifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.BuildArtifact.class, + com.google.cloud.deploy.v1.BuildArtifact.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.BuildArtifact.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(); + image_ = ""; + + tag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_BuildArtifact_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.BuildArtifact getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.BuildArtifact.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.BuildArtifact build() { + com.google.cloud.deploy.v1.BuildArtifact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.BuildArtifact buildPartial() { + com.google.cloud.deploy.v1.BuildArtifact result = + new com.google.cloud.deploy.v1.BuildArtifact(this); + result.image_ = image_; + result.tag_ = tag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.BuildArtifact) { + return mergeFrom((com.google.cloud.deploy.v1.BuildArtifact) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.BuildArtifact other) { + if (other == com.google.cloud.deploy.v1.BuildArtifact.getDefaultInstance()) return this; + if (!other.getImage().isEmpty()) { + image_ = other.image_; + onChanged(); + } + if (!other.getTag().isEmpty()) { + tag_ = other.tag_; + 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.deploy.v1.BuildArtifact parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.BuildArtifact) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object image_ = ""; + /** + * + * + *
+     * Image name in Skaffold configuration.
+     * 
+ * + * string image = 3; + * + * @return The image. + */ + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Image name in Skaffold configuration.
+     * 
+ * + * string image = 3; + * + * @return The bytes for image. + */ + public com.google.protobuf.ByteString getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Image name in Skaffold configuration.
+     * 
+ * + * string image = 3; + * + * @param value The image to set. + * @return This builder for chaining. + */ + public Builder setImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + image_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Image name in Skaffold configuration.
+     * 
+ * + * string image = 3; + * + * @return This builder for chaining. + */ + public Builder clearImage() { + + image_ = getDefaultInstance().getImage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Image name in Skaffold configuration.
+     * 
+ * + * string image = 3; + * + * @param value The bytes for image to set. + * @return This builder for chaining. + */ + public Builder setImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + image_ = value; + onChanged(); + return this; + } + + private java.lang.Object tag_ = ""; + /** + * + * + *
+     * Image tag to use. This will generally be the full path to an image, such
+     * as "gcr.io/my-project/busybox:1.2.3" or
+     * "gcr.io/my-project/busybox@sha256:abc123".
+     * 
+ * + * string tag = 2; + * + * @return The tag. + */ + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Image tag to use. This will generally be the full path to an image, such
+     * as "gcr.io/my-project/busybox:1.2.3" or
+     * "gcr.io/my-project/busybox@sha256:abc123".
+     * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Image tag to use. This will generally be the full path to an image, such
+     * as "gcr.io/my-project/busybox:1.2.3" or
+     * "gcr.io/my-project/busybox@sha256:abc123".
+     * 
+ * + * string tag = 2; + * + * @param value The tag to set. + * @return This builder for chaining. + */ + public Builder setTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Image tag to use. This will generally be the full path to an image, such
+     * as "gcr.io/my-project/busybox:1.2.3" or
+     * "gcr.io/my-project/busybox@sha256:abc123".
+     * 
+ * + * string tag = 2; + * + * @return This builder for chaining. + */ + public Builder clearTag() { + + tag_ = getDefaultInstance().getTag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Image tag to use. This will generally be the full path to an image, such
+     * as "gcr.io/my-project/busybox:1.2.3" or
+     * "gcr.io/my-project/busybox@sha256:abc123".
+     * 
+ * + * string tag = 2; + * + * @param value The bytes for tag to set. + * @return This builder for chaining. + */ + public Builder setTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tag_ = 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.deploy.v1.BuildArtifact) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.BuildArtifact) + private static final com.google.cloud.deploy.v1.BuildArtifact DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.BuildArtifact(); + } + + public static com.google.cloud.deploy.v1.BuildArtifact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BuildArtifact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BuildArtifact(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.deploy.v1.BuildArtifact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifactOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifactOrBuilder.java new file mode 100644 index 0000000..ac0e9bd --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifactOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface BuildArtifactOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.BuildArtifact) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Image name in Skaffold configuration.
+   * 
+ * + * string image = 3; + * + * @return The image. + */ + java.lang.String getImage(); + /** + * + * + *
+   * Image name in Skaffold configuration.
+   * 
+ * + * string image = 3; + * + * @return The bytes for image. + */ + com.google.protobuf.ByteString getImageBytes(); + + /** + * + * + *
+   * Image tag to use. This will generally be the full path to an image, such
+   * as "gcr.io/my-project/busybox:1.2.3" or
+   * "gcr.io/my-project/busybox@sha256:abc123".
+   * 
+ * + * string tag = 2; + * + * @return The tag. + */ + java.lang.String getTag(); + /** + * + * + *
+   * Image tag to use. This will generally be the full path to an image, such
+   * as "gcr.io/my-project/busybox:1.2.3" or
+   * "gcr.io/my-project/busybox@sha256:abc123".
+   * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + com.google.protobuf.ByteString getTagBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java new file mode 100644 index 0000000..d38e6da --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java @@ -0,0 +1,1125 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public final class CloudDeployProto { + private CloudDeployProto() {} + + 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_deploy_v1_DeliveryPipeline_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_DeliveryPipeline_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_DeliveryPipeline_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_DeliveryPipeline_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_DeliveryPipeline_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_DeliveryPipeline_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_SerialPipeline_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_SerialPipeline_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Stage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Stage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_PipelineReadyCondition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_PipelineReadyCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_TargetsPresentCondition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_TargetsPresentCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_PipelineCondition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_PipelineCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Target_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Target_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Target_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Target_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Target_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Target_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ExecutionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ExecutionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_DefaultPool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_DefaultPool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_PrivatePool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_PrivatePool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_GkeCluster_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_GkeCluster_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListTargetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListTargetsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListTargetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_GetTargetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_GetTargetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_CreateTargetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_CreateTargetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_UpdateTargetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_UpdateTargetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_DeleteTargetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Release_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Release_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Release_TargetRender_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Release_TargetRender_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Release_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Release_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Release_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Release_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Release_TargetArtifactsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Release_TargetArtifactsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Release_TargetRendersEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Release_TargetRendersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_BuildArtifact_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_BuildArtifact_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_TargetArtifact_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_TargetArtifact_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListReleasesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListReleasesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListReleasesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListReleasesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_GetReleaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_GetReleaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_CreateReleaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_CreateReleaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Rollout_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Rollout_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Rollout_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Rollout_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Rollout_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Rollout_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListRolloutsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListRolloutsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListRolloutsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_GetRolloutRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_GetRolloutRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_CreateRolloutRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_CreateRolloutRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Config_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Config_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_SkaffoldVersion_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_SkaffoldVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_GetConfigRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/deploy/v1/cloud_deploy.pr" + + "oto\022\026google.cloud.deploy.v1\032\034google/api/" + + "annotations.proto\032\027google/api/client.pro" + + "to\032\037google/api/field_behavior.proto\032\031goo" + + "gle/api/resource.proto\032#google/longrunni" + + "ng/operations.proto\032 google/protobuf/fie" + + "ld_mask.proto\032\037google/protobuf/timestamp" + + ".proto\032\026google/type/date.proto\"\322\005\n\020Deliv" + + "eryPipeline\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\020\n\003uid\030\002 " + + "\001(\tB\003\340A\003\022\023\n\013description\030\003 \001(\t\022N\n\013annotat" + + "ions\030\004 \003(\01329.google.cloud.deploy.v1.Deli" + + "veryPipeline.AnnotationsEntry\022D\n\006labels\030" + + "\005 \003(\01324.google.cloud.deploy.v1.DeliveryP" + + "ipeline.LabelsEntry\0224\n\013create_time\030\006 \001(\013" + + "2\032.google.protobuf.TimestampB\003\340A\003\0224\n\013upd" + + "ate_time\030\007 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\022A\n\017serial_pipeline\030\010 \001(\0132&.googl" + + "e.cloud.deploy.v1.SerialPipelineH\000\022A\n\tco" + + "ndition\030\013 \001(\0132).google.cloud.deploy.v1.P" + + "ipelineConditionB\003\340A\003\022\014\n\004etag\030\n \001(\t\0322\n\020A" + + "nnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001:\177\352A|\n+clouddeploy.googlea" + + "pis.com/DeliveryPipeline\022Mprojects/{proj" + + "ect}/locations/{location}/deliveryPipeli" + + "nes/{delivery_pipeline}B\n\n\010pipeline\"?\n\016S" + + "erialPipeline\022-\n\006stages\030\001 \003(\0132\035.google.c" + + "loud.deploy.v1.Stage\",\n\005Stage\022\021\n\ttarget_" + + "id\030\001 \001(\t\022\020\n\010profiles\030\002 \003(\t\"Y\n\026PipelineRe" + + "adyCondition\022\016\n\006status\030\003 \001(\010\022/\n\013update_t" + + "ime\030\004 \001(\0132\032.google.protobuf.Timestamp\"\233\001" + + "\n\027TargetsPresentCondition\022\016\n\006status\030\001 \001(" + + "\010\022?\n\017missing_targets\030\002 \003(\tB&\372A#\n!cloudde" + + "ploy.googleapis.com/Target\022/\n\013update_tim" + + "e\030\004 \001(\0132\032.google.protobuf.Timestamp\"\271\001\n\021" + + "PipelineCondition\022P\n\030pipeline_ready_cond" + + "ition\030\001 \001(\0132..google.cloud.deploy.v1.Pip" + + "elineReadyCondition\022R\n\031targets_present_c" + + "ondition\030\003 \001(\0132/.google.cloud.deploy.v1." + + "TargetsPresentCondition\"\254\001\n\034ListDelivery" + + "PipelinesRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-" + + "\022+clouddeploy.googleapis.com/DeliveryPip" + + "eline\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" + + " \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\223" + + "\001\n\035ListDeliveryPipelinesResponse\022D\n\022deli" + + "very_pipelines\030\001 \003(\0132(.google.cloud.depl" + + "oy.v1.DeliveryPipeline\022\027\n\017next_page_toke" + + "n\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"_\n\032GetDeliv" + + "eryPipelineRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-" + + "\n+clouddeploy.googleapis.com/DeliveryPip" + + "eline\"\206\002\n\035CreateDeliveryPipelineRequest\022" + + "C\n\006parent\030\001 \001(\tB3\340A\002\372A-\022+clouddeploy.goo" + + "gleapis.com/DeliveryPipeline\022!\n\024delivery" + + "_pipeline_id\030\002 \001(\tB\003\340A\002\022H\n\021delivery_pipe" + + "line\030\003 \001(\0132(.google.cloud.deploy.v1.Deli" + + "veryPipelineB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340" + + "A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003\340A\001\"\360\001\n\035Updat" + + "eDeliveryPipelineRequest\0224\n\013update_mask\030" + + "\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022H" + + "\n\021delivery_pipeline\030\002 \001(\0132(.google.cloud" + + ".deploy.v1.DeliveryPipelineB\003\340A\002\022\027\n\nrequ" + + "est_id\030\003 \001(\tB\003\340A\001\022\032\n\rallow_missing\030\004 \001(\010" + + "B\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003\340A\001\"\332\001\n\035De" + + "leteDeliveryPipelineRequest\022A\n\004name\030\001 \001(" + + "\tB3\340A\002\372A-\n+clouddeploy.googleapis.com/De" + + "liveryPipeline\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\022" + + "\032\n\rallow_missing\030\003 \001(\010B\003\340A\001\022\032\n\rvalidate_" + + "only\030\004 \001(\010B\003\340A\001\022\022\n\005force\030\006 \001(\010B\003\340A\001\022\021\n\004e" + + "tag\030\005 \001(\tB\003\340A\001\"\332\005\n\006Target\022\021\n\004name\030\001 \001(\tB" + + "\003\340A\001\022\026\n\ttarget_id\030\002 \001(\tB\003\340A\003\022\020\n\003uid\030\003 \001(" + + "\tB\003\340A\003\022\030\n\013description\030\004 \001(\tB\003\340A\001\022I\n\013anno" + + "tations\030\005 \003(\0132/.google.cloud.deploy.v1.T" + + "arget.AnnotationsEntryB\003\340A\001\022?\n\006labels\030\006 " + + "\003(\0132*.google.cloud.deploy.v1.Target.Labe" + + "lsEntryB\003\340A\001\022\035\n\020require_approval\030\r \001(\010B\003" + + "\340A\001\0224\n\013create_time\030\010 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\0224\n\013update_time\030\t \001(\0132\032" + + ".google.protobuf.TimestampB\003\340A\003\0221\n\003gke\030\017" + + " \001(\0132\".google.cloud.deploy.v1.GkeCluster" + + "H\000\022\021\n\004etag\030\014 \001(\tB\003\340A\001\022B\n\021execution_confi" + + "gs\030\020 \003(\0132\'.google.cloud.deploy.v1.Execut" + + "ionConfig\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013LabelsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:`\352A]\n!cloud" + + "deploy.googleapis.com/Target\0228projects/{" + + "project}/locations/{location}/targets/{t" + + "arget}B\023\n\021deployment_target\"\350\002\n\017Executio" + + "nConfig\022V\n\006usages\030\001 \003(\0162A.google.cloud.d" + + "eploy.v1.ExecutionConfig.ExecutionEnviro" + + "nmentUsageB\003\340A\002\022@\n\014default_pool\030\002 \001(\0132#." + + "google.cloud.deploy.v1.DefaultPoolB\003\340A\001H" + + "\000\022@\n\014private_pool\030\003 \001(\0132#.google.cloud.d" + + "eploy.v1.PrivatePoolB\003\340A\001H\000\"`\n\031Execution" + + "EnvironmentUsage\022+\n\'EXECUTION_ENVIRONMEN" + + "T_USAGE_UNSPECIFIED\020\000\022\n\n\006RENDER\020\001\022\n\n\006DEP" + + "LOY\020\002B\027\n\025execution_environment\"J\n\013Defaul" + + "tPool\022\034\n\017service_account\030\001 \001(\tB\003\340A\001\022\035\n\020a" + + "rtifact_storage\030\002 \001(\tB\003\340A\001\"\215\001\n\013PrivatePo" + + "ol\022A\n\013worker_pool\030\001 \001(\tB,\340A\002\372A&\n$cloudbu" + + "ild.googleapis.com/WorkerPool\022\034\n\017service" + + "_account\030\002 \001(\tB\003\340A\001\022\035\n\020artifact_storage\030" + + "\003 \001(\tB\003\340A\001\"D\n\nGkeCluster\0226\n\007cluster\030\001 \001(" + + "\tB%\372A\"\n container.googleapis.com/Cluster" + + "\"\254\001\n\022ListTargetsRequest\0229\n\006parent\030\001 \001(\tB" + + ")\340A\002\372A#\022!clouddeploy.googleapis.com/Targ" + + "et\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token" + + "\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010orde" + + "r_by\030\005 \001(\tB\003\340A\001\"t\n\023ListTargetsResponse\022/" + + "\n\007targets\030\001 \003(\0132\036.google.cloud.deploy.v1" + + ".Target\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unre" + + "achable\030\003 \003(\t\"K\n\020GetTargetRequest\0227\n\004nam" + + "e\030\001 \001(\tB)\340A\002\372A#\n!clouddeploy.googleapis." + + "com/Target\"\322\001\n\023CreateTargetRequest\0229\n\006pa" + + "rent\030\001 \001(\tB)\340A\002\372A#\022!clouddeploy.googleap" + + "is.com/Target\022\026\n\ttarget_id\030\002 \001(\tB\003\340A\002\0223\n" + + "\006target\030\003 \001(\0132\036.google.cloud.deploy.v1.T" + + "argetB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\022\032\n\rv" + + "alidate_only\030\005 \001(\010B\003\340A\001\"\321\001\n\023UpdateTarget" + + "Request\0224\n\013update_mask\030\001 \001(\0132\032.google.pr" + + "otobuf.FieldMaskB\003\340A\002\0223\n\006target\030\002 \001(\0132\036." + + "google.cloud.deploy.v1.TargetB\003\340A\002\022\027\n\nre" + + "quest_id\030\003 \001(\tB\003\340A\001\022\032\n\rallow_missing\030\004 \001" + + "(\010B\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003\340A\001\"\262\001\n\023" + + "DeleteTargetRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A" + + "#\n!clouddeploy.googleapis.com/Target\022\027\n\n" + + "request_id\030\002 \001(\tB\003\340A\001\022\032\n\rallow_missing\030\003" + + " \001(\010B\003\340A\001\022\032\n\rvalidate_only\030\004 \001(\010B\003\340A\001\022\021\n" + + "\004etag\030\005 \001(\tB\003\340A\001\"\272\r\n\007Release\022\021\n\004name\030\001 \001" + + "(\tB\003\340A\001\022\020\n\003uid\030\002 \001(\tB\003\340A\003\022\023\n\013description" + + "\030\003 \001(\t\022E\n\013annotations\030\004 \003(\01320.google.clo" + + "ud.deploy.v1.Release.AnnotationsEntry\022;\n" + + "\006labels\030\005 \003(\0132+.google.cloud.deploy.v1.R" + + "elease.LabelsEntry\0224\n\013create_time\030\006 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\022:\n\021rend" + + "er_start_time\030\007 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\0228\n\017render_end_time\030\010 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\022\033\n\023skaffo" + + "ld_config_uri\030\021 \001(\t\022\034\n\024skaffold_config_p" + + "ath\030\t \001(\t\022>\n\017build_artifacts\030\n \003(\0132%.goo" + + "gle.cloud.deploy.v1.BuildArtifact\022Q\n\032del" + + "ivery_pipeline_snapshot\030\013 \001(\0132(.google.c" + + "loud.deploy.v1.DeliveryPipelineB\003\340A\003\022=\n\020" + + "target_snapshots\030\014 \003(\0132\036.google.cloud.de" + + "ploy.v1.TargetB\003\340A\003\022F\n\014render_state\030\r \001(" + + "\0162+.google.cloud.deploy.v1.Release.Rende" + + "rStateB\003\340A\003\022\014\n\004etag\030\020 \001(\t\022\030\n\020skaffold_ve" + + "rsion\030\023 \001(\t\022S\n\020target_artifacts\030\024 \003(\01324." + + "google.cloud.deploy.v1.Release.TargetArt" + + "ifactsEntryB\003\340A\003\022O\n\016target_renders\030\026 \003(\013" + + "22.google.cloud.deploy.v1.Release.Target" + + "RendersEntryB\003\340A\003\032\224\002\n\014TargetRender\022@\n\017re" + + "ndering_build\030\001 \001(\tB\'\340A\003\372A!\n\037cloudbuild." + + "googleapis.com/Build\022\\\n\017rendering_state\030" + + "\002 \001(\0162>.google.cloud.deploy.v1.Release.T" + + "argetRender.TargetRenderStateB\003\340A\003\"d\n\021Ta" + + "rgetRenderState\022#\n\037TARGET_RENDER_STATE_U" + + "NSPECIFIED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020\002\022" + + "\017\n\013IN_PROGRESS\020\003\0322\n\020AnnotationsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013LabelsEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032^\n\024T" + + "argetArtifactsEntry\022\013\n\003key\030\001 \001(\t\0225\n\005valu" + + "e\030\002 \001(\0132&.google.cloud.deploy.v1.TargetA" + + "rtifact:\0028\001\032b\n\022TargetRendersEntry\022\013\n\003key" + + "\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.google.cloud.dep" + + "loy.v1.Release.TargetRender:\0028\001\"W\n\013Rende" + + "rState\022\034\n\030RENDER_STATE_UNSPECIFIED\020\000\022\r\n\t" + + "SUCCEEDED\020\001\022\n\n\006FAILED\020\002\022\017\n\013IN_PROGRESS\020\003" + + ":\212\001\352A\206\001\n\"clouddeploy.googleapis.com/Rele" + + "ase\022`projects/{project}/locations/{locat" + + "ion}/deliveryPipelines/{delivery_pipelin" + + "e}/releases/{release}\"+\n\rBuildArtifact\022\r" + + "\n\005image\030\003 \001(\t\022\013\n\003tag\030\002 \001(\t\"s\n\016TargetArti" + + "fact\022\033\n\014artifact_uri\030\004 \001(\tB\003\340A\003H\000\022!\n\024ska" + + "ffold_config_path\030\002 \001(\tB\003\340A\003\022\032\n\rmanifest" + + "_path\030\003 \001(\tB\003\340A\003B\005\n\003uri\"\267\001\n\023ListReleases" + + "Request\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudde" + + "ploy.googleapis.com/DeliveryPipeline\022\026\n\t" + + "page_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\t" + + "B\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005" + + " \001(\tB\003\340A\001\"w\n\024ListReleasesResponse\0221\n\010rel" + + "eases\030\001 \003(\0132\037.google.cloud.deploy.v1.Rel" + + "ease\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreach" + + "able\030\003 \003(\t\"M\n\021GetReleaseRequest\0228\n\004name\030" + + "\001 \001(\tB*\340A\002\372A$\n\"clouddeploy.googleapis.co" + + "m/Release\"\340\001\n\024CreateReleaseRequest\022C\n\006pa" + + "rent\030\001 \001(\tB3\340A\002\372A-\n+clouddeploy.googleap" + + "is.com/DeliveryPipeline\022\027\n\nrelease_id\030\002 " + + "\001(\tB\003\340A\002\0225\n\007release\030\003 \001(\0132\037.google.cloud" + + ".deploy.v1.ReleaseB\003\340A\002\022\027\n\nrequest_id\030\004 " + + "\001(\tB\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003\340A\001\"\211\n\n" + + "\007Rollout\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\020\n\003uid\030\002 \001(\t" + + "B\003\340A\003\022\023\n\013description\030\003 \001(\t\022E\n\013annotation" + + "s\030\004 \003(\01320.google.cloud.deploy.v1.Rollout" + + ".AnnotationsEntry\022;\n\006labels\030\005 \003(\0132+.goog" + + "le.cloud.deploy.v1.Rollout.LabelsEntry\0224" + + "\n\013create_time\030\006 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\0225\n\014approve_time\030\007 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\0225\n\014enqueue_t" + + "ime\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\022:\n\021deploy_start_time\030\t \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\0228\n\017deploy_end_tim" + + "e\030\n \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\022\026\n\ttarget_id\030\022 \001(\tB\003\340A\002\022J\n\016approval_sta" + + "te\030\014 \001(\0162-.google.cloud.deploy.v1.Rollou" + + "t.ApprovalStateB\003\340A\003\0229\n\005state\030\r \001(\0162%.go" + + "ogle.cloud.deploy.v1.Rollout.StateB\003\340A\003\022" + + "\033\n\016failure_reason\030\016 \001(\tB\003\340A\003\022@\n\017deployin" + + "g_build\030\021 \001(\tB\'\340A\003\372A!\n\037cloudbuild.google" + + "apis.com/Build\022\014\n\004etag\030\020 \001(\t\0322\n\020Annotati" + + "onsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001\"{\n\rApprovalState\022\036\n\032APPROVAL_STA" + + "TE_UNSPECIFIED\020\000\022\022\n\016NEEDS_APPROVAL\020\001\022\032\n\026" + + "DOES_NOT_NEED_APPROVAL\020\002\022\014\n\010APPROVED\020\003\022\014" + + "\n\010REJECTED\020\004\"\231\001\n\005State\022\025\n\021STATE_UNSPECIF" + + "IED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020\002\022\017\n\013IN_P" + + "ROGRESS\020\003\022\024\n\020PENDING_APPROVAL\020\004\022\025\n\021APPRO" + + "VAL_REJECTED\020\005\022\013\n\007PENDING\020\006\022\023\n\017PENDING_R" + + "ELEASE\020\007:\235\001\352A\231\001\n\"clouddeploy.googleapis." + + "com/Rollout\022sprojects/{project}/location" + + "s/{location}/deliveryPipelines/{delivery" + + "_pipeline}/releases/{release}/rollouts/{" + + "rollout}\"\256\001\n\023ListRolloutsRequest\022:\n\006pare" + + "nt\030\001 \001(\tB*\340A\002\372A$\n\"clouddeploy.googleapis" + + ".com/Release\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340" + + "A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"w\n\024ListRollout" + + "sResponse\0221\n\010rollouts\030\001 \003(\0132\037.google.clo" + + "ud.deploy.v1.Rollout\022\027\n\017next_page_token\030" + + "\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"M\n\021GetRollout" + + "Request\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"clouddepl" + + "oy.googleapis.com/Rollout\"\327\001\n\024CreateRoll" + + "outRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\n\"clou" + + "ddeploy.googleapis.com/Release\022\027\n\nrollou" + + "t_id\030\002 \001(\tB\003\340A\002\0225\n\007rollout\030\003 \001(\0132\037.googl" + + "e.cloud.deploy.v1.RolloutB\003\340A\002\022\027\n\nreques" + + "t_id\030\004 \001(\tB\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003" + + "\340A\001\"\200\002\n\021OperationMetadata\0224\n\013create_time" + + "\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "1\n\010end_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030" + + "\004 \001(\tB\003\340A\003\022\033\n\016status_message\030\005 \001(\tB\003\340A\003\022" + + "#\n\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013" + + "api_version\030\007 \001(\tB\003\340A\003\"h\n\025ApproveRollout" + + "Request\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"clouddepl" + + "oy.googleapis.com/Rollout\022\025\n\010approved\030\002 " + + "\001(\010B\003\340A\002\"\030\n\026ApproveRolloutResponse\"\337\001\n\006C" + + "onfig\022\014\n\004name\030\001 \001(\t\022H\n\022supported_version" + + "s\030\002 \003(\0132\'.google.cloud.deploy.v1.Skaffol" + + "dVersionB\003\340A\003\022%\n\030default_skaffold_versio" + + "n\030\003 \001(\tB\003\340A\003:V\352AS\n!clouddeploy.googleapi" + + "s.com/Config\022.projects/{project}/locatio" + + "ns/{location}/config\"O\n\017SkaffoldVersion\022" + + "\017\n\007version\030\001 \001(\t\022+\n\020support_end_date\030\002 \001" + + "(\0132\021.google.type.Date\"K\n\020GetConfigReques" + + "t\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!clouddeploy.goo" + + "gleapis.com/Config2\352\035\n\013CloudDeploy\022\314\001\n\025L" + + "istDeliveryPipelines\0224.google.cloud.depl" + + "oy.v1.ListDeliveryPipelinesRequest\0325.goo" + + "gle.cloud.deploy.v1.ListDeliveryPipeline" + + "sResponse\"F\202\323\344\223\0027\0225/v1/{parent=projects/" + + "*/locations/*}/deliveryPipelines\332A\006paren" + + "t\022\271\001\n\023GetDeliveryPipeline\0222.google.cloud" + + ".deploy.v1.GetDeliveryPipelineRequest\032(." + + "google.cloud.deploy.v1.DeliveryPipeline\"" + + "D\202\323\344\223\0027\0225/v1/{name=projects/*/locations/" + + "*/deliveryPipelines/*}\332A\004name\022\231\002\n\026Create" + + "DeliveryPipeline\0225.google.cloud.deploy.v" + + "1.CreateDeliveryPipelineRequest\032\035.google" + + ".longrunning.Operation\"\250\001\202\323\344\223\002J\"5/v1/{pa" + + "rent=projects/*/locations/*}/deliveryPip" + + "elines:\021delivery_pipeline\332A-parent,deliv" + + "ery_pipeline,delivery_pipeline_id\312A%\n\020De" + + "liveryPipeline\022\021OperationMetadata\022\233\002\n\026Up" + + "dateDeliveryPipeline\0225.google.cloud.depl" + + "oy.v1.UpdateDeliveryPipelineRequest\032\035.go" + + "ogle.longrunning.Operation\"\252\001\202\323\344\223\002\\2G/v1" + + "/{delivery_pipeline.name=projects/*/loca" + + "tions/*/deliveryPipelines/*}:\021delivery_p" + + "ipeline\332A\035delivery_pipeline,update_mask\312" + + "A%\n\020DeliveryPipeline\022\021OperationMetadata\022" + + "\341\001\n\026DeleteDeliveryPipeline\0225.google.clou" + + "d.deploy.v1.DeleteDeliveryPipelineReques" + + "t\032\035.google.longrunning.Operation\"q\202\323\344\223\0027" + + "*5/v1/{name=projects/*/locations/*/deliv" + + "eryPipelines/*}\332A\004name\312A*\n\025google.protob" + + "uf.Empty\022\021OperationMetadata\022\244\001\n\013ListTarg" + + "ets\022*.google.cloud.deploy.v1.ListTargets" + + "Request\032+.google.cloud.deploy.v1.ListTar" + + "getsResponse\"<\202\323\344\223\002-\022+/v1/{parent=projec" + + "ts/*/locations/*}/targets\332A\006parent\022\221\001\n\tG" + + "etTarget\022(.google.cloud.deploy.v1.GetTar" + + "getRequest\032\036.google.cloud.deploy.v1.Targ" + + "et\":\202\323\344\223\002-\022+/v1/{name=projects/*/locatio" + + "ns/*/targets/*}\332A\004name\022\317\001\n\014CreateTarget\022" + + "+.google.cloud.deploy.v1.CreateTargetReq" + + "uest\032\035.google.longrunning.Operation\"s\202\323\344" + + "\223\0025\"+/v1/{parent=projects/*/locations/*}" + + "/targets:\006target\332A\027parent,target,target_" + + "id\312A\033\n\006Target\022\021OperationMetadata\022\321\001\n\014Upd" + + "ateTarget\022+.google.cloud.deploy.v1.Updat" + + "eTargetRequest\032\035.google.longrunning.Oper" + + "ation\"u\202\323\344\223\002<22/v1/{target.name=projects" + + "/*/locations/*/targets/*}:\006target\332A\022targ" + + "et,update_mask\312A\033\n\006Target\022\021OperationMeta" + + "data\022\303\001\n\014DeleteTarget\022+.google.cloud.dep" + + "loy.v1.DeleteTargetRequest\032\035.google.long" + + "running.Operation\"g\202\323\344\223\002-*+/v1/{name=pro" + + "jects/*/locations/*/targets/*}\332A\004name\312A*" + + "\n\025google.protobuf.Empty\022\021OperationMetada" + + "ta\022\274\001\n\014ListReleases\022+.google.cloud.deplo" + + "y.v1.ListReleasesRequest\032,.google.cloud." + + "deploy.v1.ListReleasesResponse\"Q\202\323\344\223\002B\022@" + + "/v1/{parent=projects/*/locations/*/deliv" + + "eryPipelines/*}/releases\332A\006parent\022\251\001\n\nGe" + + "tRelease\022).google.cloud.deploy.v1.GetRel" + + "easeRequest\032\037.google.cloud.deploy.v1.Rel" + + "ease\"O\202\323\344\223\002B\022@/v1/{name=projects/*/locat" + + "ions/*/deliveryPipelines/*/releases/*}\332A" + + "\004name\022\353\001\n\rCreateRelease\022,.google.cloud.d" + + "eploy.v1.CreateReleaseRequest\032\035.google.l" + + "ongrunning.Operation\"\214\001\202\323\344\223\002K\"@/v1/{pare" + + "nt=projects/*/locations/*/deliveryPipeli" + + "nes/*}/releases:\007release\332A\031parent,releas" + + "e,release_id\312A\034\n\007Release\022\021OperationMetad" + + "ata\022\326\001\n\016ApproveRollout\022-.google.cloud.de" + + "ploy.v1.ApproveRolloutRequest\032..google.c" + + "loud.deploy.v1.ApproveRolloutResponse\"e\202" + + "\323\344\223\002X\"S/v1/{name=projects/*/locations/*/" + + "deliveryPipelines/*/releases/*/rollouts/" + + "*}:approve:\001*\332A\004name\022\307\001\n\014ListRollouts\022+." + + "google.cloud.deploy.v1.ListRolloutsReque" + + "st\032,.google.cloud.deploy.v1.ListRollouts" + + "Response\"\\\202\323\344\223\002M\022K/v1/{parent=projects/*" + + "/locations/*/deliveryPipelines/*/release" + + "s/*}/rollouts\332A\006parent\022\264\001\n\nGetRollout\022)." + + "google.cloud.deploy.v1.GetRolloutRequest" + + "\032\037.google.cloud.deploy.v1.Rollout\"Z\202\323\344\223\002" + + "M\022K/v1/{name=projects/*/locations/*/deli" + + "veryPipelines/*/releases/*/rollouts/*}\332A" + + "\004name\022\366\001\n\rCreateRollout\022,.google.cloud.d" + + "eploy.v1.CreateRolloutRequest\032\035.google.l" + + "ongrunning.Operation\"\227\001\202\323\344\223\002V\"K/v1/{pare" + + "nt=projects/*/locations/*/deliveryPipeli" + + "nes/*/releases/*}/rollouts:\007rollout\332A\031pa" + + "rent,rollout,rollout_id\312A\034\n\007Rollout\022\021Ope" + + "rationMetadata\022\216\001\n\tGetConfig\022(.google.cl" + + "oud.deploy.v1.GetConfigRequest\032\036.google." + + "cloud.deploy.v1.Config\"7\202\323\344\223\002*\022(/v1/{nam" + + "e=projects/*/locations/*/config}\332A\004name\032" + + "N\312A\032clouddeploy.googleapis.com\322A.https:/" + + "/www.googleapis.com/auth/cloud-platformB" + + "\200\004\n\032com.google.cloud.deploy.v1B\020CloudDep" + + "loyProtoP\001Zprojects/{projec" + + "t}/locations/{location}/operations/{oper" + + "ation}\352Ai\n$cloudbuild.googleapis.com/Wor" + + "kerPool\022Aprojects/{project}/locations/{l" + + "ocation}/workerPools/{worker_pool}b\006prot" + + "o3" + }; + 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(), + com.google.type.DateProto.getDescriptor(), + }); + internal_static_google_cloud_deploy_v1_DeliveryPipeline_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_deploy_v1_DeliveryPipeline_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_DeliveryPipeline_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Description", + "Annotations", + "Labels", + "CreateTime", + "UpdateTime", + "SerialPipeline", + "Condition", + "Etag", + "Pipeline", + }); + internal_static_google_cloud_deploy_v1_DeliveryPipeline_AnnotationsEntry_descriptor = + internal_static_google_cloud_deploy_v1_DeliveryPipeline_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_deploy_v1_DeliveryPipeline_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_DeliveryPipeline_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_DeliveryPipeline_LabelsEntry_descriptor = + internal_static_google_cloud_deploy_v1_DeliveryPipeline_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_deploy_v1_DeliveryPipeline_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_DeliveryPipeline_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_SerialPipeline_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_deploy_v1_SerialPipeline_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_SerialPipeline_descriptor, + new java.lang.String[] { + "Stages", + }); + internal_static_google_cloud_deploy_v1_Stage_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_deploy_v1_Stage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Stage_descriptor, + new java.lang.String[] { + "TargetId", "Profiles", + }); + internal_static_google_cloud_deploy_v1_PipelineReadyCondition_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_deploy_v1_PipelineReadyCondition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_PipelineReadyCondition_descriptor, + new java.lang.String[] { + "Status", "UpdateTime", + }); + internal_static_google_cloud_deploy_v1_TargetsPresentCondition_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_deploy_v1_TargetsPresentCondition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_TargetsPresentCondition_descriptor, + new java.lang.String[] { + "Status", "MissingTargets", "UpdateTime", + }); + internal_static_google_cloud_deploy_v1_PipelineCondition_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_deploy_v1_PipelineCondition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_PipelineCondition_descriptor, + new java.lang.String[] { + "PipelineReadyCondition", "TargetsPresentCondition", + }); + internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_descriptor, + new java.lang.String[] { + "DeliveryPipelines", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_descriptor, + new java.lang.String[] { + "Parent", "DeliveryPipelineId", "DeliveryPipeline", "RequestId", "ValidateOnly", + }); + internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "DeliveryPipeline", "RequestId", "AllowMissing", "ValidateOnly", + }); + internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "AllowMissing", "ValidateOnly", "Force", "Etag", + }); + internal_static_google_cloud_deploy_v1_Target_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_deploy_v1_Target_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Target_descriptor, + new java.lang.String[] { + "Name", + "TargetId", + "Uid", + "Description", + "Annotations", + "Labels", + "RequireApproval", + "CreateTime", + "UpdateTime", + "Gke", + "Etag", + "ExecutionConfigs", + "DeploymentTarget", + }); + internal_static_google_cloud_deploy_v1_Target_AnnotationsEntry_descriptor = + internal_static_google_cloud_deploy_v1_Target_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_deploy_v1_Target_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Target_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_Target_LabelsEntry_descriptor = + internal_static_google_cloud_deploy_v1_Target_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_deploy_v1_Target_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Target_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_ExecutionConfig_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_deploy_v1_ExecutionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ExecutionConfig_descriptor, + new java.lang.String[] { + "Usages", "DefaultPool", "PrivatePool", "ExecutionEnvironment", + }); + internal_static_google_cloud_deploy_v1_DefaultPool_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_deploy_v1_DefaultPool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_DefaultPool_descriptor, + new java.lang.String[] { + "ServiceAccount", "ArtifactStorage", + }); + internal_static_google_cloud_deploy_v1_PrivatePool_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_deploy_v1_PrivatePool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_PrivatePool_descriptor, + new java.lang.String[] { + "WorkerPool", "ServiceAccount", "ArtifactStorage", + }); + internal_static_google_cloud_deploy_v1_GkeCluster_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_deploy_v1_GkeCluster_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_GkeCluster_descriptor, + new java.lang.String[] { + "Cluster", + }); + internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_deploy_v1_ListTargetsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_deploy_v1_ListTargetsResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_deploy_v1_ListTargetsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListTargetsResponse_descriptor, + new java.lang.String[] { + "Targets", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_deploy_v1_GetTargetRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_deploy_v1_GetTargetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_GetTargetRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_deploy_v1_CreateTargetRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_deploy_v1_CreateTargetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_CreateTargetRequest_descriptor, + new java.lang.String[] { + "Parent", "TargetId", "Target", "RequestId", "ValidateOnly", + }); + internal_static_google_cloud_deploy_v1_UpdateTargetRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_deploy_v1_UpdateTargetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_UpdateTargetRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Target", "RequestId", "AllowMissing", "ValidateOnly", + }); + internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_deploy_v1_DeleteTargetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "AllowMissing", "ValidateOnly", "Etag", + }); + internal_static_google_cloud_deploy_v1_Release_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_deploy_v1_Release_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Release_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Description", + "Annotations", + "Labels", + "CreateTime", + "RenderStartTime", + "RenderEndTime", + "SkaffoldConfigUri", + "SkaffoldConfigPath", + "BuildArtifacts", + "DeliveryPipelineSnapshot", + "TargetSnapshots", + "RenderState", + "Etag", + "SkaffoldVersion", + "TargetArtifacts", + "TargetRenders", + }); + internal_static_google_cloud_deploy_v1_Release_TargetRender_descriptor = + internal_static_google_cloud_deploy_v1_Release_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_deploy_v1_Release_TargetRender_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Release_TargetRender_descriptor, + new java.lang.String[] { + "RenderingBuild", "RenderingState", + }); + internal_static_google_cloud_deploy_v1_Release_AnnotationsEntry_descriptor = + internal_static_google_cloud_deploy_v1_Release_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_deploy_v1_Release_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Release_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_Release_LabelsEntry_descriptor = + internal_static_google_cloud_deploy_v1_Release_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_deploy_v1_Release_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Release_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_Release_TargetArtifactsEntry_descriptor = + internal_static_google_cloud_deploy_v1_Release_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_deploy_v1_Release_TargetArtifactsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Release_TargetArtifactsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_Release_TargetRendersEntry_descriptor = + internal_static_google_cloud_deploy_v1_Release_descriptor.getNestedTypes().get(4); + internal_static_google_cloud_deploy_v1_Release_TargetRendersEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Release_TargetRendersEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_BuildArtifact_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_deploy_v1_BuildArtifact_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_BuildArtifact_descriptor, + new java.lang.String[] { + "Image", "Tag", + }); + internal_static_google_cloud_deploy_v1_TargetArtifact_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_deploy_v1_TargetArtifact_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_TargetArtifact_descriptor, + new java.lang.String[] { + "ArtifactUri", "SkaffoldConfigPath", "ManifestPath", "Uri", + }); + internal_static_google_cloud_deploy_v1_ListReleasesRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_deploy_v1_ListReleasesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListReleasesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_deploy_v1_ListReleasesResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_deploy_v1_ListReleasesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListReleasesResponse_descriptor, + new java.lang.String[] { + "Releases", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_deploy_v1_GetReleaseRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_deploy_v1_GetReleaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_GetReleaseRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_deploy_v1_CreateReleaseRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_deploy_v1_CreateReleaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_CreateReleaseRequest_descriptor, + new java.lang.String[] { + "Parent", "ReleaseId", "Release", "RequestId", "ValidateOnly", + }); + internal_static_google_cloud_deploy_v1_Rollout_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_deploy_v1_Rollout_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Rollout_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Description", + "Annotations", + "Labels", + "CreateTime", + "ApproveTime", + "EnqueueTime", + "DeployStartTime", + "DeployEndTime", + "TargetId", + "ApprovalState", + "State", + "FailureReason", + "DeployingBuild", + "Etag", + }); + internal_static_google_cloud_deploy_v1_Rollout_AnnotationsEntry_descriptor = + internal_static_google_cloud_deploy_v1_Rollout_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_deploy_v1_Rollout_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Rollout_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_Rollout_LabelsEntry_descriptor = + internal_static_google_cloud_deploy_v1_Rollout_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_deploy_v1_Rollout_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Rollout_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_deploy_v1_ListRolloutsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_deploy_v1_ListRolloutsResponse_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_deploy_v1_ListRolloutsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListRolloutsResponse_descriptor, + new java.lang.String[] { + "Rollouts", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_deploy_v1_GetRolloutRequest_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_deploy_v1_GetRolloutRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_GetRolloutRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_deploy_v1_CreateRolloutRequest_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_cloud_deploy_v1_CreateRolloutRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_CreateRolloutRequest_descriptor, + new java.lang.String[] { + "Parent", "RolloutId", "Rollout", "RequestId", "ValidateOnly", + }); + internal_static_google_cloud_deploy_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_cloud_deploy_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_descriptor, + new java.lang.String[] { + "Name", "Approved", + }); + internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_deploy_v1_Config_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_cloud_deploy_v1_Config_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Config_descriptor, + new java.lang.String[] { + "Name", "SupportedVersions", "DefaultSkaffoldVersion", + }); + internal_static_google_cloud_deploy_v1_SkaffoldVersion_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_google_cloud_deploy_v1_SkaffoldVersion_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_SkaffoldVersion_descriptor, + new java.lang.String[] { + "Version", "SupportEndDate", + }); + internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_google_cloud_deploy_v1_GetConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.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(); + com.google.type.DateProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Config.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Config.java new file mode 100644 index 0000000..8a2ef44 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Config.java @@ -0,0 +1,1373 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Service-wide configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Config} + */ +public final class Config extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Config) + ConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use Config.newBuilder() to construct. + private Config(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Config() { + name_ = ""; + supportedVersions_ = java.util.Collections.emptyList(); + defaultSkaffoldVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Config(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Config( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + supportedVersions_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + supportedVersions_.add( + input.readMessage( + com.google.cloud.deploy.v1.SkaffoldVersion.parser(), extensionRegistry)); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + defaultSkaffoldVersion_ = 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)) { + supportedVersions_ = java.util.Collections.unmodifiableList(supportedVersions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Config_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Config_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Config.class, + com.google.cloud.deploy.v1.Config.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the configuration.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Name of the configuration.
+   * 
+ * + * 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 SUPPORTED_VERSIONS_FIELD_NUMBER = 2; + private java.util.List supportedVersions_; + /** + * + * + *
+   * Output only. All supported versions of Skaffold.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getSupportedVersionsList() { + return supportedVersions_; + } + /** + * + * + *
+   * Output only. All supported versions of Skaffold.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSupportedVersionsOrBuilderList() { + return supportedVersions_; + } + /** + * + * + *
+   * Output only. All supported versions of Skaffold.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSupportedVersionsCount() { + return supportedVersions_.size(); + } + /** + * + * + *
+   * Output only. All supported versions of Skaffold.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.SkaffoldVersion getSupportedVersions(int index) { + return supportedVersions_.get(index); + } + /** + * + * + *
+   * Output only. All supported versions of Skaffold.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.SkaffoldVersionOrBuilder getSupportedVersionsOrBuilder( + int index) { + return supportedVersions_.get(index); + } + + public static final int DEFAULT_SKAFFOLD_VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object defaultSkaffoldVersion_; + /** + * + * + *
+   * Output only. Default Skaffold version that is assigned when a Release is created without
+   * specifying a Skaffold version.
+   * 
+ * + * string default_skaffold_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The defaultSkaffoldVersion. + */ + @java.lang.Override + public java.lang.String getDefaultSkaffoldVersion() { + java.lang.Object ref = defaultSkaffoldVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultSkaffoldVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Default Skaffold version that is assigned when a Release is created without
+   * specifying a Skaffold version.
+   * 
+ * + * string default_skaffold_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for defaultSkaffoldVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDefaultSkaffoldVersionBytes() { + java.lang.Object ref = defaultSkaffoldVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultSkaffoldVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < supportedVersions_.size(); i++) { + output.writeMessage(2, supportedVersions_.get(i)); + } + if (!getDefaultSkaffoldVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, defaultSkaffoldVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < supportedVersions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, supportedVersions_.get(i)); + } + if (!getDefaultSkaffoldVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, defaultSkaffoldVersion_); + } + 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.deploy.v1.Config)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Config other = (com.google.cloud.deploy.v1.Config) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSupportedVersionsList().equals(other.getSupportedVersionsList())) return false; + if (!getDefaultSkaffoldVersion().equals(other.getDefaultSkaffoldVersion())) 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 (getSupportedVersionsCount() > 0) { + hash = (37 * hash) + SUPPORTED_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getSupportedVersionsList().hashCode(); + } + hash = (37 * hash) + DEFAULT_SKAFFOLD_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getDefaultSkaffoldVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Config parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Config parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Config parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Config parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Config parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Config parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Config parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Config parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Config parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Config parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Config parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Config parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.deploy.v1.Config prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Service-wide configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Config} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Config) + com.google.cloud.deploy.v1.ConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Config_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Config_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Config.class, + com.google.cloud.deploy.v1.Config.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Config.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSupportedVersionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (supportedVersionsBuilder_ == null) { + supportedVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + supportedVersionsBuilder_.clear(); + } + defaultSkaffoldVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Config_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Config getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Config.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Config build() { + com.google.cloud.deploy.v1.Config result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Config buildPartial() { + com.google.cloud.deploy.v1.Config result = new com.google.cloud.deploy.v1.Config(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (supportedVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + supportedVersions_ = java.util.Collections.unmodifiableList(supportedVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.supportedVersions_ = supportedVersions_; + } else { + result.supportedVersions_ = supportedVersionsBuilder_.build(); + } + result.defaultSkaffoldVersion_ = defaultSkaffoldVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.Config) { + return mergeFrom((com.google.cloud.deploy.v1.Config) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Config other) { + if (other == com.google.cloud.deploy.v1.Config.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (supportedVersionsBuilder_ == null) { + if (!other.supportedVersions_.isEmpty()) { + if (supportedVersions_.isEmpty()) { + supportedVersions_ = other.supportedVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSupportedVersionsIsMutable(); + supportedVersions_.addAll(other.supportedVersions_); + } + onChanged(); + } + } else { + if (!other.supportedVersions_.isEmpty()) { + if (supportedVersionsBuilder_.isEmpty()) { + supportedVersionsBuilder_.dispose(); + supportedVersionsBuilder_ = null; + supportedVersions_ = other.supportedVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + supportedVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSupportedVersionsFieldBuilder() + : null; + } else { + supportedVersionsBuilder_.addAllMessages(other.supportedVersions_); + } + } + } + if (!other.getDefaultSkaffoldVersion().isEmpty()) { + defaultSkaffoldVersion_ = other.defaultSkaffoldVersion_; + 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.deploy.v1.Config parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.Config) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the configuration.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the configuration.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the configuration.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Name of the configuration.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the configuration.
+     * 
+ * + * 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.util.List supportedVersions_ = + java.util.Collections.emptyList(); + + private void ensureSupportedVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + supportedVersions_ = + new java.util.ArrayList(supportedVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.SkaffoldVersion, + com.google.cloud.deploy.v1.SkaffoldVersion.Builder, + com.google.cloud.deploy.v1.SkaffoldVersionOrBuilder> + supportedVersionsBuilder_; + + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getSupportedVersionsList() { + if (supportedVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(supportedVersions_); + } else { + return supportedVersionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSupportedVersionsCount() { + if (supportedVersionsBuilder_ == null) { + return supportedVersions_.size(); + } else { + return supportedVersionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.SkaffoldVersion getSupportedVersions(int index) { + if (supportedVersionsBuilder_ == null) { + return supportedVersions_.get(index); + } else { + return supportedVersionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSupportedVersions( + int index, com.google.cloud.deploy.v1.SkaffoldVersion value) { + if (supportedVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedVersionsIsMutable(); + supportedVersions_.set(index, value); + onChanged(); + } else { + supportedVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSupportedVersions( + int index, com.google.cloud.deploy.v1.SkaffoldVersion.Builder builderForValue) { + if (supportedVersionsBuilder_ == null) { + ensureSupportedVersionsIsMutable(); + supportedVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + supportedVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSupportedVersions(com.google.cloud.deploy.v1.SkaffoldVersion value) { + if (supportedVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedVersionsIsMutable(); + supportedVersions_.add(value); + onChanged(); + } else { + supportedVersionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSupportedVersions( + int index, com.google.cloud.deploy.v1.SkaffoldVersion value) { + if (supportedVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedVersionsIsMutable(); + supportedVersions_.add(index, value); + onChanged(); + } else { + supportedVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSupportedVersions( + com.google.cloud.deploy.v1.SkaffoldVersion.Builder builderForValue) { + if (supportedVersionsBuilder_ == null) { + ensureSupportedVersionsIsMutable(); + supportedVersions_.add(builderForValue.build()); + onChanged(); + } else { + supportedVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSupportedVersions( + int index, com.google.cloud.deploy.v1.SkaffoldVersion.Builder builderForValue) { + if (supportedVersionsBuilder_ == null) { + ensureSupportedVersionsIsMutable(); + supportedVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + supportedVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSupportedVersions( + java.lang.Iterable values) { + if (supportedVersionsBuilder_ == null) { + ensureSupportedVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, supportedVersions_); + onChanged(); + } else { + supportedVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSupportedVersions() { + if (supportedVersionsBuilder_ == null) { + supportedVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + supportedVersionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSupportedVersions(int index) { + if (supportedVersionsBuilder_ == null) { + ensureSupportedVersionsIsMutable(); + supportedVersions_.remove(index); + onChanged(); + } else { + supportedVersionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.SkaffoldVersion.Builder getSupportedVersionsBuilder( + int index) { + return getSupportedVersionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.SkaffoldVersionOrBuilder getSupportedVersionsOrBuilder( + int index) { + if (supportedVersionsBuilder_ == null) { + return supportedVersions_.get(index); + } else { + return supportedVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSupportedVersionsOrBuilderList() { + if (supportedVersionsBuilder_ != null) { + return supportedVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(supportedVersions_); + } + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.SkaffoldVersion.Builder addSupportedVersionsBuilder() { + return getSupportedVersionsFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.SkaffoldVersion.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.SkaffoldVersion.Builder addSupportedVersionsBuilder( + int index) { + return getSupportedVersionsFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.SkaffoldVersion.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. All supported versions of Skaffold.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSupportedVersionsBuilderList() { + return getSupportedVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.SkaffoldVersion, + com.google.cloud.deploy.v1.SkaffoldVersion.Builder, + com.google.cloud.deploy.v1.SkaffoldVersionOrBuilder> + getSupportedVersionsFieldBuilder() { + if (supportedVersionsBuilder_ == null) { + supportedVersionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.SkaffoldVersion, + com.google.cloud.deploy.v1.SkaffoldVersion.Builder, + com.google.cloud.deploy.v1.SkaffoldVersionOrBuilder>( + supportedVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + supportedVersions_ = null; + } + return supportedVersionsBuilder_; + } + + private java.lang.Object defaultSkaffoldVersion_ = ""; + /** + * + * + *
+     * Output only. Default Skaffold version that is assigned when a Release is created without
+     * specifying a Skaffold version.
+     * 
+ * + * string default_skaffold_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The defaultSkaffoldVersion. + */ + public java.lang.String getDefaultSkaffoldVersion() { + java.lang.Object ref = defaultSkaffoldVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultSkaffoldVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Default Skaffold version that is assigned when a Release is created without
+     * specifying a Skaffold version.
+     * 
+ * + * string default_skaffold_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for defaultSkaffoldVersion. + */ + public com.google.protobuf.ByteString getDefaultSkaffoldVersionBytes() { + java.lang.Object ref = defaultSkaffoldVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultSkaffoldVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Default Skaffold version that is assigned when a Release is created without
+     * specifying a Skaffold version.
+     * 
+ * + * string default_skaffold_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The defaultSkaffoldVersion to set. + * @return This builder for chaining. + */ + public Builder setDefaultSkaffoldVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + defaultSkaffoldVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Default Skaffold version that is assigned when a Release is created without
+     * specifying a Skaffold version.
+     * 
+ * + * string default_skaffold_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDefaultSkaffoldVersion() { + + defaultSkaffoldVersion_ = getDefaultInstance().getDefaultSkaffoldVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Default Skaffold version that is assigned when a Release is created without
+     * specifying a Skaffold version.
+     * 
+ * + * string default_skaffold_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for defaultSkaffoldVersion to set. + * @return This builder for chaining. + */ + public Builder setDefaultSkaffoldVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + defaultSkaffoldVersion_ = 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.deploy.v1.Config) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Config) + private static final com.google.cloud.deploy.v1.Config DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Config(); + } + + public static com.google.cloud.deploy.v1.Config getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Config parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Config(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Config getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ConfigName.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ConfigName.java new file mode 100644 index 0000000..6b1bc51 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ConfigName.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.deploy.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 ConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/config"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected ConfigName() { + project = null; + location = null; + } + + private ConfigName(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 ConfigName 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 ConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "ConfigName.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 (ConfigName 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()) { + ConfigName that = ((ConfigName) 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}/config. */ + 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(ConfigName configName) { + this.project = configName.project; + this.location = configName.location; + } + + public ConfigName build() { + return new ConfigName(this); + } + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ConfigOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ConfigOrBuilder.java new file mode 100644 index 0000000..4336902 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ConfigOrBuilder.java @@ -0,0 +1,139 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Config) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the configuration.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the configuration.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. All supported versions of Skaffold.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getSupportedVersionsList(); + /** + * + * + *
+   * Output only. All supported versions of Skaffold.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.SkaffoldVersion getSupportedVersions(int index); + /** + * + * + *
+   * Output only. All supported versions of Skaffold.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSupportedVersionsCount(); + /** + * + * + *
+   * Output only. All supported versions of Skaffold.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSupportedVersionsOrBuilderList(); + /** + * + * + *
+   * Output only. All supported versions of Skaffold.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.SkaffoldVersion supported_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.SkaffoldVersionOrBuilder getSupportedVersionsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Default Skaffold version that is assigned when a Release is created without
+   * specifying a Skaffold version.
+   * 
+ * + * string default_skaffold_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The defaultSkaffoldVersion. + */ + java.lang.String getDefaultSkaffoldVersion(); + /** + * + * + *
+   * Output only. Default Skaffold version that is assigned when a Release is created without
+   * specifying a Skaffold version.
+   * 
+ * + * string default_skaffold_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for defaultSkaffoldVersion. + */ + com.google.protobuf.ByteString getDefaultSkaffoldVersionBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java new file mode 100644 index 0000000..af20214 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java @@ -0,0 +1,1482 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `CreateDeliveryPipeline`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CreateDeliveryPipelineRequest} + */ +public final class CreateDeliveryPipelineRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.CreateDeliveryPipelineRequest) + CreateDeliveryPipelineRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDeliveryPipelineRequest.newBuilder() to construct. + private CreateDeliveryPipelineRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDeliveryPipelineRequest() { + parent_ = ""; + deliveryPipelineId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDeliveryPipelineRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateDeliveryPipelineRequest( + 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(); + + deliveryPipelineId_ = s; + break; + } + case 26: + { + com.google.cloud.deploy.v1.DeliveryPipeline.Builder subBuilder = null; + if (deliveryPipeline_ != null) { + subBuilder = deliveryPipeline_.toBuilder(); + } + deliveryPipeline_ = + input.readMessage( + com.google.cloud.deploy.v1.DeliveryPipeline.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deliveryPipeline_); + deliveryPipeline_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 40: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest.class, + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent collection in which the `DeliveryPipeline` should be created.
+   * Format should be projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent collection in which the `DeliveryPipeline` should be created.
+   * Format should be projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELIVERY_PIPELINE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object deliveryPipelineId_; + /** + * + * + *
+   * Required. ID of the `DeliveryPipeline`.
+   * 
+ * + * string delivery_pipeline_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deliveryPipelineId. + */ + @java.lang.Override + public java.lang.String getDeliveryPipelineId() { + java.lang.Object ref = deliveryPipelineId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deliveryPipelineId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. ID of the `DeliveryPipeline`.
+   * 
+ * + * string delivery_pipeline_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deliveryPipelineId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeliveryPipelineIdBytes() { + java.lang.Object ref = deliveryPipelineId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deliveryPipelineId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELIVERY_PIPELINE_FIELD_NUMBER = 3; + private com.google.cloud.deploy.v1.DeliveryPipeline deliveryPipeline_; + /** + * + * + *
+   * Required. The `DeliveryPipeline` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryPipeline field is set. + */ + @java.lang.Override + public boolean hasDeliveryPipeline() { + return deliveryPipeline_ != null; + } + /** + * + * + *
+   * Required. The `DeliveryPipeline` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryPipeline. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipeline() { + return deliveryPipeline_ == null + ? com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance() + : deliveryPipeline_; + } + /** + * + * + *
+   * Required. The `DeliveryPipeline` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder getDeliveryPipelineOrBuilder() { + return getDeliveryPipeline(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getDeliveryPipelineIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deliveryPipelineId_); + } + if (deliveryPipeline_ != null) { + output.writeMessage(3, getDeliveryPipeline()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getDeliveryPipelineIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deliveryPipelineId_); + } + if (deliveryPipeline_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeliveryPipeline()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest other = + (com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDeliveryPipelineId().equals(other.getDeliveryPipelineId())) return false; + if (hasDeliveryPipeline() != other.hasDeliveryPipeline()) return false; + if (hasDeliveryPipeline()) { + if (!getDeliveryPipeline().equals(other.getDeliveryPipeline())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + DELIVERY_PIPELINE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeliveryPipelineId().hashCode(); + if (hasDeliveryPipeline()) { + hash = (37 * hash) + DELIVERY_PIPELINE_FIELD_NUMBER; + hash = (53 * hash) + getDeliveryPipeline().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest 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.deploy.v1.CreateDeliveryPipelineRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest parseFrom( + 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.deploy.v1.CreateDeliveryPipelineRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest parseFrom( + java.io.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.deploy.v1.CreateDeliveryPipelineRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest parseDelimitedFrom( + java.io.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.deploy.v1.CreateDeliveryPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.CreateDeliveryPipelineRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `CreateDeliveryPipeline`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CreateDeliveryPipelineRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.CreateDeliveryPipelineRequest) + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest.class, + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest.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_ = ""; + + deliveryPipelineId_ = ""; + + if (deliveryPipelineBuilder_ == null) { + deliveryPipeline_ = null; + } else { + deliveryPipeline_ = null; + deliveryPipelineBuilder_ = null; + } + requestId_ = ""; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest build() { + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest buildPartial() { + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest result = + new com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest(this); + result.parent_ = parent_; + result.deliveryPipelineId_ = deliveryPipelineId_; + if (deliveryPipelineBuilder_ == null) { + result.deliveryPipeline_ = deliveryPipeline_; + } else { + result.deliveryPipeline_ = deliveryPipelineBuilder_.build(); + } + result.requestId_ = requestId_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest) { + return mergeFrom((com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest other) { + if (other == com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getDeliveryPipelineId().isEmpty()) { + deliveryPipelineId_ = other.deliveryPipelineId_; + onChanged(); + } + if (other.hasDeliveryPipeline()) { + mergeDeliveryPipeline(other.getDeliveryPipeline()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent collection in which the `DeliveryPipeline` should be created.
+     * Format should be projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent collection in which the `DeliveryPipeline` should be created.
+     * Format should be projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent collection in which the `DeliveryPipeline` should be created.
+     * Format should be projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent collection in which the `DeliveryPipeline` should be created.
+     * Format should be projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent collection in which the `DeliveryPipeline` should be created.
+     * Format should be projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object deliveryPipelineId_ = ""; + /** + * + * + *
+     * Required. ID of the `DeliveryPipeline`.
+     * 
+ * + * string delivery_pipeline_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deliveryPipelineId. + */ + public java.lang.String getDeliveryPipelineId() { + java.lang.Object ref = deliveryPipelineId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deliveryPipelineId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. ID of the `DeliveryPipeline`.
+     * 
+ * + * string delivery_pipeline_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deliveryPipelineId. + */ + public com.google.protobuf.ByteString getDeliveryPipelineIdBytes() { + java.lang.Object ref = deliveryPipelineId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deliveryPipelineId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. ID of the `DeliveryPipeline`.
+     * 
+ * + * string delivery_pipeline_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The deliveryPipelineId to set. + * @return This builder for chaining. + */ + public Builder setDeliveryPipelineId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deliveryPipelineId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `DeliveryPipeline`.
+     * 
+ * + * string delivery_pipeline_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDeliveryPipelineId() { + + deliveryPipelineId_ = getDefaultInstance().getDeliveryPipelineId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `DeliveryPipeline`.
+     * 
+ * + * string delivery_pipeline_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for deliveryPipelineId to set. + * @return This builder for chaining. + */ + public Builder setDeliveryPipelineIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deliveryPipelineId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.deploy.v1.DeliveryPipeline deliveryPipeline_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder> + deliveryPipelineBuilder_; + /** + * + * + *
+     * Required. The `DeliveryPipeline` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryPipeline field is set. + */ + public boolean hasDeliveryPipeline() { + return deliveryPipelineBuilder_ != null || deliveryPipeline_ != null; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryPipeline. + */ + public com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipeline() { + if (deliveryPipelineBuilder_ == null) { + return deliveryPipeline_ == null + ? com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance() + : deliveryPipeline_; + } else { + return deliveryPipelineBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeliveryPipeline(com.google.cloud.deploy.v1.DeliveryPipeline value) { + if (deliveryPipelineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deliveryPipeline_ = value; + onChanged(); + } else { + deliveryPipelineBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeliveryPipeline( + com.google.cloud.deploy.v1.DeliveryPipeline.Builder builderForValue) { + if (deliveryPipelineBuilder_ == null) { + deliveryPipeline_ = builderForValue.build(); + onChanged(); + } else { + deliveryPipelineBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDeliveryPipeline(com.google.cloud.deploy.v1.DeliveryPipeline value) { + if (deliveryPipelineBuilder_ == null) { + if (deliveryPipeline_ != null) { + deliveryPipeline_ = + com.google.cloud.deploy.v1.DeliveryPipeline.newBuilder(deliveryPipeline_) + .mergeFrom(value) + .buildPartial(); + } else { + deliveryPipeline_ = value; + } + onChanged(); + } else { + deliveryPipelineBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDeliveryPipeline() { + if (deliveryPipelineBuilder_ == null) { + deliveryPipeline_ = null; + onChanged(); + } else { + deliveryPipeline_ = null; + deliveryPipelineBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.DeliveryPipeline.Builder getDeliveryPipelineBuilder() { + + onChanged(); + return getDeliveryPipelineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder getDeliveryPipelineOrBuilder() { + if (deliveryPipelineBuilder_ != null) { + return deliveryPipelineBuilder_.getMessageOrBuilder(); + } else { + return deliveryPipeline_ == null + ? com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance() + : deliveryPipeline_; + } + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder> + getDeliveryPipelineFieldBuilder() { + if (deliveryPipelineBuilder_ == null) { + deliveryPipelineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder>( + getDeliveryPipeline(), getParentForChildren(), isClean()); + deliveryPipeline_ = null; + } + return deliveryPipelineBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.CreateDeliveryPipelineRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.CreateDeliveryPipelineRequest) + private static final com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest(); + } + + public static com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDeliveryPipelineRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDeliveryPipelineRequest(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.deploy.v1.CreateDeliveryPipelineRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequestOrBuilder.java new file mode 100644 index 0000000..da2d8c3 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequestOrBuilder.java @@ -0,0 +1,181 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface CreateDeliveryPipelineRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.CreateDeliveryPipelineRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent collection in which the `DeliveryPipeline` should be created.
+   * Format should be projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent collection in which the `DeliveryPipeline` should be created.
+   * Format should be projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. ID of the `DeliveryPipeline`.
+   * 
+ * + * string delivery_pipeline_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deliveryPipelineId. + */ + java.lang.String getDeliveryPipelineId(); + /** + * + * + *
+   * Required. ID of the `DeliveryPipeline`.
+   * 
+ * + * string delivery_pipeline_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deliveryPipelineId. + */ + com.google.protobuf.ByteString getDeliveryPipelineIdBytes(); + + /** + * + * + *
+   * Required. The `DeliveryPipeline` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryPipeline field is set. + */ + boolean hasDeliveryPipeline(); + /** + * + * + *
+   * Required. The `DeliveryPipeline` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryPipeline. + */ + com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipeline(); + /** + * + * + *
+   * Required. The `DeliveryPipeline` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder getDeliveryPipelineOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java new file mode 100644 index 0000000..6e9befe --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java @@ -0,0 +1,1471 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `CreateRelease`,
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CreateReleaseRequest} + */ +public final class CreateReleaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.CreateReleaseRequest) + CreateReleaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateReleaseRequest.newBuilder() to construct. + private CreateReleaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateReleaseRequest() { + parent_ = ""; + releaseId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateReleaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateReleaseRequest( + 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(); + + releaseId_ = s; + break; + } + case 26: + { + com.google.cloud.deploy.v1.Release.Builder subBuilder = null; + if (release_ != null) { + subBuilder = release_.toBuilder(); + } + release_ = + input.readMessage(com.google.cloud.deploy.v1.Release.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(release_); + release_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 40: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateReleaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateReleaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CreateReleaseRequest.class, + com.google.cloud.deploy.v1.CreateReleaseRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent collection in which the `Release` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent collection in which the `Release` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELEASE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object releaseId_; + /** + * + * + *
+   * Required. ID of the `Release`.
+   * 
+ * + * string release_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The releaseId. + */ + @java.lang.Override + public java.lang.String getReleaseId() { + java.lang.Object ref = releaseId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + releaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. ID of the `Release`.
+   * 
+ * + * string release_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for releaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReleaseIdBytes() { + java.lang.Object ref = releaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + releaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELEASE_FIELD_NUMBER = 3; + private com.google.cloud.deploy.v1.Release release_; + /** + * + * + *
+   * Required. The `Release` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the release field is set. + */ + @java.lang.Override + public boolean hasRelease() { + return release_ != null; + } + /** + * + * + *
+   * Required. The `Release` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The release. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release getRelease() { + return release_ == null ? com.google.cloud.deploy.v1.Release.getDefaultInstance() : release_; + } + /** + * + * + *
+   * Required. The `Release` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.ReleaseOrBuilder getReleaseOrBuilder() { + return getRelease(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getReleaseIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, releaseId_); + } + if (release_ != null) { + output.writeMessage(3, getRelease()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getReleaseIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, releaseId_); + } + if (release_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRelease()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.CreateReleaseRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.CreateReleaseRequest other = + (com.google.cloud.deploy.v1.CreateReleaseRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getReleaseId().equals(other.getReleaseId())) return false; + if (hasRelease() != other.hasRelease()) return false; + if (hasRelease()) { + if (!getRelease().equals(other.getRelease())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + RELEASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getReleaseId().hashCode(); + if (hasRelease()) { + hash = (37 * hash) + RELEASE_FIELD_NUMBER; + hash = (53 * hash) + getRelease().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.CreateReleaseRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateReleaseRequest 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.deploy.v1.CreateReleaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateReleaseRequest parseFrom( + 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.deploy.v1.CreateReleaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateReleaseRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.CreateReleaseRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateReleaseRequest parseFrom( + java.io.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.deploy.v1.CreateReleaseRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateReleaseRequest parseDelimitedFrom( + java.io.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.deploy.v1.CreateReleaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateReleaseRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.CreateReleaseRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `CreateRelease`,
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CreateReleaseRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.CreateReleaseRequest) + com.google.cloud.deploy.v1.CreateReleaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateReleaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateReleaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CreateReleaseRequest.class, + com.google.cloud.deploy.v1.CreateReleaseRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.CreateReleaseRequest.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_ = ""; + + releaseId_ = ""; + + if (releaseBuilder_ == null) { + release_ = null; + } else { + release_ = null; + releaseBuilder_ = null; + } + requestId_ = ""; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateReleaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateReleaseRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.CreateReleaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateReleaseRequest build() { + com.google.cloud.deploy.v1.CreateReleaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateReleaseRequest buildPartial() { + com.google.cloud.deploy.v1.CreateReleaseRequest result = + new com.google.cloud.deploy.v1.CreateReleaseRequest(this); + result.parent_ = parent_; + result.releaseId_ = releaseId_; + if (releaseBuilder_ == null) { + result.release_ = release_; + } else { + result.release_ = releaseBuilder_.build(); + } + result.requestId_ = requestId_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.CreateReleaseRequest) { + return mergeFrom((com.google.cloud.deploy.v1.CreateReleaseRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.CreateReleaseRequest other) { + if (other == com.google.cloud.deploy.v1.CreateReleaseRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getReleaseId().isEmpty()) { + releaseId_ = other.releaseId_; + onChanged(); + } + if (other.hasRelease()) { + mergeRelease(other.getRelease()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.CreateReleaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.CreateReleaseRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent collection in which the `Release` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent collection in which the `Release` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent collection in which the `Release` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent collection in which the `Release` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent collection in which the `Release` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object releaseId_ = ""; + /** + * + * + *
+     * Required. ID of the `Release`.
+     * 
+ * + * string release_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The releaseId. + */ + public java.lang.String getReleaseId() { + java.lang.Object ref = releaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + releaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. ID of the `Release`.
+     * 
+ * + * string release_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for releaseId. + */ + public com.google.protobuf.ByteString getReleaseIdBytes() { + java.lang.Object ref = releaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + releaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. ID of the `Release`.
+     * 
+ * + * string release_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The releaseId to set. + * @return This builder for chaining. + */ + public Builder setReleaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + releaseId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `Release`.
+     * 
+ * + * string release_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearReleaseId() { + + releaseId_ = getDefaultInstance().getReleaseId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `Release`.
+     * 
+ * + * string release_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for releaseId to set. + * @return This builder for chaining. + */ + public Builder setReleaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + releaseId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.deploy.v1.Release release_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Release, + com.google.cloud.deploy.v1.Release.Builder, + com.google.cloud.deploy.v1.ReleaseOrBuilder> + releaseBuilder_; + /** + * + * + *
+     * Required. The `Release` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the release field is set. + */ + public boolean hasRelease() { + return releaseBuilder_ != null || release_ != null; + } + /** + * + * + *
+     * Required. The `Release` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The release. + */ + public com.google.cloud.deploy.v1.Release getRelease() { + if (releaseBuilder_ == null) { + return release_ == null + ? com.google.cloud.deploy.v1.Release.getDefaultInstance() + : release_; + } else { + return releaseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The `Release` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRelease(com.google.cloud.deploy.v1.Release value) { + if (releaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + release_ = value; + onChanged(); + } else { + releaseBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `Release` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRelease(com.google.cloud.deploy.v1.Release.Builder builderForValue) { + if (releaseBuilder_ == null) { + release_ = builderForValue.build(); + onChanged(); + } else { + releaseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The `Release` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRelease(com.google.cloud.deploy.v1.Release value) { + if (releaseBuilder_ == null) { + if (release_ != null) { + release_ = + com.google.cloud.deploy.v1.Release.newBuilder(release_) + .mergeFrom(value) + .buildPartial(); + } else { + release_ = value; + } + onChanged(); + } else { + releaseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `Release` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRelease() { + if (releaseBuilder_ == null) { + release_ = null; + onChanged(); + } else { + release_ = null; + releaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The `Release` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.Release.Builder getReleaseBuilder() { + + onChanged(); + return getReleaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The `Release` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.ReleaseOrBuilder getReleaseOrBuilder() { + if (releaseBuilder_ != null) { + return releaseBuilder_.getMessageOrBuilder(); + } else { + return release_ == null + ? com.google.cloud.deploy.v1.Release.getDefaultInstance() + : release_; + } + } + /** + * + * + *
+     * Required. The `Release` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Release, + com.google.cloud.deploy.v1.Release.Builder, + com.google.cloud.deploy.v1.ReleaseOrBuilder> + getReleaseFieldBuilder() { + if (releaseBuilder_ == null) { + releaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Release, + com.google.cloud.deploy.v1.Release.Builder, + com.google.cloud.deploy.v1.ReleaseOrBuilder>( + getRelease(), getParentForChildren(), isClean()); + release_ = null; + } + return releaseBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.CreateReleaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.CreateReleaseRequest) + private static final com.google.cloud.deploy.v1.CreateReleaseRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.CreateReleaseRequest(); + } + + public static com.google.cloud.deploy.v1.CreateReleaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateReleaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateReleaseRequest(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.deploy.v1.CreateReleaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequestOrBuilder.java new file mode 100644 index 0000000..48a860a --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequestOrBuilder.java @@ -0,0 +1,180 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface CreateReleaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.CreateReleaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent collection in which the `Release` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent collection in which the `Release` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. ID of the `Release`.
+   * 
+ * + * string release_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The releaseId. + */ + java.lang.String getReleaseId(); + /** + * + * + *
+   * Required. ID of the `Release`.
+   * 
+ * + * string release_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for releaseId. + */ + com.google.protobuf.ByteString getReleaseIdBytes(); + + /** + * + * + *
+   * Required. The `Release` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the release field is set. + */ + boolean hasRelease(); + /** + * + * + *
+   * Required. The `Release` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The release. + */ + com.google.cloud.deploy.v1.Release getRelease(); + /** + * + * + *
+   * Required. The `Release` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Release release = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.ReleaseOrBuilder getReleaseOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java new file mode 100644 index 0000000..f9081af --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java @@ -0,0 +1,1471 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * CreateRolloutRequest is the request object used by `CreateRollout`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CreateRolloutRequest} + */ +public final class CreateRolloutRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.CreateRolloutRequest) + CreateRolloutRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateRolloutRequest.newBuilder() to construct. + private CreateRolloutRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateRolloutRequest() { + parent_ = ""; + rolloutId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateRolloutRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateRolloutRequest( + 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(); + + rolloutId_ = s; + break; + } + case 26: + { + com.google.cloud.deploy.v1.Rollout.Builder subBuilder = null; + if (rollout_ != null) { + subBuilder = rollout_.toBuilder(); + } + rollout_ = + input.readMessage(com.google.cloud.deploy.v1.Rollout.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rollout_); + rollout_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 40: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateRolloutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateRolloutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CreateRolloutRequest.class, + com.google.cloud.deploy.v1.CreateRolloutRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent collection in which the `Rollout` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent collection in which the `Rollout` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLLOUT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object rolloutId_; + /** + * + * + *
+   * Required. ID of the `Rollout`.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rolloutId. + */ + @java.lang.Override + public java.lang.String getRolloutId() { + java.lang.Object ref = rolloutId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. ID of the `Rollout`.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rolloutId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRolloutIdBytes() { + java.lang.Object ref = rolloutId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLLOUT_FIELD_NUMBER = 3; + private com.google.cloud.deploy.v1.Rollout rollout_; + /** + * + * + *
+   * Required. The `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollout field is set. + */ + @java.lang.Override + public boolean hasRollout() { + return rollout_ != null; + } + /** + * + * + *
+   * Required. The `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollout. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Rollout getRollout() { + return rollout_ == null ? com.google.cloud.deploy.v1.Rollout.getDefaultInstance() : rollout_; + } + /** + * + * + *
+   * Required. The `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RolloutOrBuilder getRolloutOrBuilder() { + return getRollout(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getRolloutIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rolloutId_); + } + if (rollout_ != null) { + output.writeMessage(3, getRollout()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getRolloutIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rolloutId_); + } + if (rollout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRollout()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.CreateRolloutRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.CreateRolloutRequest other = + (com.google.cloud.deploy.v1.CreateRolloutRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getRolloutId().equals(other.getRolloutId())) return false; + if (hasRollout() != other.hasRollout()) return false; + if (hasRollout()) { + if (!getRollout().equals(other.getRollout())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + ROLLOUT_ID_FIELD_NUMBER; + hash = (53 * hash) + getRolloutId().hashCode(); + if (hasRollout()) { + hash = (37 * hash) + ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + getRollout().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.CreateRolloutRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateRolloutRequest 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.deploy.v1.CreateRolloutRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateRolloutRequest parseFrom( + 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.deploy.v1.CreateRolloutRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateRolloutRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.CreateRolloutRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateRolloutRequest parseFrom( + java.io.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.deploy.v1.CreateRolloutRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateRolloutRequest parseDelimitedFrom( + java.io.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.deploy.v1.CreateRolloutRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateRolloutRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.CreateRolloutRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * CreateRolloutRequest is the request object used by `CreateRollout`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CreateRolloutRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.CreateRolloutRequest) + com.google.cloud.deploy.v1.CreateRolloutRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateRolloutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateRolloutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CreateRolloutRequest.class, + com.google.cloud.deploy.v1.CreateRolloutRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.CreateRolloutRequest.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_ = ""; + + rolloutId_ = ""; + + if (rolloutBuilder_ == null) { + rollout_ = null; + } else { + rollout_ = null; + rolloutBuilder_ = null; + } + requestId_ = ""; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateRolloutRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateRolloutRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.CreateRolloutRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateRolloutRequest build() { + com.google.cloud.deploy.v1.CreateRolloutRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateRolloutRequest buildPartial() { + com.google.cloud.deploy.v1.CreateRolloutRequest result = + new com.google.cloud.deploy.v1.CreateRolloutRequest(this); + result.parent_ = parent_; + result.rolloutId_ = rolloutId_; + if (rolloutBuilder_ == null) { + result.rollout_ = rollout_; + } else { + result.rollout_ = rolloutBuilder_.build(); + } + result.requestId_ = requestId_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.CreateRolloutRequest) { + return mergeFrom((com.google.cloud.deploy.v1.CreateRolloutRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.CreateRolloutRequest other) { + if (other == com.google.cloud.deploy.v1.CreateRolloutRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getRolloutId().isEmpty()) { + rolloutId_ = other.rolloutId_; + onChanged(); + } + if (other.hasRollout()) { + mergeRollout(other.getRollout()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.CreateRolloutRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.CreateRolloutRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent collection in which the `Rollout` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent collection in which the `Rollout` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent collection in which the `Rollout` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent collection in which the `Rollout` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent collection in which the `Rollout` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object rolloutId_ = ""; + /** + * + * + *
+     * Required. ID of the `Rollout`.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rolloutId. + */ + public java.lang.String getRolloutId() { + java.lang.Object ref = rolloutId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. ID of the `Rollout`.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rolloutId. + */ + public com.google.protobuf.ByteString getRolloutIdBytes() { + java.lang.Object ref = rolloutId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. ID of the `Rollout`.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The rolloutId to set. + * @return This builder for chaining. + */ + public Builder setRolloutId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rolloutId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `Rollout`.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRolloutId() { + + rolloutId_ = getDefaultInstance().getRolloutId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `Rollout`.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for rolloutId to set. + * @return This builder for chaining. + */ + public Builder setRolloutIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rolloutId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.deploy.v1.Rollout rollout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Rollout, + com.google.cloud.deploy.v1.Rollout.Builder, + com.google.cloud.deploy.v1.RolloutOrBuilder> + rolloutBuilder_; + /** + * + * + *
+     * Required. The `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollout field is set. + */ + public boolean hasRollout() { + return rolloutBuilder_ != null || rollout_ != null; + } + /** + * + * + *
+     * Required. The `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollout. + */ + public com.google.cloud.deploy.v1.Rollout getRollout() { + if (rolloutBuilder_ == null) { + return rollout_ == null + ? com.google.cloud.deploy.v1.Rollout.getDefaultInstance() + : rollout_; + } else { + return rolloutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRollout(com.google.cloud.deploy.v1.Rollout value) { + if (rolloutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollout_ = value; + onChanged(); + } else { + rolloutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRollout(com.google.cloud.deploy.v1.Rollout.Builder builderForValue) { + if (rolloutBuilder_ == null) { + rollout_ = builderForValue.build(); + onChanged(); + } else { + rolloutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRollout(com.google.cloud.deploy.v1.Rollout value) { + if (rolloutBuilder_ == null) { + if (rollout_ != null) { + rollout_ = + com.google.cloud.deploy.v1.Rollout.newBuilder(rollout_) + .mergeFrom(value) + .buildPartial(); + } else { + rollout_ = value; + } + onChanged(); + } else { + rolloutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRollout() { + if (rolloutBuilder_ == null) { + rollout_ = null; + onChanged(); + } else { + rollout_ = null; + rolloutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.Rollout.Builder getRolloutBuilder() { + + onChanged(); + return getRolloutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.RolloutOrBuilder getRolloutOrBuilder() { + if (rolloutBuilder_ != null) { + return rolloutBuilder_.getMessageOrBuilder(); + } else { + return rollout_ == null + ? com.google.cloud.deploy.v1.Rollout.getDefaultInstance() + : rollout_; + } + } + /** + * + * + *
+     * Required. The `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Rollout, + com.google.cloud.deploy.v1.Rollout.Builder, + com.google.cloud.deploy.v1.RolloutOrBuilder> + getRolloutFieldBuilder() { + if (rolloutBuilder_ == null) { + rolloutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Rollout, + com.google.cloud.deploy.v1.Rollout.Builder, + com.google.cloud.deploy.v1.RolloutOrBuilder>( + getRollout(), getParentForChildren(), isClean()); + rollout_ = null; + } + return rolloutBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.CreateRolloutRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.CreateRolloutRequest) + private static final com.google.cloud.deploy.v1.CreateRolloutRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.CreateRolloutRequest(); + } + + public static com.google.cloud.deploy.v1.CreateRolloutRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRolloutRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateRolloutRequest(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.deploy.v1.CreateRolloutRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequestOrBuilder.java new file mode 100644 index 0000000..0e2f4c4 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequestOrBuilder.java @@ -0,0 +1,180 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface CreateRolloutRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.CreateRolloutRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent collection in which the `Rollout` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent collection in which the `Rollout` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. ID of the `Rollout`.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rolloutId. + */ + java.lang.String getRolloutId(); + /** + * + * + *
+   * Required. ID of the `Rollout`.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rolloutId. + */ + com.google.protobuf.ByteString getRolloutIdBytes(); + + /** + * + * + *
+   * Required. The `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollout field is set. + */ + boolean hasRollout(); + /** + * + * + *
+   * Required. The `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollout. + */ + com.google.cloud.deploy.v1.Rollout getRollout(); + /** + * + * + *
+   * Required. The `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.RolloutOrBuilder getRolloutOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java new file mode 100644 index 0000000..e19f99d --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java @@ -0,0 +1,1464 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `CreateTarget`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CreateTargetRequest} + */ +public final class CreateTargetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.CreateTargetRequest) + CreateTargetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTargetRequest.newBuilder() to construct. + private CreateTargetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTargetRequest() { + parent_ = ""; + targetId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTargetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateTargetRequest( + 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(); + + targetId_ = s; + break; + } + case 26: + { + com.google.cloud.deploy.v1.Target.Builder subBuilder = null; + if (target_ != null) { + subBuilder = target_.toBuilder(); + } + target_ = + input.readMessage(com.google.cloud.deploy.v1.Target.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(target_); + target_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 40: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateTargetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateTargetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CreateTargetRequest.class, + com.google.cloud.deploy.v1.CreateTargetRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent collection in which the `Target` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent collection in which the `Target` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object targetId_; + /** + * + * + *
+   * Required. ID of the `Target`.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetId. + */ + @java.lang.Override + public java.lang.String getTargetId() { + java.lang.Object ref = targetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. ID of the `Target`.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetIdBytes() { + java.lang.Object ref = targetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_FIELD_NUMBER = 3; + private com.google.cloud.deploy.v1.Target target_; + /** + * + * + *
+   * Required. The `Target` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return target_ != null; + } + /** + * + * + *
+   * Required. The `Target` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Target getTarget() { + return target_ == null ? com.google.cloud.deploy.v1.Target.getDefaultInstance() : target_; + } + /** + * + * + *
+   * Required. The `Target` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetOrBuilder getTargetOrBuilder() { + return getTarget(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getTargetIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetId_); + } + if (target_ != null) { + output.writeMessage(3, getTarget()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getTargetIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetId_); + } + if (target_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTarget()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.CreateTargetRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.CreateTargetRequest other = + (com.google.cloud.deploy.v1.CreateTargetRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getTargetId().equals(other.getTargetId())) return false; + if (hasTarget() != other.hasTarget()) return false; + if (hasTarget()) { + if (!getTarget().equals(other.getTarget())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + TARGET_ID_FIELD_NUMBER; + hash = (53 * hash) + getTargetId().hashCode(); + if (hasTarget()) { + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.CreateTargetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateTargetRequest 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.deploy.v1.CreateTargetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateTargetRequest parseFrom( + 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.deploy.v1.CreateTargetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateTargetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.CreateTargetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateTargetRequest parseFrom( + java.io.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.deploy.v1.CreateTargetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateTargetRequest parseDelimitedFrom( + java.io.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.deploy.v1.CreateTargetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateTargetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.CreateTargetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `CreateTarget`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CreateTargetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.CreateTargetRequest) + com.google.cloud.deploy.v1.CreateTargetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateTargetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateTargetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CreateTargetRequest.class, + com.google.cloud.deploy.v1.CreateTargetRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.CreateTargetRequest.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_ = ""; + + targetId_ = ""; + + if (targetBuilder_ == null) { + target_ = null; + } else { + target_ = null; + targetBuilder_ = null; + } + requestId_ = ""; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateTargetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateTargetRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.CreateTargetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateTargetRequest build() { + com.google.cloud.deploy.v1.CreateTargetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateTargetRequest buildPartial() { + com.google.cloud.deploy.v1.CreateTargetRequest result = + new com.google.cloud.deploy.v1.CreateTargetRequest(this); + result.parent_ = parent_; + result.targetId_ = targetId_; + if (targetBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = targetBuilder_.build(); + } + result.requestId_ = requestId_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.CreateTargetRequest) { + return mergeFrom((com.google.cloud.deploy.v1.CreateTargetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.CreateTargetRequest other) { + if (other == com.google.cloud.deploy.v1.CreateTargetRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getTargetId().isEmpty()) { + targetId_ = other.targetId_; + onChanged(); + } + if (other.hasTarget()) { + mergeTarget(other.getTarget()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.CreateTargetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.CreateTargetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent collection in which the `Target` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent collection in which the `Target` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent collection in which the `Target` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent collection in which the `Target` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent collection in which the `Target` should be created.
+     * Format should be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetId_ = ""; + /** + * + * + *
+     * Required. ID of the `Target`.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetId. + */ + public java.lang.String getTargetId() { + java.lang.Object ref = targetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. ID of the `Target`.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetId. + */ + public com.google.protobuf.ByteString getTargetIdBytes() { + java.lang.Object ref = targetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. ID of the `Target`.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The targetId to set. + * @return This builder for chaining. + */ + public Builder setTargetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `Target`.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTargetId() { + + targetId_ = getDefaultInstance().getTargetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `Target`.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for targetId to set. + * @return This builder for chaining. + */ + public Builder setTargetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.deploy.v1.Target target_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder> + targetBuilder_; + /** + * + * + *
+     * Required. The `Target` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + public boolean hasTarget() { + return targetBuilder_ != null || target_ != null; + } + /** + * + * + *
+     * Required. The `Target` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + public com.google.cloud.deploy.v1.Target getTarget() { + if (targetBuilder_ == null) { + return target_ == null ? com.google.cloud.deploy.v1.Target.getDefaultInstance() : target_; + } else { + return targetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The `Target` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.cloud.deploy.v1.Target value) { + if (targetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + targetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `Target` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.cloud.deploy.v1.Target.Builder builderForValue) { + if (targetBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + targetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The `Target` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTarget(com.google.cloud.deploy.v1.Target value) { + if (targetBuilder_ == null) { + if (target_ != null) { + target_ = + com.google.cloud.deploy.v1.Target.newBuilder(target_).mergeFrom(value).buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + targetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `Target` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTarget() { + if (targetBuilder_ == null) { + target_ = null; + onChanged(); + } else { + target_ = null; + targetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The `Target` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.Target.Builder getTargetBuilder() { + + onChanged(); + return getTargetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The `Target` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.TargetOrBuilder getTargetOrBuilder() { + if (targetBuilder_ != null) { + return targetBuilder_.getMessageOrBuilder(); + } else { + return target_ == null ? com.google.cloud.deploy.v1.Target.getDefaultInstance() : target_; + } + } + /** + * + * + *
+     * Required. The `Target` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder> + getTargetFieldBuilder() { + if (targetBuilder_ == null) { + targetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder>( + getTarget(), getParentForChildren(), isClean()); + target_ = null; + } + return targetBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.CreateTargetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.CreateTargetRequest) + private static final com.google.cloud.deploy.v1.CreateTargetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.CreateTargetRequest(); + } + + public static com.google.cloud.deploy.v1.CreateTargetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTargetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTargetRequest(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.deploy.v1.CreateTargetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequestOrBuilder.java new file mode 100644 index 0000000..46bb926 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequestOrBuilder.java @@ -0,0 +1,180 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface CreateTargetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.CreateTargetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent collection in which the `Target` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent collection in which the `Target` should be created.
+   * Format should be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. ID of the `Target`.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetId. + */ + java.lang.String getTargetId(); + /** + * + * + *
+   * Required. ID of the `Target`.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetId. + */ + com.google.protobuf.ByteString getTargetIdBytes(); + + /** + * + * + *
+   * Required. The `Target` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + boolean hasTarget(); + /** + * + * + *
+   * Required. The `Target` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + com.google.cloud.deploy.v1.Target getTarget(); + /** + * + * + *
+   * Required. The `Target` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.TargetOrBuilder getTargetOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPool.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPool.java new file mode 100644 index 0000000..ca58a3a --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPool.java @@ -0,0 +1,847 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Execution using the default Cloud Build pool.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DefaultPool} + */ +public final class DefaultPool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.DefaultPool) + DefaultPoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use DefaultPool.newBuilder() to construct. + private DefaultPool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DefaultPool() { + serviceAccount_ = ""; + artifactStorage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DefaultPool(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DefaultPool( + 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(); + + serviceAccount_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + artifactStorage_ = 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DefaultPool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DefaultPool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DefaultPool.class, + com.google.cloud.deploy.v1.DefaultPool.Builder.class); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * Optional. Google service account to use for execution. If unspecified,
+   * the project execution service account
+   * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+   * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Google service account to use for execution. If unspecified,
+   * the project execution service account
+   * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+   * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIFACT_STORAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object artifactStorage_; + /** + * + * + *
+   * Optional. Cloud Storage location where execution outputs should be stored. This can
+   * either be a bucket ("gs://my-bucket") or a path within a bucket
+   * ("gs://my-bucket/my-dir").
+   * If unspecified, a default bucket located in the same region will be used.
+   * 
+ * + * string artifact_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The artifactStorage. + */ + @java.lang.Override + public java.lang.String getArtifactStorage() { + java.lang.Object ref = artifactStorage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactStorage_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Cloud Storage location where execution outputs should be stored. This can
+   * either be a bucket ("gs://my-bucket") or a path within a bucket
+   * ("gs://my-bucket/my-dir").
+   * If unspecified, a default bucket located in the same region will be used.
+   * 
+ * + * string artifact_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for artifactStorage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactStorageBytes() { + java.lang.Object ref = artifactStorage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactStorage_ = 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 (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceAccount_); + } + if (!getArtifactStorageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, artifactStorage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceAccount_); + } + if (!getArtifactStorageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, artifactStorage_); + } + 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.deploy.v1.DefaultPool)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.DefaultPool other = (com.google.cloud.deploy.v1.DefaultPool) obj; + + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getArtifactStorage().equals(other.getArtifactStorage())) 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) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + ARTIFACT_STORAGE_FIELD_NUMBER; + hash = (53 * hash) + getArtifactStorage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.DefaultPool parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DefaultPool 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.deploy.v1.DefaultPool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DefaultPool parseFrom( + 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.deploy.v1.DefaultPool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DefaultPool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.DefaultPool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DefaultPool parseFrom( + java.io.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.deploy.v1.DefaultPool parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DefaultPool parseDelimitedFrom( + java.io.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.deploy.v1.DefaultPool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DefaultPool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.DefaultPool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Execution using the default Cloud Build pool.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DefaultPool} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.DefaultPool) + com.google.cloud.deploy.v1.DefaultPoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DefaultPool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DefaultPool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DefaultPool.class, + com.google.cloud.deploy.v1.DefaultPool.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.DefaultPool.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(); + serviceAccount_ = ""; + + artifactStorage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DefaultPool_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DefaultPool getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.DefaultPool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DefaultPool build() { + com.google.cloud.deploy.v1.DefaultPool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DefaultPool buildPartial() { + com.google.cloud.deploy.v1.DefaultPool result = + new com.google.cloud.deploy.v1.DefaultPool(this); + result.serviceAccount_ = serviceAccount_; + result.artifactStorage_ = artifactStorage_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.DefaultPool) { + return mergeFrom((com.google.cloud.deploy.v1.DefaultPool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.DefaultPool other) { + if (other == com.google.cloud.deploy.v1.DefaultPool.getDefaultInstance()) return this; + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + if (!other.getArtifactStorage().isEmpty()) { + artifactStorage_ = other.artifactStorage_; + 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.deploy.v1.DefaultPool parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.DefaultPool) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Optional. Google service account to use for execution. If unspecified,
+     * the project execution service account
+     * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+     * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Google service account to use for execution. If unspecified,
+     * the project execution service account
+     * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+     * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Google service account to use for execution. If unspecified,
+     * the project execution service account
+     * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+     * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Google service account to use for execution. If unspecified,
+     * the project execution service account
+     * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+     * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Google service account to use for execution. If unspecified,
+     * the project execution service account
+     * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+     * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccount_ = value; + onChanged(); + return this; + } + + private java.lang.Object artifactStorage_ = ""; + /** + * + * + *
+     * Optional. Cloud Storage location where execution outputs should be stored. This can
+     * either be a bucket ("gs://my-bucket") or a path within a bucket
+     * ("gs://my-bucket/my-dir").
+     * If unspecified, a default bucket located in the same region will be used.
+     * 
+ * + * string artifact_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The artifactStorage. + */ + public java.lang.String getArtifactStorage() { + java.lang.Object ref = artifactStorage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactStorage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Cloud Storage location where execution outputs should be stored. This can
+     * either be a bucket ("gs://my-bucket") or a path within a bucket
+     * ("gs://my-bucket/my-dir").
+     * If unspecified, a default bucket located in the same region will be used.
+     * 
+ * + * string artifact_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for artifactStorage. + */ + public com.google.protobuf.ByteString getArtifactStorageBytes() { + java.lang.Object ref = artifactStorage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactStorage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Cloud Storage location where execution outputs should be stored. This can
+     * either be a bucket ("gs://my-bucket") or a path within a bucket
+     * ("gs://my-bucket/my-dir").
+     * If unspecified, a default bucket located in the same region will be used.
+     * 
+ * + * string artifact_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The artifactStorage to set. + * @return This builder for chaining. + */ + public Builder setArtifactStorage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + artifactStorage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud Storage location where execution outputs should be stored. This can
+     * either be a bucket ("gs://my-bucket") or a path within a bucket
+     * ("gs://my-bucket/my-dir").
+     * If unspecified, a default bucket located in the same region will be used.
+     * 
+ * + * string artifact_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearArtifactStorage() { + + artifactStorage_ = getDefaultInstance().getArtifactStorage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud Storage location where execution outputs should be stored. This can
+     * either be a bucket ("gs://my-bucket") or a path within a bucket
+     * ("gs://my-bucket/my-dir").
+     * If unspecified, a default bucket located in the same region will be used.
+     * 
+ * + * string artifact_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for artifactStorage to set. + * @return This builder for chaining. + */ + public Builder setArtifactStorageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + artifactStorage_ = 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.deploy.v1.DefaultPool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.DefaultPool) + private static final com.google.cloud.deploy.v1.DefaultPool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.DefaultPool(); + } + + public static com.google.cloud.deploy.v1.DefaultPool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DefaultPool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DefaultPool(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.deploy.v1.DefaultPool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPoolOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPoolOrBuilder.java new file mode 100644 index 0000000..0842407 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPoolOrBuilder.java @@ -0,0 +1,85 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface DefaultPoolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.DefaultPool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Google service account to use for execution. If unspecified,
+   * the project execution service account
+   * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+   * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Optional. Google service account to use for execution. If unspecified,
+   * the project execution service account
+   * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+   * 
+ * + * string service_account = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Optional. Cloud Storage location where execution outputs should be stored. This can
+   * either be a bucket ("gs://my-bucket") or a path within a bucket
+   * ("gs://my-bucket/my-dir").
+   * If unspecified, a default bucket located in the same region will be used.
+   * 
+ * + * string artifact_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The artifactStorage. + */ + java.lang.String getArtifactStorage(); + /** + * + * + *
+   * Optional. Cloud Storage location where execution outputs should be stored. This can
+   * either be a bucket ("gs://my-bucket") or a path within a bucket
+   * ("gs://my-bucket/my-dir").
+   * If unspecified, a default bucket located in the same region will be used.
+   * 
+ * + * string artifact_storage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for artifactStorage. + */ + com.google.protobuf.ByteString getArtifactStorageBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java new file mode 100644 index 0000000..6dd2ded --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java @@ -0,0 +1,1386 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `DeleteDeliveryPipeline`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} + */ +public final class DeleteDeliveryPipelineRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) + DeleteDeliveryPipelineRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDeliveryPipelineRequest.newBuilder() to construct. + private DeleteDeliveryPipelineRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDeliveryPipelineRequest() { + name_ = ""; + requestId_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDeliveryPipelineRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteDeliveryPipelineRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 24: + { + allowMissing_ = input.readBool(); + break; + } + case 32: + { + validateOnly_ = input.readBool(); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 48: + { + force_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.class, + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the `DeliveryPipeline` to delete. Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the `DeliveryPipeline` to delete. Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_; + /** + * + * + *
+   * Optional. If set to true, then deleting an already deleted or non-existing
+   * `DeliveryPipeline` will succeed.
+   * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set, validate the request and preview the review, but do not actually
+   * post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int FORCE_FIELD_NUMBER = 6; + private boolean force_; + /** + * + * + *
+   * Optional. If set to true, all child resources under this pipeline will also be
+   * deleted. Otherwise, the request will only work if the pipeline has
+   * no child resources.
+   * 
+ * + * bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + public static final int ETAG_FIELD_NUMBER = 5; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, etag_); + } + if (force_ != false) { + output.writeBool(6, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, etag_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, force_); + } + 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.deploy.v1.DeleteDeliveryPipelineRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest other = + (com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (getForce() != other.getForce()) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest 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.deploy.v1.DeleteDeliveryPipelineRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest parseFrom( + 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.deploy.v1.DeleteDeliveryPipelineRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest parseFrom( + java.io.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.deploy.v1.DeleteDeliveryPipelineRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest parseDelimitedFrom( + java.io.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.deploy.v1.DeleteDeliveryPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.DeleteDeliveryPipelineRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `DeleteDeliveryPipeline`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeleteDeliveryPipelineRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.class, + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + requestId_ = ""; + + allowMissing_ = false; + + validateOnly_ = false; + + force_ = false; + + etag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest build() { + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest buildPartial() { + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest result = + new com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest(this); + result.name_ = name_; + result.requestId_ = requestId_; + result.allowMissing_ = allowMissing_; + result.validateOnly_ = validateOnly_; + result.force_ = force_; + result.etag_ = etag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) { + return mergeFrom((com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest other) { + if (other == com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the `DeliveryPipeline` to delete. Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the `DeliveryPipeline` to delete. Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the `DeliveryPipeline` to delete. Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the `DeliveryPipeline` to delete. Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the `DeliveryPipeline` to delete. Format should be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * Optional. If set to true, then deleting an already deleted or non-existing
+     * `DeliveryPipeline` will succeed.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * Optional. If set to true, then deleting an already deleted or non-existing
+     * `DeliveryPipeline` will succeed.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, then deleting an already deleted or non-existing
+     * `DeliveryPipeline` will succeed.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set, validate the request and preview the review, but do not actually
+     * post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set, validate the request and preview the review, but do not actually
+     * post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, validate the request and preview the review, but do not actually
+     * post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * Optional. If set to true, all child resources under this pipeline will also be
+     * deleted. Otherwise, the request will only work if the pipeline has
+     * no child resources.
+     * 
+ * + * bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Optional. If set to true, all child resources under this pipeline will also be
+     * deleted. Otherwise, the request will only work if the pipeline has
+     * no child resources.
+     * 
+ * + * bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, all child resources under this pipeline will also be
+     * deleted. Otherwise, the request will only work if the pipeline has
+     * no child resources.
+     * 
+ * + * bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) + private static final com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest(); + } + + public static com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDeliveryPipelineRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDeliveryPipelineRequest(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.deploy.v1.DeleteDeliveryPipelineRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequestOrBuilder.java new file mode 100644 index 0000000..5333dbd --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequestOrBuilder.java @@ -0,0 +1,173 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface DeleteDeliveryPipelineRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the `DeliveryPipeline` to delete. Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the `DeliveryPipeline` to delete. Format should be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, then deleting an already deleted or non-existing
+   * `DeliveryPipeline` will succeed.
+   * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the review, but do not actually
+   * post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. If set to true, all child resources under this pipeline will also be
+   * deleted. Otherwise, the request will only work if the pipeline has
+   * no child resources.
+   * 
+ * + * bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java new file mode 100644 index 0000000..24d64da --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java @@ -0,0 +1,1285 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `DeleteTarget`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeleteTargetRequest} + */ +public final class DeleteTargetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.DeleteTargetRequest) + DeleteTargetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTargetRequest.newBuilder() to construct. + private DeleteTargetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteTargetRequest() { + name_ = ""; + requestId_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteTargetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteTargetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 24: + { + allowMissing_ = input.readBool(); + break; + } + case 32: + { + validateOnly_ = input.readBool(); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteTargetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeleteTargetRequest.class, + com.google.cloud.deploy.v1.DeleteTargetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the `Target` to delete. Format should be
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the `Target` to delete. Format should be
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_; + /** + * + * + *
+   * Optional. If set to true, then deleting an already deleted or non-existing
+   * DeliveryPipeline will succeed.
+   * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set, validate the request and preview the review, but do not actually
+   * post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ETAG_FIELD_NUMBER = 5; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, etag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, etag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.DeleteTargetRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.DeleteTargetRequest other = + (com.google.cloud.deploy.v1.DeleteTargetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.DeleteTargetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeleteTargetRequest 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.deploy.v1.DeleteTargetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeleteTargetRequest parseFrom( + 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.deploy.v1.DeleteTargetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeleteTargetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.DeleteTargetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeleteTargetRequest parseFrom( + java.io.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.deploy.v1.DeleteTargetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeleteTargetRequest parseDelimitedFrom( + java.io.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.deploy.v1.DeleteTargetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeleteTargetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.DeleteTargetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `DeleteTarget`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeleteTargetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.DeleteTargetRequest) + com.google.cloud.deploy.v1.DeleteTargetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteTargetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeleteTargetRequest.class, + com.google.cloud.deploy.v1.DeleteTargetRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.DeleteTargetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + requestId_ = ""; + + allowMissing_ = false; + + validateOnly_ = false; + + etag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeleteTargetRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.DeleteTargetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeleteTargetRequest build() { + com.google.cloud.deploy.v1.DeleteTargetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeleteTargetRequest buildPartial() { + com.google.cloud.deploy.v1.DeleteTargetRequest result = + new com.google.cloud.deploy.v1.DeleteTargetRequest(this); + result.name_ = name_; + result.requestId_ = requestId_; + result.allowMissing_ = allowMissing_; + result.validateOnly_ = validateOnly_; + result.etag_ = etag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.DeleteTargetRequest) { + return mergeFrom((com.google.cloud.deploy.v1.DeleteTargetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.DeleteTargetRequest other) { + if (other == com.google.cloud.deploy.v1.DeleteTargetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.DeleteTargetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.DeleteTargetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the `Target` to delete. Format should be
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the `Target` to delete. Format should be
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the `Target` to delete. Format should be
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the `Target` to delete. Format should be
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the `Target` to delete. Format should be
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * Optional. If set to true, then deleting an already deleted or non-existing
+     * DeliveryPipeline will succeed.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * Optional. If set to true, then deleting an already deleted or non-existing
+     * DeliveryPipeline will succeed.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, then deleting an already deleted or non-existing
+     * DeliveryPipeline will succeed.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set, validate the request and preview the review, but do not actually
+     * post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set, validate the request and preview the review, but do not actually
+     * post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, validate the request and preview the review, but do not actually
+     * post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.DeleteTargetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.DeleteTargetRequest) + private static final com.google.cloud.deploy.v1.DeleteTargetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.DeleteTargetRequest(); + } + + public static com.google.cloud.deploy.v1.DeleteTargetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTargetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteTargetRequest(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.deploy.v1.DeleteTargetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequestOrBuilder.java new file mode 100644 index 0000000..971b3a6 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequestOrBuilder.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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface DeleteTargetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.DeleteTargetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the `Target` to delete. Format should be
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the `Target` to delete. Format should be
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, then deleting an already deleted or non-existing
+   * DeliveryPipeline will succeed.
+   * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the review, but do not actually
+   * post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java new file mode 100644 index 0000000..fe3f48f --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java @@ -0,0 +1,3189 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * A `DeliveryPipeline` resource in the Google Cloud Deploy API.
+ * A `DeliveryPipeline` defines a pipeline through which a Skaffold
+ * configuration can progress.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeliveryPipeline} + */ +public final class DeliveryPipeline extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.DeliveryPipeline) + DeliveryPipelineOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeliveryPipeline.newBuilder() to construct. + private DeliveryPipeline(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeliveryPipeline() { + name_ = ""; + uid_ = ""; + description_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeliveryPipeline(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeliveryPipeline( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uid_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotations_ = + com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 50: + { + 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 58: + { + 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 66: + { + com.google.cloud.deploy.v1.SerialPipeline.Builder subBuilder = null; + if (pipelineCase_ == 8) { + subBuilder = ((com.google.cloud.deploy.v1.SerialPipeline) pipeline_).toBuilder(); + } + pipeline_ = + input.readMessage( + com.google.cloud.deploy.v1.SerialPipeline.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.deploy.v1.SerialPipeline) pipeline_); + pipeline_ = subBuilder.buildPartial(); + } + pipelineCase_ = 8; + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 90: + { + com.google.cloud.deploy.v1.PipelineCondition.Builder subBuilder = null; + if (condition_ != null) { + subBuilder = condition_.toBuilder(); + } + condition_ = + input.readMessage( + com.google.cloud.deploy.v1.PipelineCondition.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(condition_); + condition_ = 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeliveryPipeline_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetAnnotations(); + case 5: + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeliveryPipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeliveryPipeline.class, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder.class); + } + + private int pipelineCase_ = 0; + private java.lang.Object pipeline_; + + public enum PipelineCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SERIAL_PIPELINE(8), + PIPELINE_NOT_SET(0); + private final int value; + + private PipelineCase(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 PipelineCase valueOf(int value) { + return forNumber(value); + } + + public static PipelineCase forNumber(int value) { + switch (value) { + case 8: + return SERIAL_PIPELINE; + case 0: + return PIPELINE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PipelineCase getPipelineCase() { + return PipelineCase.forNumber(pipelineCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+   * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 UID_FIELD_NUMBER = 2; + private volatile java.lang.Object uid_; + /** + * + * + *
+   * Output only. Unique identifier of the `DeliveryPipeline`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Unique identifier of the `DeliveryPipeline`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Description of the `DeliveryPipeline`. Max length is 255 characters.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Description of the `DeliveryPipeline`. Max length is 255 characters.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 4; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeliveryPipeline_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeliveryPipeline_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @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 CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time at which the pipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the pipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time at which the pipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.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 = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Most recent time at which the pipeline was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Most recent time at which the pipeline was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.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. Most recent time at which the pipeline was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int SERIAL_PIPELINE_FIELD_NUMBER = 8; + /** + * + * + *
+   * SerialPipeline defines a sequential set of stages for a
+   * `DeliveryPipeline`.
+   * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + * + * @return Whether the serialPipeline field is set. + */ + @java.lang.Override + public boolean hasSerialPipeline() { + return pipelineCase_ == 8; + } + /** + * + * + *
+   * SerialPipeline defines a sequential set of stages for a
+   * `DeliveryPipeline`.
+   * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + * + * @return The serialPipeline. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.SerialPipeline getSerialPipeline() { + if (pipelineCase_ == 8) { + return (com.google.cloud.deploy.v1.SerialPipeline) pipeline_; + } + return com.google.cloud.deploy.v1.SerialPipeline.getDefaultInstance(); + } + /** + * + * + *
+   * SerialPipeline defines a sequential set of stages for a
+   * `DeliveryPipeline`.
+   * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.SerialPipelineOrBuilder getSerialPipelineOrBuilder() { + if (pipelineCase_ == 8) { + return (com.google.cloud.deploy.v1.SerialPipeline) pipeline_; + } + return com.google.cloud.deploy.v1.SerialPipeline.getDefaultInstance(); + } + + public static final int CONDITION_FIELD_NUMBER = 11; + private com.google.cloud.deploy.v1.PipelineCondition condition_; + /** + * + * + *
+   * Output only. Information around the state of the Delivery Pipeline.
+   * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return condition_ != null; + } + /** + * + * + *
+   * Output only. Information around the state of the Delivery Pipeline.
+   * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PipelineCondition getCondition() { + return condition_ == null + ? com.google.cloud.deploy.v1.PipelineCondition.getDefaultInstance() + : condition_; + } + /** + * + * + *
+   * Output only. Information around the state of the Delivery Pipeline.
+   * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PipelineConditionOrBuilder getConditionOrBuilder() { + return getCondition(); + } + + public static final int ETAG_FIELD_NUMBER = 10; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getUidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 4); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(7, getUpdateTime()); + } + if (pipelineCase_ == 8) { + output.writeMessage(8, (com.google.cloud.deploy.v1.SerialPipeline) pipeline_); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, etag_); + } + if (condition_ != null) { + output.writeMessage(11, getCondition()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getUidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, annotations__); + } + 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(5, labels__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (pipelineCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.deploy.v1.SerialPipeline) pipeline_); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, etag_); + } + if (condition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCondition()); + } + 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.deploy.v1.DeliveryPipeline)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.DeliveryPipeline other = + (com.google.cloud.deploy.v1.DeliveryPipeline) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) 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 (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition().equals(other.getCondition())) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (!getPipelineCase().equals(other.getPipelineCase())) return false; + switch (pipelineCase_) { + case 8: + if (!getSerialPipeline().equals(other.getSerialPipeline())) 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) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().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 (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + switch (pipelineCase_) { + case 8: + hash = (37 * hash) + SERIAL_PIPELINE_FIELD_NUMBER; + hash = (53 * hash) + getSerialPipeline().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.DeliveryPipeline parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeliveryPipeline 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.deploy.v1.DeliveryPipeline parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeliveryPipeline parseFrom( + 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.deploy.v1.DeliveryPipeline parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeliveryPipeline parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.DeliveryPipeline parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeliveryPipeline parseFrom( + java.io.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.deploy.v1.DeliveryPipeline parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeliveryPipeline parseDelimitedFrom( + java.io.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.deploy.v1.DeliveryPipeline parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeliveryPipeline parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.DeliveryPipeline prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 `DeliveryPipeline` resource in the Google Cloud Deploy API.
+   * A `DeliveryPipeline` defines a pipeline through which a Skaffold
+   * configuration can progress.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeliveryPipeline} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.DeliveryPipeline) + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeliveryPipeline_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetAnnotations(); + case 5: + 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 internalGetMutableAnnotations(); + case 5: + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeliveryPipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeliveryPipeline.class, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.DeliveryPipeline.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_ = ""; + + uid_ = ""; + + description_ = ""; + + internalGetMutableAnnotations().clear(); + internalGetMutableLabels().clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (conditionBuilder_ == null) { + condition_ = null; + } else { + condition_ = null; + conditionBuilder_ = null; + } + etag_ = ""; + + pipelineCase_ = 0; + pipeline_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeliveryPipeline_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeliveryPipeline getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeliveryPipeline build() { + com.google.cloud.deploy.v1.DeliveryPipeline result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeliveryPipeline buildPartial() { + com.google.cloud.deploy.v1.DeliveryPipeline result = + new com.google.cloud.deploy.v1.DeliveryPipeline(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.uid_ = uid_; + result.description_ = description_; + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (pipelineCase_ == 8) { + if (serialPipelineBuilder_ == null) { + result.pipeline_ = pipeline_; + } else { + result.pipeline_ = serialPipelineBuilder_.build(); + } + } + if (conditionBuilder_ == null) { + result.condition_ = condition_; + } else { + result.condition_ = conditionBuilder_.build(); + } + result.etag_ = etag_; + result.pipelineCase_ = pipelineCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.DeliveryPipeline) { + return mergeFrom((com.google.cloud.deploy.v1.DeliveryPipeline) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.DeliveryPipeline other) { + if (other == com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + switch (other.getPipelineCase()) { + case SERIAL_PIPELINE: + { + mergeSerialPipeline(other.getSerialPipeline()); + break; + } + case PIPELINE_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.deploy.v1.DeliveryPipeline parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.DeliveryPipeline) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int pipelineCase_ = 0; + private java.lang.Object pipeline_; + + public PipelineCase getPipelineCase() { + return PipelineCase.forNumber(pipelineCase_); + } + + public Builder clearPipeline() { + pipelineCase_ = 0; + pipeline_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 uid_ = ""; + /** + * + * + *
+     * Output only. Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Description of the `DeliveryPipeline`. Max length is 255 characters.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Description of the `DeliveryPipeline`. Max length is 255 characters.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Description of the `DeliveryPipeline`. Max length is 255 characters.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the `DeliveryPipeline`. Max length is 255 characters.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the `DeliveryPipeline`. Max length is 255 characters.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged(); + ; + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the pipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the pipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the pipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the pipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the pipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the pipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the pipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the pipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the pipeline was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_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> + 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. Most recent time at which the pipeline was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Most recent time at which the pipeline was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.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. Most recent time at which the pipeline was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.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. Most recent time at which the pipeline was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.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. Most recent time at which the pipeline was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.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. Most recent time at which the pipeline was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Most recent time at which the pipeline was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Most recent time at which the pipeline was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.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. Most recent time at which the pipeline was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_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> + 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.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.SerialPipeline, + com.google.cloud.deploy.v1.SerialPipeline.Builder, + com.google.cloud.deploy.v1.SerialPipelineOrBuilder> + serialPipelineBuilder_; + /** + * + * + *
+     * SerialPipeline defines a sequential set of stages for a
+     * `DeliveryPipeline`.
+     * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + * + * @return Whether the serialPipeline field is set. + */ + @java.lang.Override + public boolean hasSerialPipeline() { + return pipelineCase_ == 8; + } + /** + * + * + *
+     * SerialPipeline defines a sequential set of stages for a
+     * `DeliveryPipeline`.
+     * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + * + * @return The serialPipeline. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.SerialPipeline getSerialPipeline() { + if (serialPipelineBuilder_ == null) { + if (pipelineCase_ == 8) { + return (com.google.cloud.deploy.v1.SerialPipeline) pipeline_; + } + return com.google.cloud.deploy.v1.SerialPipeline.getDefaultInstance(); + } else { + if (pipelineCase_ == 8) { + return serialPipelineBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.SerialPipeline.getDefaultInstance(); + } + } + /** + * + * + *
+     * SerialPipeline defines a sequential set of stages for a
+     * `DeliveryPipeline`.
+     * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + */ + public Builder setSerialPipeline(com.google.cloud.deploy.v1.SerialPipeline value) { + if (serialPipelineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pipeline_ = value; + onChanged(); + } else { + serialPipelineBuilder_.setMessage(value); + } + pipelineCase_ = 8; + return this; + } + /** + * + * + *
+     * SerialPipeline defines a sequential set of stages for a
+     * `DeliveryPipeline`.
+     * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + */ + public Builder setSerialPipeline( + com.google.cloud.deploy.v1.SerialPipeline.Builder builderForValue) { + if (serialPipelineBuilder_ == null) { + pipeline_ = builderForValue.build(); + onChanged(); + } else { + serialPipelineBuilder_.setMessage(builderForValue.build()); + } + pipelineCase_ = 8; + return this; + } + /** + * + * + *
+     * SerialPipeline defines a sequential set of stages for a
+     * `DeliveryPipeline`.
+     * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + */ + public Builder mergeSerialPipeline(com.google.cloud.deploy.v1.SerialPipeline value) { + if (serialPipelineBuilder_ == null) { + if (pipelineCase_ == 8 + && pipeline_ != com.google.cloud.deploy.v1.SerialPipeline.getDefaultInstance()) { + pipeline_ = + com.google.cloud.deploy.v1.SerialPipeline.newBuilder( + (com.google.cloud.deploy.v1.SerialPipeline) pipeline_) + .mergeFrom(value) + .buildPartial(); + } else { + pipeline_ = value; + } + onChanged(); + } else { + if (pipelineCase_ == 8) { + serialPipelineBuilder_.mergeFrom(value); + } + serialPipelineBuilder_.setMessage(value); + } + pipelineCase_ = 8; + return this; + } + /** + * + * + *
+     * SerialPipeline defines a sequential set of stages for a
+     * `DeliveryPipeline`.
+     * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + */ + public Builder clearSerialPipeline() { + if (serialPipelineBuilder_ == null) { + if (pipelineCase_ == 8) { + pipelineCase_ = 0; + pipeline_ = null; + onChanged(); + } + } else { + if (pipelineCase_ == 8) { + pipelineCase_ = 0; + pipeline_ = null; + } + serialPipelineBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * SerialPipeline defines a sequential set of stages for a
+     * `DeliveryPipeline`.
+     * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + */ + public com.google.cloud.deploy.v1.SerialPipeline.Builder getSerialPipelineBuilder() { + return getSerialPipelineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * SerialPipeline defines a sequential set of stages for a
+     * `DeliveryPipeline`.
+     * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.SerialPipelineOrBuilder getSerialPipelineOrBuilder() { + if ((pipelineCase_ == 8) && (serialPipelineBuilder_ != null)) { + return serialPipelineBuilder_.getMessageOrBuilder(); + } else { + if (pipelineCase_ == 8) { + return (com.google.cloud.deploy.v1.SerialPipeline) pipeline_; + } + return com.google.cloud.deploy.v1.SerialPipeline.getDefaultInstance(); + } + } + /** + * + * + *
+     * SerialPipeline defines a sequential set of stages for a
+     * `DeliveryPipeline`.
+     * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.SerialPipeline, + com.google.cloud.deploy.v1.SerialPipeline.Builder, + com.google.cloud.deploy.v1.SerialPipelineOrBuilder> + getSerialPipelineFieldBuilder() { + if (serialPipelineBuilder_ == null) { + if (!(pipelineCase_ == 8)) { + pipeline_ = com.google.cloud.deploy.v1.SerialPipeline.getDefaultInstance(); + } + serialPipelineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.SerialPipeline, + com.google.cloud.deploy.v1.SerialPipeline.Builder, + com.google.cloud.deploy.v1.SerialPipelineOrBuilder>( + (com.google.cloud.deploy.v1.SerialPipeline) pipeline_, + getParentForChildren(), + isClean()); + pipeline_ = null; + } + pipelineCase_ = 8; + onChanged(); + ; + return serialPipelineBuilder_; + } + + private com.google.cloud.deploy.v1.PipelineCondition condition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PipelineCondition, + com.google.cloud.deploy.v1.PipelineCondition.Builder, + com.google.cloud.deploy.v1.PipelineConditionOrBuilder> + conditionBuilder_; + /** + * + * + *
+     * Output only. Information around the state of the Delivery Pipeline.
+     * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return conditionBuilder_ != null || condition_ != null; + } + /** + * + * + *
+     * Output only. Information around the state of the Delivery Pipeline.
+     * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + public com.google.cloud.deploy.v1.PipelineCondition getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null + ? com.google.cloud.deploy.v1.PipelineCondition.getDefaultInstance() + : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Information around the state of the Delivery Pipeline.
+     * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCondition(com.google.cloud.deploy.v1.PipelineCondition value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + onChanged(); + } else { + conditionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Delivery Pipeline.
+     * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCondition( + com.google.cloud.deploy.v1.PipelineCondition.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + onChanged(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Delivery Pipeline.
+     * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCondition(com.google.cloud.deploy.v1.PipelineCondition value) { + if (conditionBuilder_ == null) { + if (condition_ != null) { + condition_ = + com.google.cloud.deploy.v1.PipelineCondition.newBuilder(condition_) + .mergeFrom(value) + .buildPartial(); + } else { + condition_ = value; + } + onChanged(); + } else { + conditionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Delivery Pipeline.
+     * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCondition() { + if (conditionBuilder_ == null) { + condition_ = null; + onChanged(); + } else { + condition_ = null; + conditionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Delivery Pipeline.
+     * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.PipelineCondition.Builder getConditionBuilder() { + + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Information around the state of the Delivery Pipeline.
+     * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.PipelineConditionOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null + ? com.google.cloud.deploy.v1.PipelineCondition.getDefaultInstance() + : condition_; + } + } + /** + * + * + *
+     * Output only. Information around the state of the Delivery Pipeline.
+     * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PipelineCondition, + com.google.cloud.deploy.v1.PipelineCondition.Builder, + com.google.cloud.deploy.v1.PipelineConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PipelineCondition, + com.google.cloud.deploy.v1.PipelineCondition.Builder, + com.google.cloud.deploy.v1.PipelineConditionOrBuilder>( + getCondition(), getParentForChildren(), isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.DeliveryPipeline) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.DeliveryPipeline) + private static final com.google.cloud.deploy.v1.DeliveryPipeline DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.DeliveryPipeline(); + } + + public static com.google.cloud.deploy.v1.DeliveryPipeline getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeliveryPipeline parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeliveryPipeline(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.deploy.v1.DeliveryPipeline getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineName.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineName.java new file mode 100644 index 0000000..e7a9236 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineName.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.deploy.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 DeliveryPipelineName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DELIVERY_PIPELINE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String deliveryPipeline; + + @Deprecated + protected DeliveryPipelineName() { + project = null; + location = null; + deliveryPipeline = null; + } + + private DeliveryPipelineName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + deliveryPipeline = Preconditions.checkNotNull(builder.getDeliveryPipeline()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DeliveryPipelineName of(String project, String location, String deliveryPipeline) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .build(); + } + + public static String format(String project, String location, String deliveryPipeline) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .build() + .toString(); + } + + public static DeliveryPipelineName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DELIVERY_PIPELINE.validatedMatch( + formattedString, "DeliveryPipelineName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("delivery_pipeline")); + } + + 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 (DeliveryPipelineName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DELIVERY_PIPELINE.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 (deliveryPipeline != null) { + fieldMapBuilder.put("delivery_pipeline", deliveryPipeline); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DELIVERY_PIPELINE.instantiate( + "project", project, "location", location, "delivery_pipeline", deliveryPipeline); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DeliveryPipelineName that = ((DeliveryPipelineName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.deliveryPipeline, that.deliveryPipeline); + } + 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(deliveryPipeline); + return h; + } + + /** Builder for projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}. */ + public static class Builder { + private String project; + private String location; + private String deliveryPipeline; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDeliveryPipeline(String deliveryPipeline) { + this.deliveryPipeline = deliveryPipeline; + return this; + } + + private Builder(DeliveryPipelineName deliveryPipelineName) { + this.project = deliveryPipelineName.project; + this.location = deliveryPipelineName.location; + this.deliveryPipeline = deliveryPipelineName.deliveryPipeline; + } + + public DeliveryPipelineName build() { + return new DeliveryPipelineName(this); + } + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java new file mode 100644 index 0000000..0dc6289 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java @@ -0,0 +1,436 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface DeliveryPipelineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.DeliveryPipeline) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Unique identifier of the `DeliveryPipeline`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. Unique identifier of the `DeliveryPipeline`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Description of the `DeliveryPipeline`. Max length is 255 characters.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Description of the `DeliveryPipeline`. Max length is 255 characters.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + int getAnnotationsCount(); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + java.lang.String getAnnotationsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Time at which the pipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time at which the pipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time at which the pipeline was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Most recent time at which the pipeline was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Most recent time at which the pipeline was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Most recent time at which the pipeline was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * SerialPipeline defines a sequential set of stages for a
+   * `DeliveryPipeline`.
+   * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + * + * @return Whether the serialPipeline field is set. + */ + boolean hasSerialPipeline(); + /** + * + * + *
+   * SerialPipeline defines a sequential set of stages for a
+   * `DeliveryPipeline`.
+   * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + * + * @return The serialPipeline. + */ + com.google.cloud.deploy.v1.SerialPipeline getSerialPipeline(); + /** + * + * + *
+   * SerialPipeline defines a sequential set of stages for a
+   * `DeliveryPipeline`.
+   * 
+ * + * .google.cloud.deploy.v1.SerialPipeline serial_pipeline = 8; + */ + com.google.cloud.deploy.v1.SerialPipelineOrBuilder getSerialPipelineOrBuilder(); + + /** + * + * + *
+   * Output only. Information around the state of the Delivery Pipeline.
+   * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + boolean hasCondition(); + /** + * + * + *
+   * Output only. Information around the state of the Delivery Pipeline.
+   * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + com.google.cloud.deploy.v1.PipelineCondition getCondition(); + /** + * + * + *
+   * Output only. Information around the state of the Delivery Pipeline.
+   * 
+ * + * + * .google.cloud.deploy.v1.PipelineCondition condition = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.PipelineConditionOrBuilder getConditionOrBuilder(); + + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + public com.google.cloud.deploy.v1.DeliveryPipeline.PipelineCase getPipelineCase(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfig.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfig.java new file mode 100644 index 0000000..cffe83b --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfig.java @@ -0,0 +1,1791 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Configuration of the environment to use when calling Skaffold.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ExecutionConfig} + */ +public final class ExecutionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ExecutionConfig) + ExecutionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecutionConfig.newBuilder() to construct. + private ExecutionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecutionConfig() { + usages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecutionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExecutionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + usages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + usages_.add(rawValue); + break; + } + case 10: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + usages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + usages_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 18: + { + com.google.cloud.deploy.v1.DefaultPool.Builder subBuilder = null; + if (executionEnvironmentCase_ == 2) { + subBuilder = + ((com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_).toBuilder(); + } + executionEnvironment_ = + input.readMessage( + com.google.cloud.deploy.v1.DefaultPool.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_); + executionEnvironment_ = subBuilder.buildPartial(); + } + executionEnvironmentCase_ = 2; + break; + } + case 26: + { + com.google.cloud.deploy.v1.PrivatePool.Builder subBuilder = null; + if (executionEnvironmentCase_ == 3) { + subBuilder = + ((com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_).toBuilder(); + } + executionEnvironment_ = + input.readMessage( + com.google.cloud.deploy.v1.PrivatePool.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_); + executionEnvironment_ = subBuilder.buildPartial(); + } + executionEnvironmentCase_ = 3; + 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)) { + usages_ = java.util.Collections.unmodifiableList(usages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ExecutionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ExecutionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ExecutionConfig.class, + com.google.cloud.deploy.v1.ExecutionConfig.Builder.class); + } + + /** + * + * + *
+   * Possible usages of this configuration.
+   * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage} + */ + public enum ExecutionEnvironmentUsage implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0; + */ + EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED(0), + /** + * + * + *
+     * Use for rendering.
+     * 
+ * + * RENDER = 1; + */ + RENDER(1), + /** + * + * + *
+     * Use for deploying and deployment hooks.
+     * 
+ * + * DEPLOY = 2; + */ + DEPLOY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0; + */ + public static final int EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Use for rendering.
+     * 
+ * + * RENDER = 1; + */ + public static final int RENDER_VALUE = 1; + /** + * + * + *
+     * Use for deploying and deployment hooks.
+     * 
+ * + * DEPLOY = 2; + */ + public static final int DEPLOY_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 ExecutionEnvironmentUsage 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 ExecutionEnvironmentUsage forNumber(int value) { + switch (value) { + case 0: + return EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED; + case 1: + return RENDER; + case 2: + return DEPLOY; + 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 ExecutionEnvironmentUsage findValueByNumber(int number) { + return ExecutionEnvironmentUsage.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.deploy.v1.ExecutionConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final ExecutionEnvironmentUsage[] VALUES = values(); + + public static ExecutionEnvironmentUsage 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 ExecutionEnvironmentUsage(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage) + } + + private int executionEnvironmentCase_ = 0; + private java.lang.Object executionEnvironment_; + + public enum ExecutionEnvironmentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DEFAULT_POOL(2), + PRIVATE_POOL(3), + EXECUTIONENVIRONMENT_NOT_SET(0); + private final int value; + + private ExecutionEnvironmentCase(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 ExecutionEnvironmentCase valueOf(int value) { + return forNumber(value); + } + + public static ExecutionEnvironmentCase forNumber(int value) { + switch (value) { + case 2: + return DEFAULT_POOL; + case 3: + return PRIVATE_POOL; + case 0: + return EXECUTIONENVIRONMENT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ExecutionEnvironmentCase getExecutionEnvironmentCase() { + return ExecutionEnvironmentCase.forNumber(executionEnvironmentCase_); + } + + public static final int USAGES_FIELD_NUMBER = 1; + private java.util.List usages_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage> + usages_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage>() { + public com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage result = + com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage.valueOf( + from); + return result == null + ? com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage + .UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Required. Usages when this configuration should be applied.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the usages. + */ + @java.lang.Override + public java.util.List + getUsagesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage>( + usages_, usages_converter_); + } + /** + * + * + *
+   * Required. Usages when this configuration should be applied.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of usages. + */ + @java.lang.Override + public int getUsagesCount() { + return usages_.size(); + } + /** + * + * + *
+   * Required. Usages when this configuration should be applied.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The usages at the given index. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage getUsages(int index) { + return usages_converter_.convert(usages_.get(index)); + } + /** + * + * + *
+   * Required. Usages when this configuration should be applied.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for usages. + */ + @java.lang.Override + public java.util.List getUsagesValueList() { + return usages_; + } + /** + * + * + *
+   * Required. Usages when this configuration should be applied.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of usages at the given index. + */ + @java.lang.Override + public int getUsagesValue(int index) { + return usages_.get(index); + } + + private int usagesMemoizedSerializedSize; + + public static final int DEFAULT_POOL_FIELD_NUMBER = 2; + /** + * + * + *
+   * Optional. Use default Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the defaultPool field is set. + */ + @java.lang.Override + public boolean hasDefaultPool() { + return executionEnvironmentCase_ == 2; + } + /** + * + * + *
+   * Optional. Use default Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultPool. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DefaultPool getDefaultPool() { + if (executionEnvironmentCase_ == 2) { + return (com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_; + } + return com.google.cloud.deploy.v1.DefaultPool.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Use default Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DefaultPoolOrBuilder getDefaultPoolOrBuilder() { + if (executionEnvironmentCase_ == 2) { + return (com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_; + } + return com.google.cloud.deploy.v1.DefaultPool.getDefaultInstance(); + } + + public static final int PRIVATE_POOL_FIELD_NUMBER = 3; + /** + * + * + *
+   * Optional. Use private Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privatePool field is set. + */ + @java.lang.Override + public boolean hasPrivatePool() { + return executionEnvironmentCase_ == 3; + } + /** + * + * + *
+   * Optional. Use private Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privatePool. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PrivatePool getPrivatePool() { + if (executionEnvironmentCase_ == 3) { + return (com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_; + } + return com.google.cloud.deploy.v1.PrivatePool.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Use private Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PrivatePoolOrBuilder getPrivatePoolOrBuilder() { + if (executionEnvironmentCase_ == 3) { + return (com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_; + } + return com.google.cloud.deploy.v1.PrivatePool.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (getUsagesList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(usagesMemoizedSerializedSize); + } + for (int i = 0; i < usages_.size(); i++) { + output.writeEnumNoTag(usages_.get(i)); + } + if (executionEnvironmentCase_ == 2) { + output.writeMessage(2, (com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_); + } + if (executionEnvironmentCase_ == 3) { + output.writeMessage(3, (com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_); + } + 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 < usages_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(usages_.get(i)); + } + size += dataSize; + if (!getUsagesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + usagesMemoizedSerializedSize = dataSize; + } + if (executionEnvironmentCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_); + } + if (executionEnvironmentCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_); + } + 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.deploy.v1.ExecutionConfig)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ExecutionConfig other = + (com.google.cloud.deploy.v1.ExecutionConfig) obj; + + if (!usages_.equals(other.usages_)) return false; + if (!getExecutionEnvironmentCase().equals(other.getExecutionEnvironmentCase())) return false; + switch (executionEnvironmentCase_) { + case 2: + if (!getDefaultPool().equals(other.getDefaultPool())) return false; + break; + case 3: + if (!getPrivatePool().equals(other.getPrivatePool())) 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 (getUsagesCount() > 0) { + hash = (37 * hash) + USAGES_FIELD_NUMBER; + hash = (53 * hash) + usages_.hashCode(); + } + switch (executionEnvironmentCase_) { + case 2: + hash = (37 * hash) + DEFAULT_POOL_FIELD_NUMBER; + hash = (53 * hash) + getDefaultPool().hashCode(); + break; + case 3: + hash = (37 * hash) + PRIVATE_POOL_FIELD_NUMBER; + hash = (53 * hash) + getPrivatePool().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.ExecutionConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ExecutionConfig 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.deploy.v1.ExecutionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ExecutionConfig parseFrom( + 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.deploy.v1.ExecutionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ExecutionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ExecutionConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ExecutionConfig parseFrom( + java.io.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.deploy.v1.ExecutionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ExecutionConfig parseDelimitedFrom( + java.io.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.deploy.v1.ExecutionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ExecutionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.ExecutionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 of the environment to use when calling Skaffold.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ExecutionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ExecutionConfig) + com.google.cloud.deploy.v1.ExecutionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ExecutionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ExecutionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ExecutionConfig.class, + com.google.cloud.deploy.v1.ExecutionConfig.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ExecutionConfig.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(); + usages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + executionEnvironmentCase_ = 0; + executionEnvironment_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ExecutionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ExecutionConfig getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ExecutionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ExecutionConfig build() { + com.google.cloud.deploy.v1.ExecutionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ExecutionConfig buildPartial() { + com.google.cloud.deploy.v1.ExecutionConfig result = + new com.google.cloud.deploy.v1.ExecutionConfig(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + usages_ = java.util.Collections.unmodifiableList(usages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.usages_ = usages_; + if (executionEnvironmentCase_ == 2) { + if (defaultPoolBuilder_ == null) { + result.executionEnvironment_ = executionEnvironment_; + } else { + result.executionEnvironment_ = defaultPoolBuilder_.build(); + } + } + if (executionEnvironmentCase_ == 3) { + if (privatePoolBuilder_ == null) { + result.executionEnvironment_ = executionEnvironment_; + } else { + result.executionEnvironment_ = privatePoolBuilder_.build(); + } + } + result.executionEnvironmentCase_ = executionEnvironmentCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.ExecutionConfig) { + return mergeFrom((com.google.cloud.deploy.v1.ExecutionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ExecutionConfig other) { + if (other == com.google.cloud.deploy.v1.ExecutionConfig.getDefaultInstance()) return this; + if (!other.usages_.isEmpty()) { + if (usages_.isEmpty()) { + usages_ = other.usages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUsagesIsMutable(); + usages_.addAll(other.usages_); + } + onChanged(); + } + switch (other.getExecutionEnvironmentCase()) { + case DEFAULT_POOL: + { + mergeDefaultPool(other.getDefaultPool()); + break; + } + case PRIVATE_POOL: + { + mergePrivatePool(other.getPrivatePool()); + break; + } + case EXECUTIONENVIRONMENT_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.deploy.v1.ExecutionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.ExecutionConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int executionEnvironmentCase_ = 0; + private java.lang.Object executionEnvironment_; + + public ExecutionEnvironmentCase getExecutionEnvironmentCase() { + return ExecutionEnvironmentCase.forNumber(executionEnvironmentCase_); + } + + public Builder clearExecutionEnvironment() { + executionEnvironmentCase_ = 0; + executionEnvironment_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.util.List usages_ = java.util.Collections.emptyList(); + + private void ensureUsagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + usages_ = new java.util.ArrayList(usages_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the usages. + */ + public java.util.List + getUsagesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage>( + usages_, usages_converter_); + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of usages. + */ + public int getUsagesCount() { + return usages_.size(); + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The usages at the given index. + */ + public com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage getUsages( + int index) { + return usages_converter_.convert(usages_.get(index)); + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The usages to set. + * @return This builder for chaining. + */ + public Builder setUsages( + int index, com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsagesIsMutable(); + usages_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The usages to add. + * @return This builder for chaining. + */ + public Builder addUsages( + com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsagesIsMutable(); + usages_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The usages to add. + * @return This builder for chaining. + */ + public Builder addAllUsages( + java.lang.Iterable< + ? extends com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage> + values) { + ensureUsagesIsMutable(); + for (com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage value : values) { + usages_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearUsages() { + usages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for usages. + */ + public java.util.List getUsagesValueList() { + return java.util.Collections.unmodifiableList(usages_); + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of usages at the given index. + */ + public int getUsagesValue(int index) { + return usages_.get(index); + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of usages at the given index. + * @return This builder for chaining. + */ + public Builder setUsagesValue(int index, int value) { + ensureUsagesIsMutable(); + usages_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for usages to add. + * @return This builder for chaining. + */ + public Builder addUsagesValue(int value) { + ensureUsagesIsMutable(); + usages_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Usages when this configuration should be applied.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The enum numeric values on the wire for usages to add. + * @return This builder for chaining. + */ + public Builder addAllUsagesValue(java.lang.Iterable values) { + ensureUsagesIsMutable(); + for (int value : values) { + usages_.add(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DefaultPool, + com.google.cloud.deploy.v1.DefaultPool.Builder, + com.google.cloud.deploy.v1.DefaultPoolOrBuilder> + defaultPoolBuilder_; + /** + * + * + *
+     * Optional. Use default Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the defaultPool field is set. + */ + @java.lang.Override + public boolean hasDefaultPool() { + return executionEnvironmentCase_ == 2; + } + /** + * + * + *
+     * Optional. Use default Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultPool. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DefaultPool getDefaultPool() { + if (defaultPoolBuilder_ == null) { + if (executionEnvironmentCase_ == 2) { + return (com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_; + } + return com.google.cloud.deploy.v1.DefaultPool.getDefaultInstance(); + } else { + if (executionEnvironmentCase_ == 2) { + return defaultPoolBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.DefaultPool.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Use default Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDefaultPool(com.google.cloud.deploy.v1.DefaultPool value) { + if (defaultPoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionEnvironment_ = value; + onChanged(); + } else { + defaultPoolBuilder_.setMessage(value); + } + executionEnvironmentCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. Use default Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDefaultPool(com.google.cloud.deploy.v1.DefaultPool.Builder builderForValue) { + if (defaultPoolBuilder_ == null) { + executionEnvironment_ = builderForValue.build(); + onChanged(); + } else { + defaultPoolBuilder_.setMessage(builderForValue.build()); + } + executionEnvironmentCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. Use default Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDefaultPool(com.google.cloud.deploy.v1.DefaultPool value) { + if (defaultPoolBuilder_ == null) { + if (executionEnvironmentCase_ == 2 + && executionEnvironment_ + != com.google.cloud.deploy.v1.DefaultPool.getDefaultInstance()) { + executionEnvironment_ = + com.google.cloud.deploy.v1.DefaultPool.newBuilder( + (com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_) + .mergeFrom(value) + .buildPartial(); + } else { + executionEnvironment_ = value; + } + onChanged(); + } else { + if (executionEnvironmentCase_ == 2) { + defaultPoolBuilder_.mergeFrom(value); + } + defaultPoolBuilder_.setMessage(value); + } + executionEnvironmentCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. Use default Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDefaultPool() { + if (defaultPoolBuilder_ == null) { + if (executionEnvironmentCase_ == 2) { + executionEnvironmentCase_ = 0; + executionEnvironment_ = null; + onChanged(); + } + } else { + if (executionEnvironmentCase_ == 2) { + executionEnvironmentCase_ = 0; + executionEnvironment_ = null; + } + defaultPoolBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Use default Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.DefaultPool.Builder getDefaultPoolBuilder() { + return getDefaultPoolFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Use default Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DefaultPoolOrBuilder getDefaultPoolOrBuilder() { + if ((executionEnvironmentCase_ == 2) && (defaultPoolBuilder_ != null)) { + return defaultPoolBuilder_.getMessageOrBuilder(); + } else { + if (executionEnvironmentCase_ == 2) { + return (com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_; + } + return com.google.cloud.deploy.v1.DefaultPool.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Use default Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DefaultPool, + com.google.cloud.deploy.v1.DefaultPool.Builder, + com.google.cloud.deploy.v1.DefaultPoolOrBuilder> + getDefaultPoolFieldBuilder() { + if (defaultPoolBuilder_ == null) { + if (!(executionEnvironmentCase_ == 2)) { + executionEnvironment_ = com.google.cloud.deploy.v1.DefaultPool.getDefaultInstance(); + } + defaultPoolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DefaultPool, + com.google.cloud.deploy.v1.DefaultPool.Builder, + com.google.cloud.deploy.v1.DefaultPoolOrBuilder>( + (com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_, + getParentForChildren(), + isClean()); + executionEnvironment_ = null; + } + executionEnvironmentCase_ = 2; + onChanged(); + ; + return defaultPoolBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PrivatePool, + com.google.cloud.deploy.v1.PrivatePool.Builder, + com.google.cloud.deploy.v1.PrivatePoolOrBuilder> + privatePoolBuilder_; + /** + * + * + *
+     * Optional. Use private Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privatePool field is set. + */ + @java.lang.Override + public boolean hasPrivatePool() { + return executionEnvironmentCase_ == 3; + } + /** + * + * + *
+     * Optional. Use private Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privatePool. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PrivatePool getPrivatePool() { + if (privatePoolBuilder_ == null) { + if (executionEnvironmentCase_ == 3) { + return (com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_; + } + return com.google.cloud.deploy.v1.PrivatePool.getDefaultInstance(); + } else { + if (executionEnvironmentCase_ == 3) { + return privatePoolBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.PrivatePool.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Use private Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPrivatePool(com.google.cloud.deploy.v1.PrivatePool value) { + if (privatePoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionEnvironment_ = value; + onChanged(); + } else { + privatePoolBuilder_.setMessage(value); + } + executionEnvironmentCase_ = 3; + return this; + } + /** + * + * + *
+     * Optional. Use private Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPrivatePool(com.google.cloud.deploy.v1.PrivatePool.Builder builderForValue) { + if (privatePoolBuilder_ == null) { + executionEnvironment_ = builderForValue.build(); + onChanged(); + } else { + privatePoolBuilder_.setMessage(builderForValue.build()); + } + executionEnvironmentCase_ = 3; + return this; + } + /** + * + * + *
+     * Optional. Use private Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePrivatePool(com.google.cloud.deploy.v1.PrivatePool value) { + if (privatePoolBuilder_ == null) { + if (executionEnvironmentCase_ == 3 + && executionEnvironment_ + != com.google.cloud.deploy.v1.PrivatePool.getDefaultInstance()) { + executionEnvironment_ = + com.google.cloud.deploy.v1.PrivatePool.newBuilder( + (com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_) + .mergeFrom(value) + .buildPartial(); + } else { + executionEnvironment_ = value; + } + onChanged(); + } else { + if (executionEnvironmentCase_ == 3) { + privatePoolBuilder_.mergeFrom(value); + } + privatePoolBuilder_.setMessage(value); + } + executionEnvironmentCase_ = 3; + return this; + } + /** + * + * + *
+     * Optional. Use private Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPrivatePool() { + if (privatePoolBuilder_ == null) { + if (executionEnvironmentCase_ == 3) { + executionEnvironmentCase_ = 0; + executionEnvironment_ = null; + onChanged(); + } + } else { + if (executionEnvironmentCase_ == 3) { + executionEnvironmentCase_ = 0; + executionEnvironment_ = null; + } + privatePoolBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Use private Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.PrivatePool.Builder getPrivatePoolBuilder() { + return getPrivatePoolFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Use private Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PrivatePoolOrBuilder getPrivatePoolOrBuilder() { + if ((executionEnvironmentCase_ == 3) && (privatePoolBuilder_ != null)) { + return privatePoolBuilder_.getMessageOrBuilder(); + } else { + if (executionEnvironmentCase_ == 3) { + return (com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_; + } + return com.google.cloud.deploy.v1.PrivatePool.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Use private Cloud Build pool.
+     * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PrivatePool, + com.google.cloud.deploy.v1.PrivatePool.Builder, + com.google.cloud.deploy.v1.PrivatePoolOrBuilder> + getPrivatePoolFieldBuilder() { + if (privatePoolBuilder_ == null) { + if (!(executionEnvironmentCase_ == 3)) { + executionEnvironment_ = com.google.cloud.deploy.v1.PrivatePool.getDefaultInstance(); + } + privatePoolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PrivatePool, + com.google.cloud.deploy.v1.PrivatePool.Builder, + com.google.cloud.deploy.v1.PrivatePoolOrBuilder>( + (com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_, + getParentForChildren(), + isClean()); + executionEnvironment_ = null; + } + executionEnvironmentCase_ = 3; + onChanged(); + ; + return privatePoolBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.ExecutionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ExecutionConfig) + private static final com.google.cloud.deploy.v1.ExecutionConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ExecutionConfig(); + } + + public static com.google.cloud.deploy.v1.ExecutionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecutionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecutionConfig(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.deploy.v1.ExecutionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfigOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfigOrBuilder.java new file mode 100644 index 0000000..a1c7d44 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfigOrBuilder.java @@ -0,0 +1,184 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ExecutionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ExecutionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Usages when this configuration should be applied.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the usages. + */ + java.util.List + getUsagesList(); + /** + * + * + *
+   * Required. Usages when this configuration should be applied.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of usages. + */ + int getUsagesCount(); + /** + * + * + *
+   * Required. Usages when this configuration should be applied.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The usages at the given index. + */ + com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage getUsages(int index); + /** + * + * + *
+   * Required. Usages when this configuration should be applied.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for usages. + */ + java.util.List getUsagesValueList(); + /** + * + * + *
+   * Required. Usages when this configuration should be applied.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage usages = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of usages at the given index. + */ + int getUsagesValue(int index); + + /** + * + * + *
+   * Optional. Use default Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the defaultPool field is set. + */ + boolean hasDefaultPool(); + /** + * + * + *
+   * Optional. Use default Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultPool. + */ + com.google.cloud.deploy.v1.DefaultPool getDefaultPool(); + /** + * + * + *
+   * Optional. Use default Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.DefaultPool default_pool = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.deploy.v1.DefaultPoolOrBuilder getDefaultPoolOrBuilder(); + + /** + * + * + *
+   * Optional. Use private Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privatePool field is set. + */ + boolean hasPrivatePool(); + /** + * + * + *
+   * Optional. Use private Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privatePool. + */ + com.google.cloud.deploy.v1.PrivatePool getPrivatePool(); + /** + * + * + *
+   * Optional. Use private Cloud Build pool.
+   * 
+ * + * + * .google.cloud.deploy.v1.PrivatePool private_pool = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.deploy.v1.PrivatePoolOrBuilder getPrivatePoolOrBuilder(); + + public com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentCase + getExecutionEnvironmentCase(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequest.java new file mode 100644 index 0000000..a66a018 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequest.java @@ -0,0 +1,648 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Request to get a configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetConfigRequest} + */ +public final class GetConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.GetConfigRequest) + GetConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetConfigRequest.newBuilder() to construct. + private GetConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetConfigRequest( + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetConfigRequest.class, + com.google.cloud.deploy.v1.GetConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of requested configuration.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of requested configuration.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.GetConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.GetConfigRequest other = + (com.google.cloud.deploy.v1.GetConfigRequest) 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.deploy.v1.GetConfigRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetConfigRequest 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.deploy.v1.GetConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetConfigRequest parseFrom( + 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.deploy.v1.GetConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.GetConfigRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetConfigRequest parseFrom( + java.io.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.deploy.v1.GetConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetConfigRequest parseDelimitedFrom( + java.io.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.deploy.v1.GetConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.GetConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to get a configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.GetConfigRequest) + com.google.cloud.deploy.v1.GetConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetConfigRequest.class, + com.google.cloud.deploy.v1.GetConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.GetConfigRequest.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetConfigRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.GetConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetConfigRequest build() { + com.google.cloud.deploy.v1.GetConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetConfigRequest buildPartial() { + com.google.cloud.deploy.v1.GetConfigRequest result = + new com.google.cloud.deploy.v1.GetConfigRequest(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.deploy.v1.GetConfigRequest) { + return mergeFrom((com.google.cloud.deploy.v1.GetConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.GetConfigRequest other) { + if (other == com.google.cloud.deploy.v1.GetConfigRequest.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.deploy.v1.GetConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.GetConfigRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of requested configuration.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of requested configuration.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of requested configuration.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of requested configuration.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of requested configuration.
+     * 
+ * + * + * 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.deploy.v1.GetConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.GetConfigRequest) + private static final com.google.cloud.deploy.v1.GetConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.GetConfigRequest(); + } + + public static com.google.cloud.deploy.v1.GetConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetConfigRequest(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.deploy.v1.GetConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequestOrBuilder.java new file mode 100644 index 0000000..129aa7b --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface GetConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.GetConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of requested configuration.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of requested configuration.
+   * 
+ * + * + * 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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java new file mode 100644 index 0000000..48aa227 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java @@ -0,0 +1,658 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `GetDeliveryPipeline`
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetDeliveryPipelineRequest} + */ +public final class GetDeliveryPipelineRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.GetDeliveryPipelineRequest) + GetDeliveryPipelineRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDeliveryPipelineRequest.newBuilder() to construct. + private GetDeliveryPipelineRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDeliveryPipelineRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDeliveryPipelineRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDeliveryPipelineRequest( + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest.class, + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the `DeliveryPipeline`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the `DeliveryPipeline`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.GetDeliveryPipelineRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest other = + (com.google.cloud.deploy.v1.GetDeliveryPipelineRequest) 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.deploy.v1.GetDeliveryPipelineRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetDeliveryPipelineRequest 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.deploy.v1.GetDeliveryPipelineRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetDeliveryPipelineRequest parseFrom( + 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.deploy.v1.GetDeliveryPipelineRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetDeliveryPipelineRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.GetDeliveryPipelineRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetDeliveryPipelineRequest parseFrom( + java.io.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.deploy.v1.GetDeliveryPipelineRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetDeliveryPipelineRequest parseDelimitedFrom( + java.io.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.deploy.v1.GetDeliveryPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetDeliveryPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.GetDeliveryPipelineRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `GetDeliveryPipeline`
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetDeliveryPipelineRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.GetDeliveryPipelineRequest) + com.google.cloud.deploy.v1.GetDeliveryPipelineRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest.class, + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.GetDeliveryPipelineRequest.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetDeliveryPipelineRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.GetDeliveryPipelineRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetDeliveryPipelineRequest build() { + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetDeliveryPipelineRequest buildPartial() { + com.google.cloud.deploy.v1.GetDeliveryPipelineRequest result = + new com.google.cloud.deploy.v1.GetDeliveryPipelineRequest(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.deploy.v1.GetDeliveryPipelineRequest) { + return mergeFrom((com.google.cloud.deploy.v1.GetDeliveryPipelineRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.GetDeliveryPipelineRequest other) { + if (other == com.google.cloud.deploy.v1.GetDeliveryPipelineRequest.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.deploy.v1.GetDeliveryPipelineRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.deploy.v1.GetDeliveryPipelineRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the `DeliveryPipeline`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the `DeliveryPipeline`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the `DeliveryPipeline`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `DeliveryPipeline`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `DeliveryPipeline`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * 
+ * + * + * 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.deploy.v1.GetDeliveryPipelineRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.GetDeliveryPipelineRequest) + private static final com.google.cloud.deploy.v1.GetDeliveryPipelineRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.GetDeliveryPipelineRequest(); + } + + public static com.google.cloud.deploy.v1.GetDeliveryPipelineRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDeliveryPipelineRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDeliveryPipelineRequest(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.deploy.v1.GetDeliveryPipelineRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequestOrBuilder.java new file mode 100644 index 0000000..50fd634 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequestOrBuilder.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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface GetDeliveryPipelineRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.GetDeliveryPipelineRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the `DeliveryPipeline`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the `DeliveryPipeline`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * 
+ * + * + * 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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java new file mode 100644 index 0000000..8825ff2 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java @@ -0,0 +1,655 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `GetRelease`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetReleaseRequest} + */ +public final class GetReleaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.GetReleaseRequest) + GetReleaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetReleaseRequest.newBuilder() to construct. + private GetReleaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetReleaseRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetReleaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetReleaseRequest( + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetReleaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetReleaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetReleaseRequest.class, + com.google.cloud.deploy.v1.GetReleaseRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the `Release`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the `Release`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.GetReleaseRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.GetReleaseRequest other = + (com.google.cloud.deploy.v1.GetReleaseRequest) 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.deploy.v1.GetReleaseRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetReleaseRequest 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.deploy.v1.GetReleaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetReleaseRequest parseFrom( + 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.deploy.v1.GetReleaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetReleaseRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.GetReleaseRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetReleaseRequest parseFrom( + java.io.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.deploy.v1.GetReleaseRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetReleaseRequest parseDelimitedFrom( + java.io.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.deploy.v1.GetReleaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetReleaseRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.GetReleaseRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `GetRelease`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetReleaseRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.GetReleaseRequest) + com.google.cloud.deploy.v1.GetReleaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetReleaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetReleaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetReleaseRequest.class, + com.google.cloud.deploy.v1.GetReleaseRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.GetReleaseRequest.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetReleaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetReleaseRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.GetReleaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetReleaseRequest build() { + com.google.cloud.deploy.v1.GetReleaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetReleaseRequest buildPartial() { + com.google.cloud.deploy.v1.GetReleaseRequest result = + new com.google.cloud.deploy.v1.GetReleaseRequest(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.deploy.v1.GetReleaseRequest) { + return mergeFrom((com.google.cloud.deploy.v1.GetReleaseRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.GetReleaseRequest other) { + if (other == com.google.cloud.deploy.v1.GetReleaseRequest.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.deploy.v1.GetReleaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.GetReleaseRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the `Release`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the `Release`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the `Release`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `Release`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `Release`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * 
+ * + * + * 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.deploy.v1.GetReleaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.GetReleaseRequest) + private static final com.google.cloud.deploy.v1.GetReleaseRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.GetReleaseRequest(); + } + + public static com.google.cloud.deploy.v1.GetReleaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetReleaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetReleaseRequest(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.deploy.v1.GetReleaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequestOrBuilder.java new file mode 100644 index 0000000..e6b7913 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequestOrBuilder.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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface GetReleaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.GetReleaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the `Release`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the `Release`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * 
+ * + * + * 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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java new file mode 100644 index 0000000..721c04a --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java @@ -0,0 +1,655 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * GetRolloutRequest is the request object used by `GetRollout`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetRolloutRequest} + */ +public final class GetRolloutRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.GetRolloutRequest) + GetRolloutRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRolloutRequest.newBuilder() to construct. + private GetRolloutRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetRolloutRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetRolloutRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetRolloutRequest( + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetRolloutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetRolloutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetRolloutRequest.class, + com.google.cloud.deploy.v1.GetRolloutRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the `Rollout`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the `Rollout`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.GetRolloutRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.GetRolloutRequest other = + (com.google.cloud.deploy.v1.GetRolloutRequest) 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.deploy.v1.GetRolloutRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetRolloutRequest 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.deploy.v1.GetRolloutRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetRolloutRequest parseFrom( + 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.deploy.v1.GetRolloutRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetRolloutRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.GetRolloutRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetRolloutRequest parseFrom( + java.io.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.deploy.v1.GetRolloutRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetRolloutRequest parseDelimitedFrom( + java.io.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.deploy.v1.GetRolloutRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetRolloutRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.GetRolloutRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * GetRolloutRequest is the request object used by `GetRollout`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetRolloutRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.GetRolloutRequest) + com.google.cloud.deploy.v1.GetRolloutRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetRolloutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetRolloutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetRolloutRequest.class, + com.google.cloud.deploy.v1.GetRolloutRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.GetRolloutRequest.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetRolloutRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetRolloutRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.GetRolloutRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetRolloutRequest build() { + com.google.cloud.deploy.v1.GetRolloutRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetRolloutRequest buildPartial() { + com.google.cloud.deploy.v1.GetRolloutRequest result = + new com.google.cloud.deploy.v1.GetRolloutRequest(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.deploy.v1.GetRolloutRequest) { + return mergeFrom((com.google.cloud.deploy.v1.GetRolloutRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.GetRolloutRequest other) { + if (other == com.google.cloud.deploy.v1.GetRolloutRequest.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.deploy.v1.GetRolloutRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.GetRolloutRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the `Rollout`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the `Rollout`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the `Rollout`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `Rollout`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `Rollout`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+     * 
+ * + * + * 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.deploy.v1.GetRolloutRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.GetRolloutRequest) + private static final com.google.cloud.deploy.v1.GetRolloutRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.GetRolloutRequest(); + } + + public static com.google.cloud.deploy.v1.GetRolloutRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRolloutRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetRolloutRequest(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.deploy.v1.GetRolloutRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequestOrBuilder.java new file mode 100644 index 0000000..12d4479 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequestOrBuilder.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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface GetRolloutRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.GetRolloutRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the `Rollout`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the `Rollout`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+   * 
+ * + * + * 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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java new file mode 100644 index 0000000..99dcf2f --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java @@ -0,0 +1,655 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `GetTarget`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetTargetRequest} + */ +public final class GetTargetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.GetTargetRequest) + GetTargetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTargetRequest.newBuilder() to construct. + private GetTargetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTargetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTargetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetTargetRequest( + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetTargetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetTargetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetTargetRequest.class, + com.google.cloud.deploy.v1.GetTargetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the `Target`. Format must be
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the `Target`. Format must be
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.GetTargetRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.GetTargetRequest other = + (com.google.cloud.deploy.v1.GetTargetRequest) 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.deploy.v1.GetTargetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetTargetRequest 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.deploy.v1.GetTargetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetTargetRequest parseFrom( + 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.deploy.v1.GetTargetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetTargetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.GetTargetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetTargetRequest parseFrom( + java.io.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.deploy.v1.GetTargetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetTargetRequest parseDelimitedFrom( + java.io.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.deploy.v1.GetTargetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetTargetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.GetTargetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `GetTarget`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetTargetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.GetTargetRequest) + com.google.cloud.deploy.v1.GetTargetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetTargetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetTargetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetTargetRequest.class, + com.google.cloud.deploy.v1.GetTargetRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.GetTargetRequest.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetTargetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetTargetRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.GetTargetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetTargetRequest build() { + com.google.cloud.deploy.v1.GetTargetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetTargetRequest buildPartial() { + com.google.cloud.deploy.v1.GetTargetRequest result = + new com.google.cloud.deploy.v1.GetTargetRequest(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.deploy.v1.GetTargetRequest) { + return mergeFrom((com.google.cloud.deploy.v1.GetTargetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.GetTargetRequest other) { + if (other == com.google.cloud.deploy.v1.GetTargetRequest.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.deploy.v1.GetTargetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.GetTargetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the `Target`. Format must be
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the `Target`. Format must be
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the `Target`. Format must be
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `Target`. Format must be
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `Target`. Format must be
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * + * 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.deploy.v1.GetTargetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.GetTargetRequest) + private static final com.google.cloud.deploy.v1.GetTargetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.GetTargetRequest(); + } + + public static com.google.cloud.deploy.v1.GetTargetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTargetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetTargetRequest(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.deploy.v1.GetTargetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequestOrBuilder.java new file mode 100644 index 0000000..f18ae72 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequestOrBuilder.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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface GetTargetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.GetTargetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the `Target`. Format must be
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the `Target`. Format must be
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * + * 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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java new file mode 100644 index 0000000..a06a781 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java @@ -0,0 +1,639 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Information specifying a GKE Cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GkeCluster} + */ +public final class GkeCluster extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.GkeCluster) + GkeClusterOrBuilder { + private static final long serialVersionUID = 0L; + // Use GkeCluster.newBuilder() to construct. + private GkeCluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GkeCluster() { + cluster_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GkeCluster(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GkeCluster( + 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(); + + cluster_ = 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GkeCluster_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GkeCluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GkeCluster.class, + com.google.cloud.deploy.v1.GkeCluster.Builder.class); + } + + public static final int CLUSTER_FIELD_NUMBER = 1; + private volatile java.lang.Object cluster_; + /** + * + * + *
+   * Information specifying a GKE Cluster. Format is
+   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+   * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The cluster. + */ + @java.lang.Override + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cluster_ = s; + return s; + } + } + /** + * + * + *
+   * Information specifying a GKE Cluster. Format is
+   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+   * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = 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 (!getClusterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getClusterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cluster_); + } + 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.deploy.v1.GkeCluster)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.GkeCluster other = (com.google.cloud.deploy.v1.GkeCluster) obj; + + if (!getCluster().equals(other.getCluster())) 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) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.GkeCluster parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GkeCluster 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.deploy.v1.GkeCluster parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GkeCluster parseFrom( + 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.deploy.v1.GkeCluster parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GkeCluster parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.GkeCluster parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GkeCluster parseFrom( + java.io.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.deploy.v1.GkeCluster parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GkeCluster parseDelimitedFrom( + java.io.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.deploy.v1.GkeCluster parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GkeCluster parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.GkeCluster prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 specifying a GKE Cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GkeCluster} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.GkeCluster) + com.google.cloud.deploy.v1.GkeClusterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GkeCluster_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GkeCluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GkeCluster.class, + com.google.cloud.deploy.v1.GkeCluster.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.GkeCluster.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(); + cluster_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GkeCluster_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GkeCluster getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.GkeCluster.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GkeCluster build() { + com.google.cloud.deploy.v1.GkeCluster result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GkeCluster buildPartial() { + com.google.cloud.deploy.v1.GkeCluster result = + new com.google.cloud.deploy.v1.GkeCluster(this); + result.cluster_ = cluster_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.GkeCluster) { + return mergeFrom((com.google.cloud.deploy.v1.GkeCluster) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.GkeCluster other) { + if (other == com.google.cloud.deploy.v1.GkeCluster.getDefaultInstance()) return this; + if (!other.getCluster().isEmpty()) { + cluster_ = other.cluster_; + 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.deploy.v1.GkeCluster parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.GkeCluster) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object cluster_ = ""; + /** + * + * + *
+     * Information specifying a GKE Cluster. Format is
+     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+     * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The cluster. + */ + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Information specifying a GKE Cluster. Format is
+     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+     * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cluster. + */ + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Information specifying a GKE Cluster. Format is
+     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+     * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The cluster to set. + * @return This builder for chaining. + */ + public Builder setCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cluster_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Information specifying a GKE Cluster. Format is
+     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+     * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearCluster() { + + cluster_ = getDefaultInstance().getCluster(); + onChanged(); + return this; + } + /** + * + * + *
+     * Information specifying a GKE Cluster. Format is
+     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+     * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for cluster to set. + * @return This builder for chaining. + */ + public Builder setClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cluster_ = 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.deploy.v1.GkeCluster) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.GkeCluster) + private static final com.google.cloud.deploy.v1.GkeCluster DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.GkeCluster(); + } + + public static com.google.cloud.deploy.v1.GkeCluster getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GkeCluster parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GkeCluster(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.deploy.v1.GkeCluster getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeClusterOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeClusterOrBuilder.java new file mode 100644 index 0000000..4258e40 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeClusterOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface GkeClusterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.GkeCluster) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Information specifying a GKE Cluster. Format is
+   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+   * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The cluster. + */ + java.lang.String getCluster(); + /** + * + * + *
+   * Information specifying a GKE Cluster. Format is
+   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+   * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cluster. + */ + com.google.protobuf.ByteString getClusterBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java new file mode 100644 index 0000000..5218eed --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java @@ -0,0 +1,1325 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `ListDeliveryPipelines`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListDeliveryPipelinesRequest} + */ +public final class ListDeliveryPipelinesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListDeliveryPipelinesRequest) + ListDeliveryPipelinesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDeliveryPipelinesRequest.newBuilder() to construct. + private ListDeliveryPipelinesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDeliveryPipelinesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDeliveryPipelinesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDeliveryPipelinesRequest( + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest.class, + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent, which owns this collection of pipelines. Format must be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of pipelines. Format must be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of pipelines to return. The service may return
+   * fewer than this value. If unspecified, at most 50 pipelines will
+   * be returned. The maximum value is 1000; values above 1000 will be set
+   * 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_; + /** + * + * + *
+   * A page token, received from a previous `ListDeliveryPipelines` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListDeliveryPipelines` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * 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 builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * 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 builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * 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_; + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + 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 (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + 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.deploy.v1.ListDeliveryPipelinesRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest other = + (com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest) 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.deploy.v1.ListDeliveryPipelinesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest 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.deploy.v1.ListDeliveryPipelinesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest parseFrom( + 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.deploy.v1.ListDeliveryPipelinesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest parseFrom( + java.io.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.deploy.v1.ListDeliveryPipelinesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest parseDelimitedFrom( + java.io.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.deploy.v1.ListDeliveryPipelinesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.ListDeliveryPipelinesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `ListDeliveryPipelines`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListDeliveryPipelinesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListDeliveryPipelinesRequest) + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest.class, + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest build() { + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest buildPartial() { + com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest result = + new com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest(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.deploy.v1.ListDeliveryPipelinesRequest) { + return mergeFrom((com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest other) { + if (other == com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest.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.deploy.v1.ListDeliveryPipelinesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of pipelines. Format must be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of pipelines. Format must be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of pipelines. Format must be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of pipelines. Format must be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of pipelines. Format must be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of pipelines to return. The service may return
+     * fewer than this value. If unspecified, at most 50 pipelines will
+     * be returned. The maximum value is 1000; values above 1000 will be set
+     * to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of pipelines to return. The service may return
+     * fewer than this value. If unspecified, at most 50 pipelines will
+     * be returned. The maximum value is 1000; values above 1000 will be set
+     * 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; + } + /** + * + * + *
+     * The maximum number of pipelines to return. The service may return
+     * fewer than this value. If unspecified, at most 50 pipelines will
+     * be returned. The maximum value is 1000; values above 1000 will be set
+     * to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListDeliveryPipelines` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListDeliveryPipelines` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListDeliveryPipelines` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListDeliveryPipelines` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListDeliveryPipelines` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * 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 builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * 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 builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * 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 builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * 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 builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * 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.deploy.v1.ListDeliveryPipelinesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListDeliveryPipelinesRequest) + private static final com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest(); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDeliveryPipelinesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDeliveryPipelinesRequest(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.deploy.v1.ListDeliveryPipelinesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequestOrBuilder.java new file mode 100644 index 0000000..2db73e8 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequestOrBuilder.java @@ -0,0 +1,155 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ListDeliveryPipelinesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListDeliveryPipelinesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of pipelines. Format must be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of pipelines. Format must be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of pipelines to return. The service may return
+   * fewer than this value. If unspecified, at most 50 pipelines will
+   * be returned. The maximum value is 1000; values above 1000 will be set
+   * to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListDeliveryPipelines` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListDeliveryPipelines` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponse.java new file mode 100644 index 0000000..4c35c7c --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponse.java @@ -0,0 +1,1426 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The response object from `ListDeliveryPipelines`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListDeliveryPipelinesResponse} + */ +public final class ListDeliveryPipelinesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListDeliveryPipelinesResponse) + ListDeliveryPipelinesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDeliveryPipelinesResponse.newBuilder() to construct. + private ListDeliveryPipelinesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDeliveryPipelinesResponse() { + deliveryPipelines_ = 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 ListDeliveryPipelinesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDeliveryPipelinesResponse( + 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)) { + deliveryPipelines_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deliveryPipelines_.add( + input.readMessage( + com.google.cloud.deploy.v1.DeliveryPipeline.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)) { + deliveryPipelines_ = java.util.Collections.unmodifiableList(deliveryPipelines_); + } + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse.class, + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse.Builder.class); + } + + public static final int DELIVERY_PIPELINES_FIELD_NUMBER = 1; + private java.util.List deliveryPipelines_; + /** + * + * + *
+   * The `DeliveryPipeline` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + @java.lang.Override + public java.util.List getDeliveryPipelinesList() { + return deliveryPipelines_; + } + /** + * + * + *
+   * The `DeliveryPipeline` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + @java.lang.Override + public java.util.List + getDeliveryPipelinesOrBuilderList() { + return deliveryPipelines_; + } + /** + * + * + *
+   * The `DeliveryPipeline` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + @java.lang.Override + public int getDeliveryPipelinesCount() { + return deliveryPipelines_.size(); + } + /** + * + * + *
+   * The `DeliveryPipeline` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipelines(int index) { + return deliveryPipelines_.get(index); + } + /** + * + * + *
+   * The `DeliveryPipeline` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder getDeliveryPipelinesOrBuilder( + int index) { + return deliveryPipelines_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 < deliveryPipelines_.size(); i++) { + output.writeMessage(1, deliveryPipelines_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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 < deliveryPipelines_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, deliveryPipelines_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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.deploy.v1.ListDeliveryPipelinesResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse other = + (com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse) obj; + + if (!getDeliveryPipelinesList().equals(other.getDeliveryPipelinesList())) 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 (getDeliveryPipelinesCount() > 0) { + hash = (37 * hash) + DELIVERY_PIPELINES_FIELD_NUMBER; + hash = (53 * hash) + getDeliveryPipelinesList().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.deploy.v1.ListDeliveryPipelinesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse 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.deploy.v1.ListDeliveryPipelinesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse parseFrom( + 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.deploy.v1.ListDeliveryPipelinesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse parseFrom( + java.io.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.deploy.v1.ListDeliveryPipelinesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse parseDelimitedFrom( + java.io.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.deploy.v1.ListDeliveryPipelinesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.ListDeliveryPipelinesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 response object from `ListDeliveryPipelines`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListDeliveryPipelinesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListDeliveryPipelinesResponse) + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse.class, + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeliveryPipelinesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (deliveryPipelinesBuilder_ == null) { + deliveryPipelines_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deliveryPipelinesBuilder_.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse build() { + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse buildPartial() { + com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse result = + new com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse(this); + int from_bitField0_ = bitField0_; + if (deliveryPipelinesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deliveryPipelines_ = java.util.Collections.unmodifiableList(deliveryPipelines_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deliveryPipelines_ = deliveryPipelines_; + } else { + result.deliveryPipelines_ = deliveryPipelinesBuilder_.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.deploy.v1.ListDeliveryPipelinesResponse) { + return mergeFrom((com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse other) { + if (other == com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse.getDefaultInstance()) + return this; + if (deliveryPipelinesBuilder_ == null) { + if (!other.deliveryPipelines_.isEmpty()) { + if (deliveryPipelines_.isEmpty()) { + deliveryPipelines_ = other.deliveryPipelines_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeliveryPipelinesIsMutable(); + deliveryPipelines_.addAll(other.deliveryPipelines_); + } + onChanged(); + } + } else { + if (!other.deliveryPipelines_.isEmpty()) { + if (deliveryPipelinesBuilder_.isEmpty()) { + deliveryPipelinesBuilder_.dispose(); + deliveryPipelinesBuilder_ = null; + deliveryPipelines_ = other.deliveryPipelines_; + bitField0_ = (bitField0_ & ~0x00000001); + deliveryPipelinesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDeliveryPipelinesFieldBuilder() + : null; + } else { + deliveryPipelinesBuilder_.addAllMessages(other.deliveryPipelines_); + } + } + } + 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.deploy.v1.ListDeliveryPipelinesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List deliveryPipelines_ = + java.util.Collections.emptyList(); + + private void ensureDeliveryPipelinesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deliveryPipelines_ = + new java.util.ArrayList( + deliveryPipelines_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder> + deliveryPipelinesBuilder_; + + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public java.util.List getDeliveryPipelinesList() { + if (deliveryPipelinesBuilder_ == null) { + return java.util.Collections.unmodifiableList(deliveryPipelines_); + } else { + return deliveryPipelinesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public int getDeliveryPipelinesCount() { + if (deliveryPipelinesBuilder_ == null) { + return deliveryPipelines_.size(); + } else { + return deliveryPipelinesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipelines(int index) { + if (deliveryPipelinesBuilder_ == null) { + return deliveryPipelines_.get(index); + } else { + return deliveryPipelinesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public Builder setDeliveryPipelines( + int index, com.google.cloud.deploy.v1.DeliveryPipeline value) { + if (deliveryPipelinesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeliveryPipelinesIsMutable(); + deliveryPipelines_.set(index, value); + onChanged(); + } else { + deliveryPipelinesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public Builder setDeliveryPipelines( + int index, com.google.cloud.deploy.v1.DeliveryPipeline.Builder builderForValue) { + if (deliveryPipelinesBuilder_ == null) { + ensureDeliveryPipelinesIsMutable(); + deliveryPipelines_.set(index, builderForValue.build()); + onChanged(); + } else { + deliveryPipelinesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public Builder addDeliveryPipelines(com.google.cloud.deploy.v1.DeliveryPipeline value) { + if (deliveryPipelinesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeliveryPipelinesIsMutable(); + deliveryPipelines_.add(value); + onChanged(); + } else { + deliveryPipelinesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public Builder addDeliveryPipelines( + int index, com.google.cloud.deploy.v1.DeliveryPipeline value) { + if (deliveryPipelinesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeliveryPipelinesIsMutable(); + deliveryPipelines_.add(index, value); + onChanged(); + } else { + deliveryPipelinesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public Builder addDeliveryPipelines( + com.google.cloud.deploy.v1.DeliveryPipeline.Builder builderForValue) { + if (deliveryPipelinesBuilder_ == null) { + ensureDeliveryPipelinesIsMutable(); + deliveryPipelines_.add(builderForValue.build()); + onChanged(); + } else { + deliveryPipelinesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public Builder addDeliveryPipelines( + int index, com.google.cloud.deploy.v1.DeliveryPipeline.Builder builderForValue) { + if (deliveryPipelinesBuilder_ == null) { + ensureDeliveryPipelinesIsMutable(); + deliveryPipelines_.add(index, builderForValue.build()); + onChanged(); + } else { + deliveryPipelinesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public Builder addAllDeliveryPipelines( + java.lang.Iterable values) { + if (deliveryPipelinesBuilder_ == null) { + ensureDeliveryPipelinesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deliveryPipelines_); + onChanged(); + } else { + deliveryPipelinesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public Builder clearDeliveryPipelines() { + if (deliveryPipelinesBuilder_ == null) { + deliveryPipelines_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deliveryPipelinesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public Builder removeDeliveryPipelines(int index) { + if (deliveryPipelinesBuilder_ == null) { + ensureDeliveryPipelinesIsMutable(); + deliveryPipelines_.remove(index); + onChanged(); + } else { + deliveryPipelinesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public com.google.cloud.deploy.v1.DeliveryPipeline.Builder getDeliveryPipelinesBuilder( + int index) { + return getDeliveryPipelinesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder getDeliveryPipelinesOrBuilder( + int index) { + if (deliveryPipelinesBuilder_ == null) { + return deliveryPipelines_.get(index); + } else { + return deliveryPipelinesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public java.util.List + getDeliveryPipelinesOrBuilderList() { + if (deliveryPipelinesBuilder_ != null) { + return deliveryPipelinesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deliveryPipelines_); + } + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public com.google.cloud.deploy.v1.DeliveryPipeline.Builder addDeliveryPipelinesBuilder() { + return getDeliveryPipelinesFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance()); + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public com.google.cloud.deploy.v1.DeliveryPipeline.Builder addDeliveryPipelinesBuilder( + int index) { + return getDeliveryPipelinesFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance()); + } + /** + * + * + *
+     * The `DeliveryPipeline` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + public java.util.List + getDeliveryPipelinesBuilderList() { + return getDeliveryPipelinesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder> + getDeliveryPipelinesFieldBuilder() { + if (deliveryPipelinesBuilder_ == null) { + deliveryPipelinesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder>( + deliveryPipelines_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + deliveryPipelines_ = null; + } + return deliveryPipelinesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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.deploy.v1.ListDeliveryPipelinesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListDeliveryPipelinesResponse) + private static final com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse(); + } + + public static com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDeliveryPipelinesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDeliveryPipelinesResponse(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.deploy.v1.ListDeliveryPipelinesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponseOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponseOrBuilder.java new file mode 100644 index 0000000..d16caa6 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ListDeliveryPipelinesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListDeliveryPipelinesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The `DeliveryPipeline` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + java.util.List getDeliveryPipelinesList(); + /** + * + * + *
+   * The `DeliveryPipeline` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipelines(int index); + /** + * + * + *
+   * The `DeliveryPipeline` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + int getDeliveryPipelinesCount(); + /** + * + * + *
+   * The `DeliveryPipeline` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + java.util.List + getDeliveryPipelinesOrBuilderList(); + /** + * + * + *
+   * The `DeliveryPipeline` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.DeliveryPipeline delivery_pipelines = 1; + */ + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder getDeliveryPipelinesOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequest.java new file mode 100644 index 0000000..a94eb33 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequest.java @@ -0,0 +1,1311 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `ListReleases`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListReleasesRequest} + */ +public final class ListReleasesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListReleasesRequest) + ListReleasesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListReleasesRequest.newBuilder() to construct. + private ListReleasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListReleasesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListReleasesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListReleasesRequest( + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListReleasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListReleasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListReleasesRequest.class, + com.google.cloud.deploy.v1.ListReleasesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The `DeliveryPipeline` which owns this collection of `Release` objects.
+   * 
+ * + * + * 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 `DeliveryPipeline` which owns this collection of `Release` objects.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. The maximum number of `Release` objects to return. The service may return
+   * fewer than this value. If unspecified, at most 50 `Release` objects will be
+   * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A page token, received from a previous `ListReleases` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A page token, received from a previous `ListReleases` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + 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 (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + 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.deploy.v1.ListReleasesRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListReleasesRequest other = + (com.google.cloud.deploy.v1.ListReleasesRequest) 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.deploy.v1.ListReleasesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListReleasesRequest 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.deploy.v1.ListReleasesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListReleasesRequest parseFrom( + 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.deploy.v1.ListReleasesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListReleasesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ListReleasesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListReleasesRequest parseFrom( + java.io.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.deploy.v1.ListReleasesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListReleasesRequest parseDelimitedFrom( + java.io.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.deploy.v1.ListReleasesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListReleasesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.ListReleasesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `ListReleases`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListReleasesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListReleasesRequest) + com.google.cloud.deploy.v1.ListReleasesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListReleasesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListReleasesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListReleasesRequest.class, + com.google.cloud.deploy.v1.ListReleasesRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListReleasesRequest.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListReleasesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListReleasesRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListReleasesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListReleasesRequest build() { + com.google.cloud.deploy.v1.ListReleasesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListReleasesRequest buildPartial() { + com.google.cloud.deploy.v1.ListReleasesRequest result = + new com.google.cloud.deploy.v1.ListReleasesRequest(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.deploy.v1.ListReleasesRequest) { + return mergeFrom((com.google.cloud.deploy.v1.ListReleasesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListReleasesRequest other) { + if (other == com.google.cloud.deploy.v1.ListReleasesRequest.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.deploy.v1.ListReleasesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.ListReleasesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The `DeliveryPipeline` which owns this collection of `Release` objects.
+     * 
+ * + * + * 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 `DeliveryPipeline` which owns this collection of `Release` objects.
+     * 
+ * + * + * 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 `DeliveryPipeline` which owns this collection of `Release` objects.
+     * 
+ * + * + * 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 `DeliveryPipeline` which owns this collection of `Release` objects.
+     * 
+ * + * + * 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 `DeliveryPipeline` which owns this collection of `Release` objects.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of `Release` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `Release` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of `Release` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `Release` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of `Release` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `Release` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A page token, received from a previous `ListReleases` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListReleases` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListReleases` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListReleases` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListReleases` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.ListReleasesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListReleasesRequest) + private static final com.google.cloud.deploy.v1.ListReleasesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListReleasesRequest(); + } + + public static com.google.cloud.deploy.v1.ListReleasesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReleasesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListReleasesRequest(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.deploy.v1.ListReleasesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequestOrBuilder.java new file mode 100644 index 0000000..2cb992b --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequestOrBuilder.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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ListReleasesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListReleasesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The `DeliveryPipeline` which owns this collection of `Release` objects.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The `DeliveryPipeline` which owns this collection of `Release` objects.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of `Release` objects to return. The service may return
+   * fewer than this value. If unspecified, at most 50 `Release` objects will be
+   * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListReleases` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token, received from a previous `ListReleases` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponse.java new file mode 100644 index 0000000..c5a6623 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponse.java @@ -0,0 +1,1409 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The response object from `ListReleases`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListReleasesResponse} + */ +public final class ListReleasesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListReleasesResponse) + ListReleasesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListReleasesResponse.newBuilder() to construct. + private ListReleasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListReleasesResponse() { + releases_ = 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 ListReleasesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListReleasesResponse( + 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)) { + releases_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + releases_.add( + input.readMessage( + com.google.cloud.deploy.v1.Release.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)) { + releases_ = java.util.Collections.unmodifiableList(releases_); + } + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListReleasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListReleasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListReleasesResponse.class, + com.google.cloud.deploy.v1.ListReleasesResponse.Builder.class); + } + + public static final int RELEASES_FIELD_NUMBER = 1; + private java.util.List releases_; + /** + * + * + *
+   * The `Release` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + @java.lang.Override + public java.util.List getReleasesList() { + return releases_; + } + /** + * + * + *
+   * The `Release` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + @java.lang.Override + public java.util.List + getReleasesOrBuilderList() { + return releases_; + } + /** + * + * + *
+   * The `Release` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + @java.lang.Override + public int getReleasesCount() { + return releases_.size(); + } + /** + * + * + *
+   * The `Release` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release getReleases(int index) { + return releases_.get(index); + } + /** + * + * + *
+   * The `Release` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.ReleaseOrBuilder getReleasesOrBuilder(int index) { + return releases_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 < releases_.size(); i++) { + output.writeMessage(1, releases_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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 < releases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, releases_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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.deploy.v1.ListReleasesResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListReleasesResponse other = + (com.google.cloud.deploy.v1.ListReleasesResponse) obj; + + if (!getReleasesList().equals(other.getReleasesList())) 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 (getReleasesCount() > 0) { + hash = (37 * hash) + RELEASES_FIELD_NUMBER; + hash = (53 * hash) + getReleasesList().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.deploy.v1.ListReleasesResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListReleasesResponse 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.deploy.v1.ListReleasesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListReleasesResponse parseFrom( + 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.deploy.v1.ListReleasesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListReleasesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ListReleasesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListReleasesResponse parseFrom( + java.io.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.deploy.v1.ListReleasesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListReleasesResponse parseDelimitedFrom( + java.io.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.deploy.v1.ListReleasesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListReleasesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.ListReleasesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 response object from `ListReleases`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListReleasesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListReleasesResponse) + com.google.cloud.deploy.v1.ListReleasesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListReleasesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListReleasesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListReleasesResponse.class, + com.google.cloud.deploy.v1.ListReleasesResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListReleasesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReleasesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (releasesBuilder_ == null) { + releases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + releasesBuilder_.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListReleasesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListReleasesResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListReleasesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListReleasesResponse build() { + com.google.cloud.deploy.v1.ListReleasesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListReleasesResponse buildPartial() { + com.google.cloud.deploy.v1.ListReleasesResponse result = + new com.google.cloud.deploy.v1.ListReleasesResponse(this); + int from_bitField0_ = bitField0_; + if (releasesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + releases_ = java.util.Collections.unmodifiableList(releases_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.releases_ = releases_; + } else { + result.releases_ = releasesBuilder_.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.deploy.v1.ListReleasesResponse) { + return mergeFrom((com.google.cloud.deploy.v1.ListReleasesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListReleasesResponse other) { + if (other == com.google.cloud.deploy.v1.ListReleasesResponse.getDefaultInstance()) + return this; + if (releasesBuilder_ == null) { + if (!other.releases_.isEmpty()) { + if (releases_.isEmpty()) { + releases_ = other.releases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReleasesIsMutable(); + releases_.addAll(other.releases_); + } + onChanged(); + } + } else { + if (!other.releases_.isEmpty()) { + if (releasesBuilder_.isEmpty()) { + releasesBuilder_.dispose(); + releasesBuilder_ = null; + releases_ = other.releases_; + bitField0_ = (bitField0_ & ~0x00000001); + releasesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReleasesFieldBuilder() + : null; + } else { + releasesBuilder_.addAllMessages(other.releases_); + } + } + } + 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.deploy.v1.ListReleasesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.ListReleasesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List releases_ = + java.util.Collections.emptyList(); + + private void ensureReleasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + releases_ = new java.util.ArrayList(releases_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Release, + com.google.cloud.deploy.v1.Release.Builder, + com.google.cloud.deploy.v1.ReleaseOrBuilder> + releasesBuilder_; + + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public java.util.List getReleasesList() { + if (releasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(releases_); + } else { + return releasesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public int getReleasesCount() { + if (releasesBuilder_ == null) { + return releases_.size(); + } else { + return releasesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public com.google.cloud.deploy.v1.Release getReleases(int index) { + if (releasesBuilder_ == null) { + return releases_.get(index); + } else { + return releasesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public Builder setReleases(int index, com.google.cloud.deploy.v1.Release value) { + if (releasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReleasesIsMutable(); + releases_.set(index, value); + onChanged(); + } else { + releasesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public Builder setReleases( + int index, com.google.cloud.deploy.v1.Release.Builder builderForValue) { + if (releasesBuilder_ == null) { + ensureReleasesIsMutable(); + releases_.set(index, builderForValue.build()); + onChanged(); + } else { + releasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public Builder addReleases(com.google.cloud.deploy.v1.Release value) { + if (releasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReleasesIsMutable(); + releases_.add(value); + onChanged(); + } else { + releasesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public Builder addReleases(int index, com.google.cloud.deploy.v1.Release value) { + if (releasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReleasesIsMutable(); + releases_.add(index, value); + onChanged(); + } else { + releasesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public Builder addReleases(com.google.cloud.deploy.v1.Release.Builder builderForValue) { + if (releasesBuilder_ == null) { + ensureReleasesIsMutable(); + releases_.add(builderForValue.build()); + onChanged(); + } else { + releasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public Builder addReleases( + int index, com.google.cloud.deploy.v1.Release.Builder builderForValue) { + if (releasesBuilder_ == null) { + ensureReleasesIsMutable(); + releases_.add(index, builderForValue.build()); + onChanged(); + } else { + releasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public Builder addAllReleases( + java.lang.Iterable values) { + if (releasesBuilder_ == null) { + ensureReleasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, releases_); + onChanged(); + } else { + releasesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public Builder clearReleases() { + if (releasesBuilder_ == null) { + releases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + releasesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public Builder removeReleases(int index) { + if (releasesBuilder_ == null) { + ensureReleasesIsMutable(); + releases_.remove(index); + onChanged(); + } else { + releasesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public com.google.cloud.deploy.v1.Release.Builder getReleasesBuilder(int index) { + return getReleasesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public com.google.cloud.deploy.v1.ReleaseOrBuilder getReleasesOrBuilder(int index) { + if (releasesBuilder_ == null) { + return releases_.get(index); + } else { + return releasesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public java.util.List + getReleasesOrBuilderList() { + if (releasesBuilder_ != null) { + return releasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(releases_); + } + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public com.google.cloud.deploy.v1.Release.Builder addReleasesBuilder() { + return getReleasesFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.Release.getDefaultInstance()); + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public com.google.cloud.deploy.v1.Release.Builder addReleasesBuilder(int index) { + return getReleasesFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.Release.getDefaultInstance()); + } + /** + * + * + *
+     * The `Release` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + public java.util.List getReleasesBuilderList() { + return getReleasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Release, + com.google.cloud.deploy.v1.Release.Builder, + com.google.cloud.deploy.v1.ReleaseOrBuilder> + getReleasesFieldBuilder() { + if (releasesBuilder_ == null) { + releasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Release, + com.google.cloud.deploy.v1.Release.Builder, + com.google.cloud.deploy.v1.ReleaseOrBuilder>( + releases_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + releases_ = null; + } + return releasesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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.deploy.v1.ListReleasesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListReleasesResponse) + private static final com.google.cloud.deploy.v1.ListReleasesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListReleasesResponse(); + } + + public static com.google.cloud.deploy.v1.ListReleasesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReleasesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListReleasesResponse(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.deploy.v1.ListReleasesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponseOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponseOrBuilder.java new file mode 100644 index 0000000..dcc9cf4 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ListReleasesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListReleasesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The `Release` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + java.util.List getReleasesList(); + /** + * + * + *
+   * The `Release` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + com.google.cloud.deploy.v1.Release getReleases(int index); + /** + * + * + *
+   * The `Release` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + int getReleasesCount(); + /** + * + * + *
+   * The `Release` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + java.util.List getReleasesOrBuilderList(); + /** + * + * + *
+   * The `Release` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Release releases = 1; + */ + com.google.cloud.deploy.v1.ReleaseOrBuilder getReleasesOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequest.java new file mode 100644 index 0000000..8300b1e --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequest.java @@ -0,0 +1,1311 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * ListRolloutsRequest is the request object used by `ListRollouts`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListRolloutsRequest} + */ +public final class ListRolloutsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListRolloutsRequest) + ListRolloutsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRolloutsRequest.newBuilder() to construct. + private ListRolloutsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRolloutsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRolloutsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListRolloutsRequest( + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListRolloutsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListRolloutsRequest.class, + com.google.cloud.deploy.v1.ListRolloutsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The `Release` which owns this collection of `Rollout` objects.
+   * 
+ * + * + * 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 `Release` which owns this collection of `Rollout` objects.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. The maximum number of `Rollout` objects to return. The service may return
+   * fewer than this value. If unspecified, at most 50 `Rollout` objects will be
+   * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A page token, received from a previous `ListRollouts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A page token, received from a previous `ListRollouts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + 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 (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + 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.deploy.v1.ListRolloutsRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListRolloutsRequest other = + (com.google.cloud.deploy.v1.ListRolloutsRequest) 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.deploy.v1.ListRolloutsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListRolloutsRequest 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.deploy.v1.ListRolloutsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListRolloutsRequest parseFrom( + 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.deploy.v1.ListRolloutsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListRolloutsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ListRolloutsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListRolloutsRequest parseFrom( + java.io.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.deploy.v1.ListRolloutsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListRolloutsRequest parseDelimitedFrom( + java.io.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.deploy.v1.ListRolloutsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListRolloutsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.ListRolloutsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ListRolloutsRequest is the request object used by `ListRollouts`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListRolloutsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListRolloutsRequest) + com.google.cloud.deploy.v1.ListRolloutsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListRolloutsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListRolloutsRequest.class, + com.google.cloud.deploy.v1.ListRolloutsRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListRolloutsRequest.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListRolloutsRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListRolloutsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListRolloutsRequest build() { + com.google.cloud.deploy.v1.ListRolloutsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListRolloutsRequest buildPartial() { + com.google.cloud.deploy.v1.ListRolloutsRequest result = + new com.google.cloud.deploy.v1.ListRolloutsRequest(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.deploy.v1.ListRolloutsRequest) { + return mergeFrom((com.google.cloud.deploy.v1.ListRolloutsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListRolloutsRequest other) { + if (other == com.google.cloud.deploy.v1.ListRolloutsRequest.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.deploy.v1.ListRolloutsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.ListRolloutsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The `Release` which owns this collection of `Rollout` objects.
+     * 
+ * + * + * 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 `Release` which owns this collection of `Rollout` objects.
+     * 
+ * + * + * 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 `Release` which owns this collection of `Rollout` objects.
+     * 
+ * + * + * 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 `Release` which owns this collection of `Rollout` objects.
+     * 
+ * + * + * 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 `Release` which owns this collection of `Rollout` objects.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of `Rollout` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `Rollout` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of `Rollout` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `Rollout` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of `Rollout` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `Rollout` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A page token, received from a previous `ListRollouts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListRollouts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListRollouts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListRollouts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListRollouts` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.ListRolloutsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListRolloutsRequest) + private static final com.google.cloud.deploy.v1.ListRolloutsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListRolloutsRequest(); + } + + public static com.google.cloud.deploy.v1.ListRolloutsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRolloutsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListRolloutsRequest(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.deploy.v1.ListRolloutsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequestOrBuilder.java new file mode 100644 index 0000000..8df6459 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequestOrBuilder.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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ListRolloutsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListRolloutsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The `Release` which owns this collection of `Rollout` objects.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The `Release` which owns this collection of `Rollout` objects.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of `Rollout` objects to return. The service may return
+   * fewer than this value. If unspecified, at most 50 `Rollout` objects will be
+   * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListRollouts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token, received from a previous `ListRollouts` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponse.java new file mode 100644 index 0000000..5739116 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponse.java @@ -0,0 +1,1409 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * ListRolloutsResponse is the response object reutrned by `ListRollouts`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListRolloutsResponse} + */ +public final class ListRolloutsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListRolloutsResponse) + ListRolloutsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRolloutsResponse.newBuilder() to construct. + private ListRolloutsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRolloutsResponse() { + rollouts_ = 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 ListRolloutsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListRolloutsResponse( + 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)) { + rollouts_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rollouts_.add( + input.readMessage( + com.google.cloud.deploy.v1.Rollout.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)) { + rollouts_ = java.util.Collections.unmodifiableList(rollouts_); + } + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListRolloutsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListRolloutsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListRolloutsResponse.class, + com.google.cloud.deploy.v1.ListRolloutsResponse.Builder.class); + } + + public static final int ROLLOUTS_FIELD_NUMBER = 1; + private java.util.List rollouts_; + /** + * + * + *
+   * The `Rollout` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + @java.lang.Override + public java.util.List getRolloutsList() { + return rollouts_; + } + /** + * + * + *
+   * The `Rollout` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + @java.lang.Override + public java.util.List + getRolloutsOrBuilderList() { + return rollouts_; + } + /** + * + * + *
+   * The `Rollout` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + @java.lang.Override + public int getRolloutsCount() { + return rollouts_.size(); + } + /** + * + * + *
+   * The `Rollout` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Rollout getRollouts(int index) { + return rollouts_.get(index); + } + /** + * + * + *
+   * The `Rollout` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RolloutOrBuilder getRolloutsOrBuilder(int index) { + return rollouts_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 < rollouts_.size(); i++) { + output.writeMessage(1, rollouts_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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 < rollouts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rollouts_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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.deploy.v1.ListRolloutsResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListRolloutsResponse other = + (com.google.cloud.deploy.v1.ListRolloutsResponse) obj; + + if (!getRolloutsList().equals(other.getRolloutsList())) 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 (getRolloutsCount() > 0) { + hash = (37 * hash) + ROLLOUTS_FIELD_NUMBER; + hash = (53 * hash) + getRolloutsList().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.deploy.v1.ListRolloutsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListRolloutsResponse 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.deploy.v1.ListRolloutsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListRolloutsResponse parseFrom( + 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.deploy.v1.ListRolloutsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListRolloutsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ListRolloutsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListRolloutsResponse parseFrom( + java.io.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.deploy.v1.ListRolloutsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListRolloutsResponse parseDelimitedFrom( + java.io.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.deploy.v1.ListRolloutsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListRolloutsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.ListRolloutsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ListRolloutsResponse is the response object reutrned by `ListRollouts`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListRolloutsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListRolloutsResponse) + com.google.cloud.deploy.v1.ListRolloutsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListRolloutsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListRolloutsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListRolloutsResponse.class, + com.google.cloud.deploy.v1.ListRolloutsResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListRolloutsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRolloutsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (rolloutsBuilder_ == null) { + rollouts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rolloutsBuilder_.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListRolloutsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListRolloutsResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListRolloutsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListRolloutsResponse build() { + com.google.cloud.deploy.v1.ListRolloutsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListRolloutsResponse buildPartial() { + com.google.cloud.deploy.v1.ListRolloutsResponse result = + new com.google.cloud.deploy.v1.ListRolloutsResponse(this); + int from_bitField0_ = bitField0_; + if (rolloutsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rollouts_ = java.util.Collections.unmodifiableList(rollouts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rollouts_ = rollouts_; + } else { + result.rollouts_ = rolloutsBuilder_.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.deploy.v1.ListRolloutsResponse) { + return mergeFrom((com.google.cloud.deploy.v1.ListRolloutsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListRolloutsResponse other) { + if (other == com.google.cloud.deploy.v1.ListRolloutsResponse.getDefaultInstance()) + return this; + if (rolloutsBuilder_ == null) { + if (!other.rollouts_.isEmpty()) { + if (rollouts_.isEmpty()) { + rollouts_ = other.rollouts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRolloutsIsMutable(); + rollouts_.addAll(other.rollouts_); + } + onChanged(); + } + } else { + if (!other.rollouts_.isEmpty()) { + if (rolloutsBuilder_.isEmpty()) { + rolloutsBuilder_.dispose(); + rolloutsBuilder_ = null; + rollouts_ = other.rollouts_; + bitField0_ = (bitField0_ & ~0x00000001); + rolloutsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRolloutsFieldBuilder() + : null; + } else { + rolloutsBuilder_.addAllMessages(other.rollouts_); + } + } + } + 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.deploy.v1.ListRolloutsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.ListRolloutsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List rollouts_ = + java.util.Collections.emptyList(); + + private void ensureRolloutsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rollouts_ = new java.util.ArrayList(rollouts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Rollout, + com.google.cloud.deploy.v1.Rollout.Builder, + com.google.cloud.deploy.v1.RolloutOrBuilder> + rolloutsBuilder_; + + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public java.util.List getRolloutsList() { + if (rolloutsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rollouts_); + } else { + return rolloutsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public int getRolloutsCount() { + if (rolloutsBuilder_ == null) { + return rollouts_.size(); + } else { + return rolloutsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public com.google.cloud.deploy.v1.Rollout getRollouts(int index) { + if (rolloutsBuilder_ == null) { + return rollouts_.get(index); + } else { + return rolloutsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public Builder setRollouts(int index, com.google.cloud.deploy.v1.Rollout value) { + if (rolloutsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolloutsIsMutable(); + rollouts_.set(index, value); + onChanged(); + } else { + rolloutsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public Builder setRollouts( + int index, com.google.cloud.deploy.v1.Rollout.Builder builderForValue) { + if (rolloutsBuilder_ == null) { + ensureRolloutsIsMutable(); + rollouts_.set(index, builderForValue.build()); + onChanged(); + } else { + rolloutsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public Builder addRollouts(com.google.cloud.deploy.v1.Rollout value) { + if (rolloutsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolloutsIsMutable(); + rollouts_.add(value); + onChanged(); + } else { + rolloutsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public Builder addRollouts(int index, com.google.cloud.deploy.v1.Rollout value) { + if (rolloutsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolloutsIsMutable(); + rollouts_.add(index, value); + onChanged(); + } else { + rolloutsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public Builder addRollouts(com.google.cloud.deploy.v1.Rollout.Builder builderForValue) { + if (rolloutsBuilder_ == null) { + ensureRolloutsIsMutable(); + rollouts_.add(builderForValue.build()); + onChanged(); + } else { + rolloutsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public Builder addRollouts( + int index, com.google.cloud.deploy.v1.Rollout.Builder builderForValue) { + if (rolloutsBuilder_ == null) { + ensureRolloutsIsMutable(); + rollouts_.add(index, builderForValue.build()); + onChanged(); + } else { + rolloutsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public Builder addAllRollouts( + java.lang.Iterable values) { + if (rolloutsBuilder_ == null) { + ensureRolloutsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rollouts_); + onChanged(); + } else { + rolloutsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public Builder clearRollouts() { + if (rolloutsBuilder_ == null) { + rollouts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rolloutsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public Builder removeRollouts(int index) { + if (rolloutsBuilder_ == null) { + ensureRolloutsIsMutable(); + rollouts_.remove(index); + onChanged(); + } else { + rolloutsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public com.google.cloud.deploy.v1.Rollout.Builder getRolloutsBuilder(int index) { + return getRolloutsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public com.google.cloud.deploy.v1.RolloutOrBuilder getRolloutsOrBuilder(int index) { + if (rolloutsBuilder_ == null) { + return rollouts_.get(index); + } else { + return rolloutsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public java.util.List + getRolloutsOrBuilderList() { + if (rolloutsBuilder_ != null) { + return rolloutsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rollouts_); + } + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public com.google.cloud.deploy.v1.Rollout.Builder addRolloutsBuilder() { + return getRolloutsFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.Rollout.getDefaultInstance()); + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public com.google.cloud.deploy.v1.Rollout.Builder addRolloutsBuilder(int index) { + return getRolloutsFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.Rollout.getDefaultInstance()); + } + /** + * + * + *
+     * The `Rollout` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + public java.util.List getRolloutsBuilderList() { + return getRolloutsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Rollout, + com.google.cloud.deploy.v1.Rollout.Builder, + com.google.cloud.deploy.v1.RolloutOrBuilder> + getRolloutsFieldBuilder() { + if (rolloutsBuilder_ == null) { + rolloutsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Rollout, + com.google.cloud.deploy.v1.Rollout.Builder, + com.google.cloud.deploy.v1.RolloutOrBuilder>( + rollouts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rollouts_ = null; + } + return rolloutsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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.deploy.v1.ListRolloutsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListRolloutsResponse) + private static final com.google.cloud.deploy.v1.ListRolloutsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListRolloutsResponse(); + } + + public static com.google.cloud.deploy.v1.ListRolloutsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRolloutsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListRolloutsResponse(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.deploy.v1.ListRolloutsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponseOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponseOrBuilder.java new file mode 100644 index 0000000..a949a79 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ListRolloutsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListRolloutsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The `Rollout` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + java.util.List getRolloutsList(); + /** + * + * + *
+   * The `Rollout` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + com.google.cloud.deploy.v1.Rollout getRollouts(int index); + /** + * + * + *
+   * The `Rollout` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + int getRolloutsCount(); + /** + * + * + *
+   * The `Rollout` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + java.util.List getRolloutsOrBuilderList(); + /** + * + * + *
+   * The `Rollout` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Rollout rollouts = 1; + */ + com.google.cloud.deploy.v1.RolloutOrBuilder getRolloutsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java new file mode 100644 index 0000000..e99039b --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java @@ -0,0 +1,1318 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `ListTargets`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListTargetsRequest} + */ +public final class ListTargetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListTargetsRequest) + ListTargetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTargetsRequest.newBuilder() to construct. + private ListTargetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTargetsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTargetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTargetsRequest( + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListTargetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListTargetsRequest.class, + com.google.cloud.deploy.v1.ListTargetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent, which owns this collection of targets. Format must be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of targets. Format must be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. The maximum number of `Target` objects to return. The service may return
+   * fewer than this value. If unspecified, at most 50 `Target` objects will be
+   * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A page token, received from a previous `ListTargets` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A page token, received from a previous `ListTargets` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + 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 (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + 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.deploy.v1.ListTargetsRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListTargetsRequest other = + (com.google.cloud.deploy.v1.ListTargetsRequest) 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.deploy.v1.ListTargetsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListTargetsRequest 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.deploy.v1.ListTargetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListTargetsRequest parseFrom( + 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.deploy.v1.ListTargetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListTargetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ListTargetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListTargetsRequest parseFrom( + java.io.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.deploy.v1.ListTargetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListTargetsRequest parseDelimitedFrom( + java.io.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.deploy.v1.ListTargetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListTargetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.ListTargetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `ListTargets`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListTargetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListTargetsRequest) + com.google.cloud.deploy.v1.ListTargetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListTargetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListTargetsRequest.class, + com.google.cloud.deploy.v1.ListTargetsRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListTargetsRequest.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListTargetsRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListTargetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListTargetsRequest build() { + com.google.cloud.deploy.v1.ListTargetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListTargetsRequest buildPartial() { + com.google.cloud.deploy.v1.ListTargetsRequest result = + new com.google.cloud.deploy.v1.ListTargetsRequest(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.deploy.v1.ListTargetsRequest) { + return mergeFrom((com.google.cloud.deploy.v1.ListTargetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListTargetsRequest other) { + if (other == com.google.cloud.deploy.v1.ListTargetsRequest.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.deploy.v1.ListTargetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.ListTargetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of targets. Format must be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of targets. Format must be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of targets. Format must be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of targets. Format must be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of targets. Format must be
+     * projects/{project_id}/locations/{location_name}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of `Target` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `Target` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of `Target` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `Target` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of `Target` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `Target` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A page token, received from a previous `ListTargets` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListTargets` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListTargets` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListTargets` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListTargets` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other provided parameters match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.ListTargetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListTargetsRequest) + private static final com.google.cloud.deploy.v1.ListTargetsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListTargetsRequest(); + } + + public static com.google.cloud.deploy.v1.ListTargetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTargetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTargetsRequest(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.deploy.v1.ListTargetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequestOrBuilder.java new file mode 100644 index 0000000..fcc8966 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequestOrBuilder.java @@ -0,0 +1,154 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ListTargetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListTargetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of targets. Format must be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of targets. Format must be
+   * projects/{project_id}/locations/{location_name}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of `Target` objects to return. The service may return
+   * fewer than this value. If unspecified, at most 50 `Target` objects will be
+   * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListTargets` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token, received from a previous `ListTargets` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other provided parameters match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponse.java new file mode 100644 index 0000000..f1b86af --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponse.java @@ -0,0 +1,1407 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The response object from `ListTargets`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListTargetsResponse} + */ +public final class ListTargetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListTargetsResponse) + ListTargetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTargetsResponse.newBuilder() to construct. + private ListTargetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTargetsResponse() { + targets_ = 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 ListTargetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTargetsResponse( + 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)) { + targets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + targets_.add( + input.readMessage(com.google.cloud.deploy.v1.Target.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)) { + targets_ = java.util.Collections.unmodifiableList(targets_); + } + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListTargetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListTargetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListTargetsResponse.class, + com.google.cloud.deploy.v1.ListTargetsResponse.Builder.class); + } + + public static final int TARGETS_FIELD_NUMBER = 1; + private java.util.List targets_; + /** + * + * + *
+   * The `Target` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + @java.lang.Override + public java.util.List getTargetsList() { + return targets_; + } + /** + * + * + *
+   * The `Target` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + @java.lang.Override + public java.util.List + getTargetsOrBuilderList() { + return targets_; + } + /** + * + * + *
+   * The `Target` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + @java.lang.Override + public int getTargetsCount() { + return targets_.size(); + } + /** + * + * + *
+   * The `Target` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Target getTargets(int index) { + return targets_.get(index); + } + /** + * + * + *
+   * The `Target` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetOrBuilder getTargetsOrBuilder(int index) { + return targets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 < targets_.size(); i++) { + output.writeMessage(1, targets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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 < targets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, targets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + 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.deploy.v1.ListTargetsResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListTargetsResponse other = + (com.google.cloud.deploy.v1.ListTargetsResponse) obj; + + if (!getTargetsList().equals(other.getTargetsList())) 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 (getTargetsCount() > 0) { + hash = (37 * hash) + TARGETS_FIELD_NUMBER; + hash = (53 * hash) + getTargetsList().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.deploy.v1.ListTargetsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListTargetsResponse 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.deploy.v1.ListTargetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListTargetsResponse parseFrom( + 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.deploy.v1.ListTargetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListTargetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ListTargetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListTargetsResponse parseFrom( + java.io.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.deploy.v1.ListTargetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListTargetsResponse parseDelimitedFrom( + java.io.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.deploy.v1.ListTargetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListTargetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.ListTargetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 response object from `ListTargets`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListTargetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListTargetsResponse) + com.google.cloud.deploy.v1.ListTargetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListTargetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListTargetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListTargetsResponse.class, + com.google.cloud.deploy.v1.ListTargetsResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListTargetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTargetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (targetsBuilder_ == null) { + targets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + targetsBuilder_.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListTargetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListTargetsResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListTargetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListTargetsResponse build() { + com.google.cloud.deploy.v1.ListTargetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListTargetsResponse buildPartial() { + com.google.cloud.deploy.v1.ListTargetsResponse result = + new com.google.cloud.deploy.v1.ListTargetsResponse(this); + int from_bitField0_ = bitField0_; + if (targetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + targets_ = java.util.Collections.unmodifiableList(targets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.targets_ = targets_; + } else { + result.targets_ = targetsBuilder_.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.deploy.v1.ListTargetsResponse) { + return mergeFrom((com.google.cloud.deploy.v1.ListTargetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListTargetsResponse other) { + if (other == com.google.cloud.deploy.v1.ListTargetsResponse.getDefaultInstance()) return this; + if (targetsBuilder_ == null) { + if (!other.targets_.isEmpty()) { + if (targets_.isEmpty()) { + targets_ = other.targets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTargetsIsMutable(); + targets_.addAll(other.targets_); + } + onChanged(); + } + } else { + if (!other.targets_.isEmpty()) { + if (targetsBuilder_.isEmpty()) { + targetsBuilder_.dispose(); + targetsBuilder_ = null; + targets_ = other.targets_; + bitField0_ = (bitField0_ & ~0x00000001); + targetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTargetsFieldBuilder() + : null; + } else { + targetsBuilder_.addAllMessages(other.targets_); + } + } + } + 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.deploy.v1.ListTargetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.ListTargetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List targets_ = + java.util.Collections.emptyList(); + + private void ensureTargetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + targets_ = new java.util.ArrayList(targets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder> + targetsBuilder_; + + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public java.util.List getTargetsList() { + if (targetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(targets_); + } else { + return targetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public int getTargetsCount() { + if (targetsBuilder_ == null) { + return targets_.size(); + } else { + return targetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public com.google.cloud.deploy.v1.Target getTargets(int index) { + if (targetsBuilder_ == null) { + return targets_.get(index); + } else { + return targetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public Builder setTargets(int index, com.google.cloud.deploy.v1.Target value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.set(index, value); + onChanged(); + } else { + targetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public Builder setTargets( + int index, com.google.cloud.deploy.v1.Target.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.set(index, builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public Builder addTargets(com.google.cloud.deploy.v1.Target value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.add(value); + onChanged(); + } else { + targetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public Builder addTargets(int index, com.google.cloud.deploy.v1.Target value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.add(index, value); + onChanged(); + } else { + targetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public Builder addTargets(com.google.cloud.deploy.v1.Target.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.add(builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public Builder addTargets( + int index, com.google.cloud.deploy.v1.Target.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.add(index, builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public Builder addAllTargets( + java.lang.Iterable values) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targets_); + onChanged(); + } else { + targetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public Builder clearTargets() { + if (targetsBuilder_ == null) { + targets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + targetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public Builder removeTargets(int index) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.remove(index); + onChanged(); + } else { + targetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public com.google.cloud.deploy.v1.Target.Builder getTargetsBuilder(int index) { + return getTargetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public com.google.cloud.deploy.v1.TargetOrBuilder getTargetsOrBuilder(int index) { + if (targetsBuilder_ == null) { + return targets_.get(index); + } else { + return targetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public java.util.List + getTargetsOrBuilderList() { + if (targetsBuilder_ != null) { + return targetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(targets_); + } + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public com.google.cloud.deploy.v1.Target.Builder addTargetsBuilder() { + return getTargetsFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.Target.getDefaultInstance()); + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public com.google.cloud.deploy.v1.Target.Builder addTargetsBuilder(int index) { + return getTargetsFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.Target.getDefaultInstance()); + } + /** + * + * + *
+     * The `Target` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + public java.util.List getTargetsBuilderList() { + return getTargetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder> + getTargetsFieldBuilder() { + if (targetsBuilder_ == null) { + targetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder>( + targets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + targets_ = null; + } + return targetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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.deploy.v1.ListTargetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListTargetsResponse) + private static final com.google.cloud.deploy.v1.ListTargetsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListTargetsResponse(); + } + + public static com.google.cloud.deploy.v1.ListTargetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTargetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTargetsResponse(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.deploy.v1.ListTargetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponseOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponseOrBuilder.java new file mode 100644 index 0000000..3b99d8f --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ListTargetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListTargetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The `Target` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + java.util.List getTargetsList(); + /** + * + * + *
+   * The `Target` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + com.google.cloud.deploy.v1.Target getTargets(int index); + /** + * + * + *
+   * The `Target` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + int getTargetsCount(); + /** + * + * + *
+   * The `Target` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + java.util.List getTargetsOrBuilderList(); + /** + * + * + *
+   * The `Target` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Target targets = 1; + */ + com.google.cloud.deploy.v1.TargetOrBuilder getTargetsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/LocationName.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/LocationName.java new file mode 100644 index 0000000..53674f9 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/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.deploy.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-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadata.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadata.java new file mode 100644 index 0000000..549c642 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadata.java @@ -0,0 +1,1846 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.OperationMetadata.class, + com.google.cloud.deploy.v1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + private volatile java.lang.Object verb_; + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + private volatile java.lang.Object statusMessage_; + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_; + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object apiVersion_; + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!getVerbBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!getStatusMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + 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 (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!getVerbBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!getStatusMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + 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.deploy.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.OperationMetadata other = + (com.google.cloud.deploy.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.deploy.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.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.deploy.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.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.deploy.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.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.deploy.v1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.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.deploy.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.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.deploy.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.deploy.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.deploy.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.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.OperationMetadata) + com.google.cloud.deploy.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.OperationMetadata.class, + com.google.cloud.deploy.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.deploy.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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.OperationMetadata build() { + com.google.cloud.deploy.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.OperationMetadata buildPartial() { + com.google.cloud.deploy.v1.OperationMetadata result = + new com.google.cloud.deploy.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.deploy.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.deploy.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.OperationMetadata other) { + if (other == com.google.cloud.deploy.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.deploy.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.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_; + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + target_ = value; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + verb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + verb_ = value; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + statusMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + + statusMessage_ = getDefaultInstance().getStatusMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + statusMessage_ = value; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = getDefaultInstance().getApiVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.OperationMetadata) + private static final com.google.cloud.deploy.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.OperationMetadata(); + } + + public static com.google.cloud.deploy.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.deploy.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadataOrBuilder.java new file mode 100644 index 0000000..4b2f943 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,217 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineCondition.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineCondition.java new file mode 100644 index 0000000..077eae3 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineCondition.java @@ -0,0 +1,1025 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * PipelineCondition contains all conditions relevant to a Delivery Pipeline.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.PipelineCondition} + */ +public final class PipelineCondition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.PipelineCondition) + PipelineConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use PipelineCondition.newBuilder() to construct. + private PipelineCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PipelineCondition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PipelineCondition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PipelineCondition( + 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.deploy.v1.PipelineReadyCondition.Builder subBuilder = null; + if (pipelineReadyCondition_ != null) { + subBuilder = pipelineReadyCondition_.toBuilder(); + } + pipelineReadyCondition_ = + input.readMessage( + com.google.cloud.deploy.v1.PipelineReadyCondition.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(pipelineReadyCondition_); + pipelineReadyCondition_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.deploy.v1.TargetsPresentCondition.Builder subBuilder = null; + if (targetsPresentCondition_ != null) { + subBuilder = targetsPresentCondition_.toBuilder(); + } + targetsPresentCondition_ = + input.readMessage( + com.google.cloud.deploy.v1.TargetsPresentCondition.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(targetsPresentCondition_); + targetsPresentCondition_ = 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PipelineCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PipelineCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.PipelineCondition.class, + com.google.cloud.deploy.v1.PipelineCondition.Builder.class); + } + + public static final int PIPELINE_READY_CONDITION_FIELD_NUMBER = 1; + private com.google.cloud.deploy.v1.PipelineReadyCondition pipelineReadyCondition_; + /** + * + * + *
+   * Details around the Pipeline's overall status.
+   * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + * + * @return Whether the pipelineReadyCondition field is set. + */ + @java.lang.Override + public boolean hasPipelineReadyCondition() { + return pipelineReadyCondition_ != null; + } + /** + * + * + *
+   * Details around the Pipeline's overall status.
+   * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + * + * @return The pipelineReadyCondition. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PipelineReadyCondition getPipelineReadyCondition() { + return pipelineReadyCondition_ == null + ? com.google.cloud.deploy.v1.PipelineReadyCondition.getDefaultInstance() + : pipelineReadyCondition_; + } + /** + * + * + *
+   * Details around the Pipeline's overall status.
+   * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PipelineReadyConditionOrBuilder + getPipelineReadyConditionOrBuilder() { + return getPipelineReadyCondition(); + } + + public static final int TARGETS_PRESENT_CONDITION_FIELD_NUMBER = 3; + private com.google.cloud.deploy.v1.TargetsPresentCondition targetsPresentCondition_; + /** + * + * + *
+   * Detalis around targets enumerated in the pipeline.
+   * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + * + * @return Whether the targetsPresentCondition field is set. + */ + @java.lang.Override + public boolean hasTargetsPresentCondition() { + return targetsPresentCondition_ != null; + } + /** + * + * + *
+   * Detalis around targets enumerated in the pipeline.
+   * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + * + * @return The targetsPresentCondition. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetsPresentCondition getTargetsPresentCondition() { + return targetsPresentCondition_ == null + ? com.google.cloud.deploy.v1.TargetsPresentCondition.getDefaultInstance() + : targetsPresentCondition_; + } + /** + * + * + *
+   * Detalis around targets enumerated in the pipeline.
+   * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder + getTargetsPresentConditionOrBuilder() { + return getTargetsPresentCondition(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (pipelineReadyCondition_ != null) { + output.writeMessage(1, getPipelineReadyCondition()); + } + if (targetsPresentCondition_ != null) { + output.writeMessage(3, getTargetsPresentCondition()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pipelineReadyCondition_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPipelineReadyCondition()); + } + if (targetsPresentCondition_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetsPresentCondition()); + } + 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.deploy.v1.PipelineCondition)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.PipelineCondition other = + (com.google.cloud.deploy.v1.PipelineCondition) obj; + + if (hasPipelineReadyCondition() != other.hasPipelineReadyCondition()) return false; + if (hasPipelineReadyCondition()) { + if (!getPipelineReadyCondition().equals(other.getPipelineReadyCondition())) return false; + } + if (hasTargetsPresentCondition() != other.hasTargetsPresentCondition()) return false; + if (hasTargetsPresentCondition()) { + if (!getTargetsPresentCondition().equals(other.getTargetsPresentCondition())) 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 (hasPipelineReadyCondition()) { + hash = (37 * hash) + PIPELINE_READY_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getPipelineReadyCondition().hashCode(); + } + if (hasTargetsPresentCondition()) { + hash = (37 * hash) + TARGETS_PRESENT_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getTargetsPresentCondition().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.PipelineCondition parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PipelineCondition 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.deploy.v1.PipelineCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PipelineCondition parseFrom( + 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.deploy.v1.PipelineCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PipelineCondition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.PipelineCondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PipelineCondition parseFrom( + java.io.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.deploy.v1.PipelineCondition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PipelineCondition parseDelimitedFrom( + java.io.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.deploy.v1.PipelineCondition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PipelineCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.PipelineCondition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * PipelineCondition contains all conditions relevant to a Delivery Pipeline.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.PipelineCondition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.PipelineCondition) + com.google.cloud.deploy.v1.PipelineConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PipelineCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PipelineCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.PipelineCondition.class, + com.google.cloud.deploy.v1.PipelineCondition.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.PipelineCondition.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 (pipelineReadyConditionBuilder_ == null) { + pipelineReadyCondition_ = null; + } else { + pipelineReadyCondition_ = null; + pipelineReadyConditionBuilder_ = null; + } + if (targetsPresentConditionBuilder_ == null) { + targetsPresentCondition_ = null; + } else { + targetsPresentCondition_ = null; + targetsPresentConditionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PipelineCondition_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PipelineCondition getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.PipelineCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PipelineCondition build() { + com.google.cloud.deploy.v1.PipelineCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PipelineCondition buildPartial() { + com.google.cloud.deploy.v1.PipelineCondition result = + new com.google.cloud.deploy.v1.PipelineCondition(this); + if (pipelineReadyConditionBuilder_ == null) { + result.pipelineReadyCondition_ = pipelineReadyCondition_; + } else { + result.pipelineReadyCondition_ = pipelineReadyConditionBuilder_.build(); + } + if (targetsPresentConditionBuilder_ == null) { + result.targetsPresentCondition_ = targetsPresentCondition_; + } else { + result.targetsPresentCondition_ = targetsPresentConditionBuilder_.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.deploy.v1.PipelineCondition) { + return mergeFrom((com.google.cloud.deploy.v1.PipelineCondition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.PipelineCondition other) { + if (other == com.google.cloud.deploy.v1.PipelineCondition.getDefaultInstance()) return this; + if (other.hasPipelineReadyCondition()) { + mergePipelineReadyCondition(other.getPipelineReadyCondition()); + } + if (other.hasTargetsPresentCondition()) { + mergeTargetsPresentCondition(other.getTargetsPresentCondition()); + } + 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.deploy.v1.PipelineCondition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.PipelineCondition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.deploy.v1.PipelineReadyCondition pipelineReadyCondition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PipelineReadyCondition, + com.google.cloud.deploy.v1.PipelineReadyCondition.Builder, + com.google.cloud.deploy.v1.PipelineReadyConditionOrBuilder> + pipelineReadyConditionBuilder_; + /** + * + * + *
+     * Details around the Pipeline's overall status.
+     * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + * + * @return Whether the pipelineReadyCondition field is set. + */ + public boolean hasPipelineReadyCondition() { + return pipelineReadyConditionBuilder_ != null || pipelineReadyCondition_ != null; + } + /** + * + * + *
+     * Details around the Pipeline's overall status.
+     * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + * + * @return The pipelineReadyCondition. + */ + public com.google.cloud.deploy.v1.PipelineReadyCondition getPipelineReadyCondition() { + if (pipelineReadyConditionBuilder_ == null) { + return pipelineReadyCondition_ == null + ? com.google.cloud.deploy.v1.PipelineReadyCondition.getDefaultInstance() + : pipelineReadyCondition_; + } else { + return pipelineReadyConditionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Details around the Pipeline's overall status.
+     * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + */ + public Builder setPipelineReadyCondition( + com.google.cloud.deploy.v1.PipelineReadyCondition value) { + if (pipelineReadyConditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pipelineReadyCondition_ = value; + onChanged(); + } else { + pipelineReadyConditionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Details around the Pipeline's overall status.
+     * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + */ + public Builder setPipelineReadyCondition( + com.google.cloud.deploy.v1.PipelineReadyCondition.Builder builderForValue) { + if (pipelineReadyConditionBuilder_ == null) { + pipelineReadyCondition_ = builderForValue.build(); + onChanged(); + } else { + pipelineReadyConditionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Details around the Pipeline's overall status.
+     * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + */ + public Builder mergePipelineReadyCondition( + com.google.cloud.deploy.v1.PipelineReadyCondition value) { + if (pipelineReadyConditionBuilder_ == null) { + if (pipelineReadyCondition_ != null) { + pipelineReadyCondition_ = + com.google.cloud.deploy.v1.PipelineReadyCondition.newBuilder(pipelineReadyCondition_) + .mergeFrom(value) + .buildPartial(); + } else { + pipelineReadyCondition_ = value; + } + onChanged(); + } else { + pipelineReadyConditionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Details around the Pipeline's overall status.
+     * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + */ + public Builder clearPipelineReadyCondition() { + if (pipelineReadyConditionBuilder_ == null) { + pipelineReadyCondition_ = null; + onChanged(); + } else { + pipelineReadyCondition_ = null; + pipelineReadyConditionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Details around the Pipeline's overall status.
+     * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + */ + public com.google.cloud.deploy.v1.PipelineReadyCondition.Builder + getPipelineReadyConditionBuilder() { + + onChanged(); + return getPipelineReadyConditionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Details around the Pipeline's overall status.
+     * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + */ + public com.google.cloud.deploy.v1.PipelineReadyConditionOrBuilder + getPipelineReadyConditionOrBuilder() { + if (pipelineReadyConditionBuilder_ != null) { + return pipelineReadyConditionBuilder_.getMessageOrBuilder(); + } else { + return pipelineReadyCondition_ == null + ? com.google.cloud.deploy.v1.PipelineReadyCondition.getDefaultInstance() + : pipelineReadyCondition_; + } + } + /** + * + * + *
+     * Details around the Pipeline's overall status.
+     * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PipelineReadyCondition, + com.google.cloud.deploy.v1.PipelineReadyCondition.Builder, + com.google.cloud.deploy.v1.PipelineReadyConditionOrBuilder> + getPipelineReadyConditionFieldBuilder() { + if (pipelineReadyConditionBuilder_ == null) { + pipelineReadyConditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PipelineReadyCondition, + com.google.cloud.deploy.v1.PipelineReadyCondition.Builder, + com.google.cloud.deploy.v1.PipelineReadyConditionOrBuilder>( + getPipelineReadyCondition(), getParentForChildren(), isClean()); + pipelineReadyCondition_ = null; + } + return pipelineReadyConditionBuilder_; + } + + private com.google.cloud.deploy.v1.TargetsPresentCondition targetsPresentCondition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.TargetsPresentCondition, + com.google.cloud.deploy.v1.TargetsPresentCondition.Builder, + com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder> + targetsPresentConditionBuilder_; + /** + * + * + *
+     * Detalis around targets enumerated in the pipeline.
+     * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + * + * @return Whether the targetsPresentCondition field is set. + */ + public boolean hasTargetsPresentCondition() { + return targetsPresentConditionBuilder_ != null || targetsPresentCondition_ != null; + } + /** + * + * + *
+     * Detalis around targets enumerated in the pipeline.
+     * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + * + * @return The targetsPresentCondition. + */ + public com.google.cloud.deploy.v1.TargetsPresentCondition getTargetsPresentCondition() { + if (targetsPresentConditionBuilder_ == null) { + return targetsPresentCondition_ == null + ? com.google.cloud.deploy.v1.TargetsPresentCondition.getDefaultInstance() + : targetsPresentCondition_; + } else { + return targetsPresentConditionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Detalis around targets enumerated in the pipeline.
+     * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + */ + public Builder setTargetsPresentCondition( + com.google.cloud.deploy.v1.TargetsPresentCondition value) { + if (targetsPresentConditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetsPresentCondition_ = value; + onChanged(); + } else { + targetsPresentConditionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Detalis around targets enumerated in the pipeline.
+     * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + */ + public Builder setTargetsPresentCondition( + com.google.cloud.deploy.v1.TargetsPresentCondition.Builder builderForValue) { + if (targetsPresentConditionBuilder_ == null) { + targetsPresentCondition_ = builderForValue.build(); + onChanged(); + } else { + targetsPresentConditionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Detalis around targets enumerated in the pipeline.
+     * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + */ + public Builder mergeTargetsPresentCondition( + com.google.cloud.deploy.v1.TargetsPresentCondition value) { + if (targetsPresentConditionBuilder_ == null) { + if (targetsPresentCondition_ != null) { + targetsPresentCondition_ = + com.google.cloud.deploy.v1.TargetsPresentCondition.newBuilder( + targetsPresentCondition_) + .mergeFrom(value) + .buildPartial(); + } else { + targetsPresentCondition_ = value; + } + onChanged(); + } else { + targetsPresentConditionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Detalis around targets enumerated in the pipeline.
+     * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + */ + public Builder clearTargetsPresentCondition() { + if (targetsPresentConditionBuilder_ == null) { + targetsPresentCondition_ = null; + onChanged(); + } else { + targetsPresentCondition_ = null; + targetsPresentConditionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Detalis around targets enumerated in the pipeline.
+     * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + */ + public com.google.cloud.deploy.v1.TargetsPresentCondition.Builder + getTargetsPresentConditionBuilder() { + + onChanged(); + return getTargetsPresentConditionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Detalis around targets enumerated in the pipeline.
+     * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + */ + public com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder + getTargetsPresentConditionOrBuilder() { + if (targetsPresentConditionBuilder_ != null) { + return targetsPresentConditionBuilder_.getMessageOrBuilder(); + } else { + return targetsPresentCondition_ == null + ? com.google.cloud.deploy.v1.TargetsPresentCondition.getDefaultInstance() + : targetsPresentCondition_; + } + } + /** + * + * + *
+     * Detalis around targets enumerated in the pipeline.
+     * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.TargetsPresentCondition, + com.google.cloud.deploy.v1.TargetsPresentCondition.Builder, + com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder> + getTargetsPresentConditionFieldBuilder() { + if (targetsPresentConditionBuilder_ == null) { + targetsPresentConditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.TargetsPresentCondition, + com.google.cloud.deploy.v1.TargetsPresentCondition.Builder, + com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder>( + getTargetsPresentCondition(), getParentForChildren(), isClean()); + targetsPresentCondition_ = null; + } + return targetsPresentConditionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.PipelineCondition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.PipelineCondition) + private static final com.google.cloud.deploy.v1.PipelineCondition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.PipelineCondition(); + } + + public static com.google.cloud.deploy.v1.PipelineCondition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PipelineCondition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PipelineCondition(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.deploy.v1.PipelineCondition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineConditionOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineConditionOrBuilder.java new file mode 100644 index 0000000..438144f --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineConditionOrBuilder.java @@ -0,0 +1,95 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface PipelineConditionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.PipelineCondition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Details around the Pipeline's overall status.
+   * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + * + * @return Whether the pipelineReadyCondition field is set. + */ + boolean hasPipelineReadyCondition(); + /** + * + * + *
+   * Details around the Pipeline's overall status.
+   * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + * + * @return The pipelineReadyCondition. + */ + com.google.cloud.deploy.v1.PipelineReadyCondition getPipelineReadyCondition(); + /** + * + * + *
+   * Details around the Pipeline's overall status.
+   * 
+ * + * .google.cloud.deploy.v1.PipelineReadyCondition pipeline_ready_condition = 1; + */ + com.google.cloud.deploy.v1.PipelineReadyConditionOrBuilder getPipelineReadyConditionOrBuilder(); + + /** + * + * + *
+   * Detalis around targets enumerated in the pipeline.
+   * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + * + * @return Whether the targetsPresentCondition field is set. + */ + boolean hasTargetsPresentCondition(); + /** + * + * + *
+   * Detalis around targets enumerated in the pipeline.
+   * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + * + * @return The targetsPresentCondition. + */ + com.google.cloud.deploy.v1.TargetsPresentCondition getTargetsPresentCondition(); + /** + * + * + *
+   * Detalis around targets enumerated in the pipeline.
+   * 
+ * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 3; + */ + com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder getTargetsPresentConditionOrBuilder(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyCondition.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyCondition.java new file mode 100644 index 0000000..7474479 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyCondition.java @@ -0,0 +1,832 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * PipelineReadyCondition contains information around the status of the
+ * Pipeline.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.PipelineReadyCondition} + */ +public final class PipelineReadyCondition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.PipelineReadyCondition) + PipelineReadyConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use PipelineReadyCondition.newBuilder() to construct. + private PipelineReadyCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PipelineReadyCondition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PipelineReadyCondition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PipelineReadyCondition( + 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 24: + { + status_ = input.readBool(); + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PipelineReadyCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PipelineReadyCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.PipelineReadyCondition.class, + com.google.cloud.deploy.v1.PipelineReadyCondition.Builder.class); + } + + public static final int STATUS_FIELD_NUMBER = 3; + private boolean status_; + /** + * + * + *
+   * True if the Pipeline is in a valid state. Otherwise at least one condition
+   * in `PipelineCondition` is in an invalid state. Iterate over those
+   * conditions and see which condition(s) has status = false to find out what
+   * is wrong with the Pipeline.
+   * 
+ * + * bool status = 3; + * + * @return The status. + */ + @java.lang.Override + public boolean getStatus() { + return status_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (status_ != false) { + output.writeBool(3, status_); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, status_); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.PipelineReadyCondition)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.PipelineReadyCondition other = + (com.google.cloud.deploy.v1.PipelineReadyCondition) obj; + + if (getStatus() != other.getStatus()) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStatus()); + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.PipelineReadyCondition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PipelineReadyCondition 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.deploy.v1.PipelineReadyCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PipelineReadyCondition parseFrom( + 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.deploy.v1.PipelineReadyCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PipelineReadyCondition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.PipelineReadyCondition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PipelineReadyCondition parseFrom( + java.io.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.deploy.v1.PipelineReadyCondition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PipelineReadyCondition parseDelimitedFrom( + java.io.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.deploy.v1.PipelineReadyCondition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PipelineReadyCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.PipelineReadyCondition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * PipelineReadyCondition contains information around the status of the
+   * Pipeline.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.PipelineReadyCondition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.PipelineReadyCondition) + com.google.cloud.deploy.v1.PipelineReadyConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PipelineReadyCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PipelineReadyCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.PipelineReadyCondition.class, + com.google.cloud.deploy.v1.PipelineReadyCondition.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.PipelineReadyCondition.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(); + status_ = false; + + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PipelineReadyCondition_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PipelineReadyCondition getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.PipelineReadyCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PipelineReadyCondition build() { + com.google.cloud.deploy.v1.PipelineReadyCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PipelineReadyCondition buildPartial() { + com.google.cloud.deploy.v1.PipelineReadyCondition result = + new com.google.cloud.deploy.v1.PipelineReadyCondition(this); + result.status_ = status_; + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.PipelineReadyCondition) { + return mergeFrom((com.google.cloud.deploy.v1.PipelineReadyCondition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.PipelineReadyCondition other) { + if (other == com.google.cloud.deploy.v1.PipelineReadyCondition.getDefaultInstance()) + return this; + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.PipelineReadyCondition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.deploy.v1.PipelineReadyCondition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean status_; + /** + * + * + *
+     * True if the Pipeline is in a valid state. Otherwise at least one condition
+     * in `PipelineCondition` is in an invalid state. Iterate over those
+     * conditions and see which condition(s) has status = false to find out what
+     * is wrong with the Pipeline.
+     * 
+ * + * bool status = 3; + * + * @return The status. + */ + @java.lang.Override + public boolean getStatus() { + return status_; + } + /** + * + * + *
+     * True if the Pipeline is in a valid state. Otherwise at least one condition
+     * in `PipelineCondition` is in an invalid state. Iterate over those
+     * conditions and see which condition(s) has status = false to find out what
+     * is wrong with the Pipeline.
+     * 
+ * + * bool status = 3; + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * True if the Pipeline is in a valid state. Otherwise at least one condition
+     * in `PipelineCondition` is in an invalid state. Iterate over those
+     * conditions and see which condition(s) has status = false to find out what
+     * is wrong with the Pipeline.
+     * 
+ * + * bool status = 3; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.PipelineReadyCondition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.PipelineReadyCondition) + private static final com.google.cloud.deploy.v1.PipelineReadyCondition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.PipelineReadyCondition(); + } + + public static com.google.cloud.deploy.v1.PipelineReadyCondition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PipelineReadyCondition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PipelineReadyCondition(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.deploy.v1.PipelineReadyCondition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyConditionOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyConditionOrBuilder.java new file mode 100644 index 0000000..7409f50 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyConditionOrBuilder.java @@ -0,0 +1,76 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface PipelineReadyConditionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.PipelineReadyCondition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * True if the Pipeline is in a valid state. Otherwise at least one condition
+   * in `PipelineCondition` is in an invalid state. Iterate over those
+   * conditions and see which condition(s) has status = false to find out what
+   * is wrong with the Pipeline.
+   * 
+ * + * bool status = 3; + * + * @return The status. + */ + boolean getStatus(); + + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePool.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePool.java new file mode 100644 index 0000000..06f0035 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePool.java @@ -0,0 +1,1047 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Execution using a private Cloud Build pool.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.PrivatePool} + */ +public final class PrivatePool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.PrivatePool) + PrivatePoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrivatePool.newBuilder() to construct. + private PrivatePool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrivatePool() { + workerPool_ = ""; + serviceAccount_ = ""; + artifactStorage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrivatePool(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PrivatePool( + 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(); + + workerPool_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccount_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + artifactStorage_ = 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PrivatePool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PrivatePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.PrivatePool.class, + com.google.cloud.deploy.v1.PrivatePool.Builder.class); + } + + public static final int WORKER_POOL_FIELD_NUMBER = 1; + private volatile java.lang.Object workerPool_; + /** + * + * + *
+   * Required. Resource name of the Cloud Build worker pool to use. The format is
+   * `projects/{project}/locations/{location}/workerPools/{pool}`.
+   * 
+ * + * + * string worker_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The workerPool. + */ + @java.lang.Override + public java.lang.String getWorkerPool() { + java.lang.Object ref = workerPool_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workerPool_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the Cloud Build worker pool to use. The format is
+   * `projects/{project}/locations/{location}/workerPools/{pool}`.
+   * 
+ * + * + * string worker_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for workerPool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWorkerPoolBytes() { + java.lang.Object ref = workerPool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workerPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 2; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * Optional. Google service account to use for execution. If unspecified,
+   * the project execution service account
+   * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+   * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Google service account to use for execution. If unspecified,
+   * the project execution service account
+   * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+   * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIFACT_STORAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object artifactStorage_; + /** + * + * + *
+   * Optional. Cloud Storage location where execution outputs should be stored. This can
+   * either be a bucket ("gs://my-bucket") or a path within a bucket
+   * ("gs://my-bucket/my-dir").
+   * If unspecified, a default bucket located in the same region will be used.
+   * 
+ * + * string artifact_storage = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The artifactStorage. + */ + @java.lang.Override + public java.lang.String getArtifactStorage() { + java.lang.Object ref = artifactStorage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactStorage_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Cloud Storage location where execution outputs should be stored. This can
+   * either be a bucket ("gs://my-bucket") or a path within a bucket
+   * ("gs://my-bucket/my-dir").
+   * If unspecified, a default bucket located in the same region will be used.
+   * 
+ * + * string artifact_storage = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for artifactStorage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactStorageBytes() { + java.lang.Object ref = artifactStorage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactStorage_ = 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 (!getWorkerPoolBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, workerPool_); + } + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceAccount_); + } + if (!getArtifactStorageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, artifactStorage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getWorkerPoolBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, workerPool_); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceAccount_); + } + if (!getArtifactStorageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, artifactStorage_); + } + 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.deploy.v1.PrivatePool)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.PrivatePool other = (com.google.cloud.deploy.v1.PrivatePool) obj; + + if (!getWorkerPool().equals(other.getWorkerPool())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getArtifactStorage().equals(other.getArtifactStorage())) 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) + WORKER_POOL_FIELD_NUMBER; + hash = (53 * hash) + getWorkerPool().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + ARTIFACT_STORAGE_FIELD_NUMBER; + hash = (53 * hash) + getArtifactStorage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.PrivatePool parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PrivatePool 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.deploy.v1.PrivatePool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PrivatePool parseFrom( + 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.deploy.v1.PrivatePool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PrivatePool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.PrivatePool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PrivatePool parseFrom( + java.io.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.deploy.v1.PrivatePool parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PrivatePool parseDelimitedFrom( + java.io.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.deploy.v1.PrivatePool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PrivatePool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.PrivatePool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Execution using a private Cloud Build pool.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.PrivatePool} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.PrivatePool) + com.google.cloud.deploy.v1.PrivatePoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PrivatePool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PrivatePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.PrivatePool.class, + com.google.cloud.deploy.v1.PrivatePool.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.PrivatePool.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(); + workerPool_ = ""; + + serviceAccount_ = ""; + + artifactStorage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PrivatePool_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PrivatePool getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.PrivatePool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PrivatePool build() { + com.google.cloud.deploy.v1.PrivatePool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PrivatePool buildPartial() { + com.google.cloud.deploy.v1.PrivatePool result = + new com.google.cloud.deploy.v1.PrivatePool(this); + result.workerPool_ = workerPool_; + result.serviceAccount_ = serviceAccount_; + result.artifactStorage_ = artifactStorage_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.PrivatePool) { + return mergeFrom((com.google.cloud.deploy.v1.PrivatePool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.PrivatePool other) { + if (other == com.google.cloud.deploy.v1.PrivatePool.getDefaultInstance()) return this; + if (!other.getWorkerPool().isEmpty()) { + workerPool_ = other.workerPool_; + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + if (!other.getArtifactStorage().isEmpty()) { + artifactStorage_ = other.artifactStorage_; + 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.deploy.v1.PrivatePool parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.PrivatePool) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object workerPool_ = ""; + /** + * + * + *
+     * Required. Resource name of the Cloud Build worker pool to use. The format is
+     * `projects/{project}/locations/{location}/workerPools/{pool}`.
+     * 
+ * + * + * string worker_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The workerPool. + */ + public java.lang.String getWorkerPool() { + java.lang.Object ref = workerPool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workerPool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the Cloud Build worker pool to use. The format is
+     * `projects/{project}/locations/{location}/workerPools/{pool}`.
+     * 
+ * + * + * string worker_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for workerPool. + */ + public com.google.protobuf.ByteString getWorkerPoolBytes() { + java.lang.Object ref = workerPool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workerPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the Cloud Build worker pool to use. The format is
+     * `projects/{project}/locations/{location}/workerPools/{pool}`.
+     * 
+ * + * + * string worker_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The workerPool to set. + * @return This builder for chaining. + */ + public Builder setWorkerPool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + workerPool_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the Cloud Build worker pool to use. The format is
+     * `projects/{project}/locations/{location}/workerPools/{pool}`.
+     * 
+ * + * + * string worker_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearWorkerPool() { + + workerPool_ = getDefaultInstance().getWorkerPool(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the Cloud Build worker pool to use. The format is
+     * `projects/{project}/locations/{location}/workerPools/{pool}`.
+     * 
+ * + * + * string worker_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for workerPool to set. + * @return This builder for chaining. + */ + public Builder setWorkerPoolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + workerPool_ = value; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Optional. Google service account to use for execution. If unspecified,
+     * the project execution service account
+     * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+     * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Google service account to use for execution. If unspecified,
+     * the project execution service account
+     * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+     * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Google service account to use for execution. If unspecified,
+     * the project execution service account
+     * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+     * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Google service account to use for execution. If unspecified,
+     * the project execution service account
+     * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+     * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Google service account to use for execution. If unspecified,
+     * the project execution service account
+     * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+     * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccount_ = value; + onChanged(); + return this; + } + + private java.lang.Object artifactStorage_ = ""; + /** + * + * + *
+     * Optional. Cloud Storage location where execution outputs should be stored. This can
+     * either be a bucket ("gs://my-bucket") or a path within a bucket
+     * ("gs://my-bucket/my-dir").
+     * If unspecified, a default bucket located in the same region will be used.
+     * 
+ * + * string artifact_storage = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The artifactStorage. + */ + public java.lang.String getArtifactStorage() { + java.lang.Object ref = artifactStorage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactStorage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Cloud Storage location where execution outputs should be stored. This can
+     * either be a bucket ("gs://my-bucket") or a path within a bucket
+     * ("gs://my-bucket/my-dir").
+     * If unspecified, a default bucket located in the same region will be used.
+     * 
+ * + * string artifact_storage = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for artifactStorage. + */ + public com.google.protobuf.ByteString getArtifactStorageBytes() { + java.lang.Object ref = artifactStorage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactStorage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Cloud Storage location where execution outputs should be stored. This can
+     * either be a bucket ("gs://my-bucket") or a path within a bucket
+     * ("gs://my-bucket/my-dir").
+     * If unspecified, a default bucket located in the same region will be used.
+     * 
+ * + * string artifact_storage = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The artifactStorage to set. + * @return This builder for chaining. + */ + public Builder setArtifactStorage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + artifactStorage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud Storage location where execution outputs should be stored. This can
+     * either be a bucket ("gs://my-bucket") or a path within a bucket
+     * ("gs://my-bucket/my-dir").
+     * If unspecified, a default bucket located in the same region will be used.
+     * 
+ * + * string artifact_storage = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearArtifactStorage() { + + artifactStorage_ = getDefaultInstance().getArtifactStorage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud Storage location where execution outputs should be stored. This can
+     * either be a bucket ("gs://my-bucket") or a path within a bucket
+     * ("gs://my-bucket/my-dir").
+     * If unspecified, a default bucket located in the same region will be used.
+     * 
+ * + * string artifact_storage = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for artifactStorage to set. + * @return This builder for chaining. + */ + public Builder setArtifactStorageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + artifactStorage_ = 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.deploy.v1.PrivatePool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.PrivatePool) + private static final com.google.cloud.deploy.v1.PrivatePool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.PrivatePool(); + } + + public static com.google.cloud.deploy.v1.PrivatePool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrivatePool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrivatePool(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.deploy.v1.PrivatePool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePoolOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePoolOrBuilder.java new file mode 100644 index 0000000..69b35c8 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePoolOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface PrivatePoolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.PrivatePool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the Cloud Build worker pool to use. The format is
+   * `projects/{project}/locations/{location}/workerPools/{pool}`.
+   * 
+ * + * + * string worker_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The workerPool. + */ + java.lang.String getWorkerPool(); + /** + * + * + *
+   * Required. Resource name of the Cloud Build worker pool to use. The format is
+   * `projects/{project}/locations/{location}/workerPools/{pool}`.
+   * 
+ * + * + * string worker_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for workerPool. + */ + com.google.protobuf.ByteString getWorkerPoolBytes(); + + /** + * + * + *
+   * Optional. Google service account to use for execution. If unspecified,
+   * the project execution service account
+   * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+   * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Optional. Google service account to use for execution. If unspecified,
+   * the project execution service account
+   * (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
+   * 
+ * + * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Optional. Cloud Storage location where execution outputs should be stored. This can
+   * either be a bucket ("gs://my-bucket") or a path within a bucket
+   * ("gs://my-bucket/my-dir").
+   * If unspecified, a default bucket located in the same region will be used.
+   * 
+ * + * string artifact_storage = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The artifactStorage. + */ + java.lang.String getArtifactStorage(); + /** + * + * + *
+   * Optional. Cloud Storage location where execution outputs should be stored. This can
+   * either be a bucket ("gs://my-bucket") or a path within a bucket
+   * ("gs://my-bucket/my-dir").
+   * If unspecified, a default bucket located in the same region will be used.
+   * 
+ * + * string artifact_storage = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for artifactStorage. + */ + com.google.protobuf.ByteString getArtifactStorageBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java new file mode 100644 index 0000000..0d71bcd --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java @@ -0,0 +1,6843 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * A `Release` resource in the Google Cloud Deploy API.
+ * A `Release` defines a specific Skaffold configuration instance
+ * that can be deployed.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Release} + */ +public final class Release extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Release) + ReleaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Release.newBuilder() to construct. + private Release(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Release() { + name_ = ""; + uid_ = ""; + description_ = ""; + skaffoldConfigUri_ = ""; + skaffoldConfigPath_ = ""; + buildArtifacts_ = java.util.Collections.emptyList(); + targetSnapshots_ = java.util.Collections.emptyList(); + renderState_ = 0; + etag_ = ""; + skaffoldVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Release(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Release( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uid_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotations_ = + com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 50: + { + 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 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (renderStartTime_ != null) { + subBuilder = renderStartTime_.toBuilder(); + } + renderStartTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(renderStartTime_); + renderStartTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (renderEndTime_ != null) { + subBuilder = renderEndTime_.toBuilder(); + } + renderEndTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(renderEndTime_); + renderEndTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + skaffoldConfigPath_ = s; + break; + } + case 82: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + buildArtifacts_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + buildArtifacts_.add( + input.readMessage( + com.google.cloud.deploy.v1.BuildArtifact.parser(), extensionRegistry)); + break; + } + case 90: + { + com.google.cloud.deploy.v1.DeliveryPipeline.Builder subBuilder = null; + if (deliveryPipelineSnapshot_ != null) { + subBuilder = deliveryPipelineSnapshot_.toBuilder(); + } + deliveryPipelineSnapshot_ = + input.readMessage( + com.google.cloud.deploy.v1.DeliveryPipeline.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deliveryPipelineSnapshot_); + deliveryPipelineSnapshot_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + targetSnapshots_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + targetSnapshots_.add( + input.readMessage(com.google.cloud.deploy.v1.Target.parser(), extensionRegistry)); + break; + } + case 104: + { + int rawValue = input.readEnum(); + + renderState_ = rawValue; + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + skaffoldConfigUri_ = s; + break; + } + case 154: + { + java.lang.String s = input.readStringRequireUtf8(); + + skaffoldVersion_ = s; + break; + } + case 162: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + targetArtifacts_ = + com.google.protobuf.MapField.newMapField( + TargetArtifactsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000010; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.deploy.v1.TargetArtifact> + targetArtifacts__ = + input.readMessage( + TargetArtifactsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + targetArtifacts_ + .getMutableMap() + .put(targetArtifacts__.getKey(), targetArtifacts__.getValue()); + break; + } + case 178: + { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + targetRenders_ = + com.google.protobuf.MapField.newMapField( + TargetRendersDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000020; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.deploy.v1.Release.TargetRender> + targetRenders__ = + input.readMessage( + TargetRendersDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + targetRenders_ + .getMutableMap() + .put(targetRenders__.getKey(), targetRenders__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) != 0)) { + buildArtifacts_ = java.util.Collections.unmodifiableList(buildArtifacts_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + targetSnapshots_ = java.util.Collections.unmodifiableList(targetSnapshots_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetAnnotations(); + case 5: + return internalGetLabels(); + case 20: + return internalGetTargetArtifacts(); + case 22: + return internalGetTargetRenders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Release.class, + com.google.cloud.deploy.v1.Release.Builder.class); + } + + /** + * + * + *
+   * Valid states of the render operation.
+   * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.Release.RenderState} + */ + public enum RenderState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The render state is unspecified.
+     * 
+ * + * RENDER_STATE_UNSPECIFIED = 0; + */ + RENDER_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * All rendering operations have completed successfully.
+     * 
+ * + * SUCCEEDED = 1; + */ + SUCCEEDED(1), + /** + * + * + *
+     * All rendering operations have completed, and one or more have failed.
+     * 
+ * + * FAILED = 2; + */ + FAILED(2), + /** + * + * + *
+     * Rendering has started and is not complete.
+     * 
+ * + * IN_PROGRESS = 3; + */ + IN_PROGRESS(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The render state is unspecified.
+     * 
+ * + * RENDER_STATE_UNSPECIFIED = 0; + */ + public static final int RENDER_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * All rendering operations have completed successfully.
+     * 
+ * + * SUCCEEDED = 1; + */ + public static final int SUCCEEDED_VALUE = 1; + /** + * + * + *
+     * All rendering operations have completed, and one or more have failed.
+     * 
+ * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + /** + * + * + *
+     * Rendering has started and is not complete.
+     * 
+ * + * IN_PROGRESS = 3; + */ + public static final int IN_PROGRESS_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 RenderState 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 RenderState forNumber(int value) { + switch (value) { + case 0: + return RENDER_STATE_UNSPECIFIED; + case 1: + return SUCCEEDED; + case 2: + return FAILED; + case 3: + return IN_PROGRESS; + 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 RenderState findValueByNumber(int number) { + return RenderState.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.deploy.v1.Release.getDescriptor().getEnumTypes().get(0); + } + + private static final RenderState[] VALUES = values(); + + public static RenderState 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 RenderState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.Release.RenderState) + } + + public interface TargetRenderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Release.TargetRender) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to
+     * render the manifest for this target. Format is
+     * `projects/{project}/locations/{location}/builds/{build}`.
+     * 
+ * + * + * string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The renderingBuild. + */ + java.lang.String getRenderingBuild(); + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to
+     * render the manifest for this target. Format is
+     * `projects/{project}/locations/{location}/builds/{build}`.
+     * 
+ * + * + * string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for renderingBuild. + */ + com.google.protobuf.ByteString getRenderingBuildBytes(); + + /** + * + * + *
+     * Output only. Current state of the render operation for this Target.
+     * 
+ * + * + * .google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for renderingState. + */ + int getRenderingStateValue(); + /** + * + * + *
+     * Output only. Current state of the render operation for this Target.
+     * 
+ * + * + * .google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderingState. + */ + com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState getRenderingState(); + } + /** + * + * + *
+   * Details of rendering for a single target.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Release.TargetRender} + */ + public static final class TargetRender extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Release.TargetRender) + TargetRenderOrBuilder { + private static final long serialVersionUID = 0L; + // Use TargetRender.newBuilder() to construct. + private TargetRender(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TargetRender() { + renderingBuild_ = ""; + renderingState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TargetRender(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TargetRender( + 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(); + + renderingBuild_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + renderingState_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_TargetRender_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_TargetRender_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Release.TargetRender.class, + com.google.cloud.deploy.v1.Release.TargetRender.Builder.class); + } + + /** + * + * + *
+     * Valid states of the render operation.
+     * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.Release.TargetRender.TargetRenderState} + */ + public enum TargetRenderState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The render operation state is unspecified.
+       * 
+ * + * TARGET_RENDER_STATE_UNSPECIFIED = 0; + */ + TARGET_RENDER_STATE_UNSPECIFIED(0), + /** + * + * + *
+       * The render operation has completed successfully.
+       * 
+ * + * SUCCEEDED = 1; + */ + SUCCEEDED(1), + /** + * + * + *
+       * The render operation has failed.
+       * 
+ * + * FAILED = 2; + */ + FAILED(2), + /** + * + * + *
+       * The render operation is in progress.
+       * 
+ * + * IN_PROGRESS = 3; + */ + IN_PROGRESS(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The render operation state is unspecified.
+       * 
+ * + * TARGET_RENDER_STATE_UNSPECIFIED = 0; + */ + public static final int TARGET_RENDER_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The render operation has completed successfully.
+       * 
+ * + * SUCCEEDED = 1; + */ + public static final int SUCCEEDED_VALUE = 1; + /** + * + * + *
+       * The render operation has failed.
+       * 
+ * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + /** + * + * + *
+       * The render operation is in progress.
+       * 
+ * + * IN_PROGRESS = 3; + */ + public static final int IN_PROGRESS_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 TargetRenderState 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 TargetRenderState forNumber(int value) { + switch (value) { + case 0: + return TARGET_RENDER_STATE_UNSPECIFIED; + case 1: + return SUCCEEDED; + case 2: + return FAILED; + case 3: + return IN_PROGRESS; + 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 TargetRenderState findValueByNumber(int number) { + return TargetRenderState.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.deploy.v1.Release.TargetRender.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TargetRenderState[] VALUES = values(); + + public static TargetRenderState 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 TargetRenderState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.Release.TargetRender.TargetRenderState) + } + + public static final int RENDERING_BUILD_FIELD_NUMBER = 1; + private volatile java.lang.Object renderingBuild_; + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to
+     * render the manifest for this target. Format is
+     * `projects/{project}/locations/{location}/builds/{build}`.
+     * 
+ * + * + * string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The renderingBuild. + */ + @java.lang.Override + public java.lang.String getRenderingBuild() { + java.lang.Object ref = renderingBuild_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + renderingBuild_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to
+     * render the manifest for this target. Format is
+     * `projects/{project}/locations/{location}/builds/{build}`.
+     * 
+ * + * + * string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for renderingBuild. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRenderingBuildBytes() { + java.lang.Object ref = renderingBuild_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + renderingBuild_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RENDERING_STATE_FIELD_NUMBER = 2; + private int renderingState_; + /** + * + * + *
+     * Output only. Current state of the render operation for this Target.
+     * 
+ * + * + * .google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for renderingState. + */ + @java.lang.Override + public int getRenderingStateValue() { + return renderingState_; + } + /** + * + * + *
+     * Output only. Current state of the render operation for this Target.
+     * 
+ * + * + * .google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderingState. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState getRenderingState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState result = + com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState.valueOf( + renderingState_); + return result == null + ? com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState.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 (!getRenderingBuildBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, renderingBuild_); + } + if (renderingState_ + != com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState + .TARGET_RENDER_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, renderingState_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getRenderingBuildBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, renderingBuild_); + } + if (renderingState_ + != com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState + .TARGET_RENDER_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, renderingState_); + } + 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.deploy.v1.Release.TargetRender)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Release.TargetRender other = + (com.google.cloud.deploy.v1.Release.TargetRender) obj; + + if (!getRenderingBuild().equals(other.getRenderingBuild())) return false; + if (renderingState_ != other.renderingState_) 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) + RENDERING_BUILD_FIELD_NUMBER; + hash = (53 * hash) + getRenderingBuild().hashCode(); + hash = (37 * hash) + RENDERING_STATE_FIELD_NUMBER; + hash = (53 * hash) + renderingState_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Release.TargetRender parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Release.TargetRender 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.deploy.v1.Release.TargetRender parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Release.TargetRender parseFrom( + 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.deploy.v1.Release.TargetRender parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Release.TargetRender parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Release.TargetRender parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Release.TargetRender parseFrom( + java.io.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.deploy.v1.Release.TargetRender parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Release.TargetRender parseDelimitedFrom( + java.io.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.deploy.v1.Release.TargetRender parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Release.TargetRender parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.Release.TargetRender prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Details of rendering for a single target.
+     * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Release.TargetRender} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Release.TargetRender) + com.google.cloud.deploy.v1.Release.TargetRenderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_TargetRender_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_TargetRender_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Release.TargetRender.class, + com.google.cloud.deploy.v1.Release.TargetRender.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Release.TargetRender.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(); + renderingBuild_ = ""; + + renderingState_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_TargetRender_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Release.TargetRender getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Release.TargetRender.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Release.TargetRender build() { + com.google.cloud.deploy.v1.Release.TargetRender result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Release.TargetRender buildPartial() { + com.google.cloud.deploy.v1.Release.TargetRender result = + new com.google.cloud.deploy.v1.Release.TargetRender(this); + result.renderingBuild_ = renderingBuild_; + result.renderingState_ = renderingState_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.Release.TargetRender) { + return mergeFrom((com.google.cloud.deploy.v1.Release.TargetRender) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Release.TargetRender other) { + if (other == com.google.cloud.deploy.v1.Release.TargetRender.getDefaultInstance()) + return this; + if (!other.getRenderingBuild().isEmpty()) { + renderingBuild_ = other.renderingBuild_; + onChanged(); + } + if (other.renderingState_ != 0) { + setRenderingStateValue(other.getRenderingStateValue()); + } + 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.deploy.v1.Release.TargetRender parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.deploy.v1.Release.TargetRender) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object renderingBuild_ = ""; + /** + * + * + *
+       * Output only. The resource name of the Cloud Build `Build` object that is used to
+       * render the manifest for this target. Format is
+       * `projects/{project}/locations/{location}/builds/{build}`.
+       * 
+ * + * + * string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The renderingBuild. + */ + public java.lang.String getRenderingBuild() { + java.lang.Object ref = renderingBuild_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + renderingBuild_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. The resource name of the Cloud Build `Build` object that is used to
+       * render the manifest for this target. Format is
+       * `projects/{project}/locations/{location}/builds/{build}`.
+       * 
+ * + * + * string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for renderingBuild. + */ + public com.google.protobuf.ByteString getRenderingBuildBytes() { + java.lang.Object ref = renderingBuild_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + renderingBuild_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. The resource name of the Cloud Build `Build` object that is used to
+       * render the manifest for this target. Format is
+       * `projects/{project}/locations/{location}/builds/{build}`.
+       * 
+ * + * + * string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The renderingBuild to set. + * @return This builder for chaining. + */ + public Builder setRenderingBuild(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + renderingBuild_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The resource name of the Cloud Build `Build` object that is used to
+       * render the manifest for this target. Format is
+       * `projects/{project}/locations/{location}/builds/{build}`.
+       * 
+ * + * + * string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRenderingBuild() { + + renderingBuild_ = getDefaultInstance().getRenderingBuild(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The resource name of the Cloud Build `Build` object that is used to
+       * render the manifest for this target. Format is
+       * `projects/{project}/locations/{location}/builds/{build}`.
+       * 
+ * + * + * string rendering_build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for renderingBuild to set. + * @return This builder for chaining. + */ + public Builder setRenderingBuildBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + renderingBuild_ = value; + onChanged(); + return this; + } + + private int renderingState_ = 0; + /** + * + * + *
+       * Output only. Current state of the render operation for this Target.
+       * 
+ * + * + * .google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for renderingState. + */ + @java.lang.Override + public int getRenderingStateValue() { + return renderingState_; + } + /** + * + * + *
+       * Output only. Current state of the render operation for this Target.
+       * 
+ * + * + * .google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for renderingState to set. + * @return This builder for chaining. + */ + public Builder setRenderingStateValue(int value) { + + renderingState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Current state of the render operation for this Target.
+       * 
+ * + * + * .google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderingState. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState getRenderingState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState result = + com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState.valueOf( + renderingState_); + return result == null + ? com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Output only. Current state of the render operation for this Target.
+       * 
+ * + * + * .google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The renderingState to set. + * @return This builder for chaining. + */ + public Builder setRenderingState( + com.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState value) { + if (value == null) { + throw new NullPointerException(); + } + + renderingState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Current state of the render operation for this Target.
+       * 
+ * + * + * .google.cloud.deploy.v1.Release.TargetRender.TargetRenderState rendering_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRenderingState() { + + renderingState_ = 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.deploy.v1.Release.TargetRender) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Release.TargetRender) + private static final com.google.cloud.deploy.v1.Release.TargetRender DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Release.TargetRender(); + } + + public static com.google.cloud.deploy.v1.Release.TargetRender getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TargetRender parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TargetRender(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.deploy.v1.Release.TargetRender getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Optional. Name of the `Release`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+   * Optional. Name of the `Release`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 UID_FIELD_NUMBER = 2; + private volatile java.lang.Object uid_; + /** + * + * + *
+   * Output only. Unique identifier of the `Release`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Unique identifier of the `Release`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Description of the `Release`. Max length is 255 characters.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Description of the `Release`. Max length is 255 characters.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 4; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @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 CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time at which the `Release` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the `Release` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time at which the `Release` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int RENDER_START_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp renderStartTime_; + /** + * + * + *
+   * Output only. Time at which the render began.
+   * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the renderStartTime field is set. + */ + @java.lang.Override + public boolean hasRenderStartTime() { + return renderStartTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the render began.
+   * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderStartTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRenderStartTime() { + return renderStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : renderStartTime_; + } + /** + * + * + *
+   * Output only. Time at which the render began.
+   * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRenderStartTimeOrBuilder() { + return getRenderStartTime(); + } + + public static final int RENDER_END_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp renderEndTime_; + /** + * + * + *
+   * Output only. Time at which the render completed.
+   * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the renderEndTime field is set. + */ + @java.lang.Override + public boolean hasRenderEndTime() { + return renderEndTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the render completed.
+   * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderEndTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRenderEndTime() { + return renderEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : renderEndTime_; + } + /** + * + * + *
+   * Output only. Time at which the render completed.
+   * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRenderEndTimeOrBuilder() { + return getRenderEndTime(); + } + + public static final int SKAFFOLD_CONFIG_URI_FIELD_NUMBER = 17; + private volatile java.lang.Object skaffoldConfigUri_; + /** + * + * + *
+   * Cloud Storage URI of tar.gz archive containing Skaffold configuration.
+   * 
+ * + * string skaffold_config_uri = 17; + * + * @return The skaffoldConfigUri. + */ + @java.lang.Override + public java.lang.String getSkaffoldConfigUri() { + java.lang.Object ref = skaffoldConfigUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skaffoldConfigUri_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud Storage URI of tar.gz archive containing Skaffold configuration.
+   * 
+ * + * string skaffold_config_uri = 17; + * + * @return The bytes for skaffoldConfigUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSkaffoldConfigUriBytes() { + java.lang.Object ref = skaffoldConfigUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skaffoldConfigUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SKAFFOLD_CONFIG_PATH_FIELD_NUMBER = 9; + private volatile java.lang.Object skaffoldConfigPath_; + /** + * + * + *
+   * Filepath of the Skaffold config inside of the config URI.
+   * 
+ * + * string skaffold_config_path = 9; + * + * @return The skaffoldConfigPath. + */ + @java.lang.Override + public java.lang.String getSkaffoldConfigPath() { + java.lang.Object ref = skaffoldConfigPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skaffoldConfigPath_ = s; + return s; + } + } + /** + * + * + *
+   * Filepath of the Skaffold config inside of the config URI.
+   * 
+ * + * string skaffold_config_path = 9; + * + * @return The bytes for skaffoldConfigPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSkaffoldConfigPathBytes() { + java.lang.Object ref = skaffoldConfigPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skaffoldConfigPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILD_ARTIFACTS_FIELD_NUMBER = 10; + private java.util.List buildArtifacts_; + /** + * + * + *
+   * List of artifacts to pass through to Skaffold command.
+   * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + @java.lang.Override + public java.util.List getBuildArtifactsList() { + return buildArtifacts_; + } + /** + * + * + *
+   * List of artifacts to pass through to Skaffold command.
+   * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + @java.lang.Override + public java.util.List + getBuildArtifactsOrBuilderList() { + return buildArtifacts_; + } + /** + * + * + *
+   * List of artifacts to pass through to Skaffold command.
+   * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + @java.lang.Override + public int getBuildArtifactsCount() { + return buildArtifacts_.size(); + } + /** + * + * + *
+   * List of artifacts to pass through to Skaffold command.
+   * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.BuildArtifact getBuildArtifacts(int index) { + return buildArtifacts_.get(index); + } + /** + * + * + *
+   * List of artifacts to pass through to Skaffold command.
+   * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.BuildArtifactOrBuilder getBuildArtifactsOrBuilder(int index) { + return buildArtifacts_.get(index); + } + + public static final int DELIVERY_PIPELINE_SNAPSHOT_FIELD_NUMBER = 11; + private com.google.cloud.deploy.v1.DeliveryPipeline deliveryPipelineSnapshot_; + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline taken at release creation time.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deliveryPipelineSnapshot field is set. + */ + @java.lang.Override + public boolean hasDeliveryPipelineSnapshot() { + return deliveryPipelineSnapshot_ != null; + } + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline taken at release creation time.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deliveryPipelineSnapshot. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipelineSnapshot() { + return deliveryPipelineSnapshot_ == null + ? com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance() + : deliveryPipelineSnapshot_; + } + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline taken at release creation time.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder + getDeliveryPipelineSnapshotOrBuilder() { + return getDeliveryPipelineSnapshot(); + } + + public static final int TARGET_SNAPSHOTS_FIELD_NUMBER = 12; + private java.util.List targetSnapshots_; + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getTargetSnapshotsList() { + return targetSnapshots_; + } + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getTargetSnapshotsOrBuilderList() { + return targetSnapshots_; + } + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getTargetSnapshotsCount() { + return targetSnapshots_.size(); + } + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Target getTargetSnapshots(int index) { + return targetSnapshots_.get(index); + } + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetOrBuilder getTargetSnapshotsOrBuilder(int index) { + return targetSnapshots_.get(index); + } + + public static final int RENDER_STATE_FIELD_NUMBER = 13; + private int renderState_; + /** + * + * + *
+   * Output only. Current state of the render operation.
+   * 
+ * + * + * .google.cloud.deploy.v1.Release.RenderState render_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for renderState. + */ + @java.lang.Override + public int getRenderStateValue() { + return renderState_; + } + /** + * + * + *
+   * Output only. Current state of the render operation.
+   * 
+ * + * + * .google.cloud.deploy.v1.Release.RenderState render_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderState. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release.RenderState getRenderState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Release.RenderState result = + com.google.cloud.deploy.v1.Release.RenderState.valueOf(renderState_); + return result == null ? com.google.cloud.deploy.v1.Release.RenderState.UNRECOGNIZED : result; + } + + public static final int ETAG_FIELD_NUMBER = 16; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 16; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 16; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SKAFFOLD_VERSION_FIELD_NUMBER = 19; + private volatile java.lang.Object skaffoldVersion_; + /** + * + * + *
+   * The Skaffold version to use when operating on this release, such as
+   * "1.20.0". Not all versions are valid; Google Cloud Deploy supports a
+   * specific set of versions.
+   * If unset, the most recent supported Skaffold version will be used.
+   * 
+ * + * string skaffold_version = 19; + * + * @return The skaffoldVersion. + */ + @java.lang.Override + public java.lang.String getSkaffoldVersion() { + java.lang.Object ref = skaffoldVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skaffoldVersion_ = s; + return s; + } + } + /** + * + * + *
+   * The Skaffold version to use when operating on this release, such as
+   * "1.20.0". Not all versions are valid; Google Cloud Deploy supports a
+   * specific set of versions.
+   * If unset, the most recent supported Skaffold version will be used.
+   * 
+ * + * string skaffold_version = 19; + * + * @return The bytes for skaffoldVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSkaffoldVersionBytes() { + java.lang.Object ref = skaffoldVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skaffoldVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_ARTIFACTS_FIELD_NUMBER = 20; + + private static final class TargetArtifactsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.deploy.v1.TargetArtifact> + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_TargetArtifactsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.deploy.v1.TargetArtifact.getDefaultInstance()); + } + + private com.google.protobuf.MapField + targetArtifacts_; + + private com.google.protobuf.MapField + internalGetTargetArtifacts() { + if (targetArtifacts_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TargetArtifactsDefaultEntryHolder.defaultEntry); + } + return targetArtifacts_; + } + + public int getTargetArtifactsCount() { + return internalGetTargetArtifacts().getMap().size(); + } + /** + * + * + *
+   * Output only. Map from target ID to the target artifacts created
+   * during the render operation.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsTargetArtifacts(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetTargetArtifacts().getMap().containsKey(key); + } + /** Use {@link #getTargetArtifactsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getTargetArtifacts() { + return getTargetArtifactsMap(); + } + /** + * + * + *
+   * Output only. Map from target ID to the target artifacts created
+   * during the render operation.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getTargetArtifactsMap() { + return internalGetTargetArtifacts().getMap(); + } + /** + * + * + *
+   * Output only. Map from target ID to the target artifacts created
+   * during the render operation.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetArtifact getTargetArtifactsOrDefault( + java.lang.String key, com.google.cloud.deploy.v1.TargetArtifact defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetTargetArtifacts().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. Map from target ID to the target artifacts created
+   * during the render operation.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetArtifact getTargetArtifactsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetTargetArtifacts().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TARGET_RENDERS_FIELD_NUMBER = 22; + + private static final class TargetRendersDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.deploy.v1.Release.TargetRender> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_TargetRendersEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.deploy.v1.Release.TargetRender.getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.deploy.v1.Release.TargetRender> + targetRenders_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.deploy.v1.Release.TargetRender> + internalGetTargetRenders() { + if (targetRenders_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TargetRendersDefaultEntryHolder.defaultEntry); + } + return targetRenders_; + } + + public int getTargetRendersCount() { + return internalGetTargetRenders().getMap().size(); + } + /** + * + * + *
+   * Output only. Map from target ID to details of the render operation for that target.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsTargetRenders(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetTargetRenders().getMap().containsKey(key); + } + /** Use {@link #getTargetRendersMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getTargetRenders() { + return getTargetRendersMap(); + } + /** + * + * + *
+   * Output only. Map from target ID to details of the render operation for that target.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getTargetRendersMap() { + return internalGetTargetRenders().getMap(); + } + /** + * + * + *
+   * Output only. Map from target ID to details of the render operation for that target.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release.TargetRender getTargetRendersOrDefault( + java.lang.String key, com.google.cloud.deploy.v1.Release.TargetRender defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetTargetRenders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. Map from target ID to details of the render operation for that target.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release.TargetRender getTargetRendersOrThrow( + java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetTargetRenders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getUidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 4); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (renderStartTime_ != null) { + output.writeMessage(7, getRenderStartTime()); + } + if (renderEndTime_ != null) { + output.writeMessage(8, getRenderEndTime()); + } + if (!getSkaffoldConfigPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, skaffoldConfigPath_); + } + for (int i = 0; i < buildArtifacts_.size(); i++) { + output.writeMessage(10, buildArtifacts_.get(i)); + } + if (deliveryPipelineSnapshot_ != null) { + output.writeMessage(11, getDeliveryPipelineSnapshot()); + } + for (int i = 0; i < targetSnapshots_.size(); i++) { + output.writeMessage(12, targetSnapshots_.get(i)); + } + if (renderState_ + != com.google.cloud.deploy.v1.Release.RenderState.RENDER_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(13, renderState_); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, etag_); + } + if (!getSkaffoldConfigUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, skaffoldConfigUri_); + } + if (!getSkaffoldVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, skaffoldVersion_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTargetArtifacts(), TargetArtifactsDefaultEntryHolder.defaultEntry, 20); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTargetRenders(), TargetRendersDefaultEntryHolder.defaultEntry, 22); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getUidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, annotations__); + } + 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(5, labels__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (renderStartTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getRenderStartTime()); + } + if (renderEndTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getRenderEndTime()); + } + if (!getSkaffoldConfigPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, skaffoldConfigPath_); + } + for (int i = 0; i < buildArtifacts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, buildArtifacts_.get(i)); + } + if (deliveryPipelineSnapshot_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, getDeliveryPipelineSnapshot()); + } + for (int i = 0; i < targetSnapshots_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, targetSnapshots_.get(i)); + } + if (renderState_ + != com.google.cloud.deploy.v1.Release.RenderState.RENDER_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, renderState_); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, etag_); + } + if (!getSkaffoldConfigUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, skaffoldConfigUri_); + } + if (!getSkaffoldVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, skaffoldVersion_); + } + for (java.util.Map.Entry entry : + internalGetTargetArtifacts().getMap().entrySet()) { + com.google.protobuf.MapEntry + targetArtifacts__ = + TargetArtifactsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, targetArtifacts__); + } + for (java.util.Map.Entry + entry : internalGetTargetRenders().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.deploy.v1.Release.TargetRender> + targetRenders__ = + TargetRendersDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, targetRenders__); + } + 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.deploy.v1.Release)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Release other = (com.google.cloud.deploy.v1.Release) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasRenderStartTime() != other.hasRenderStartTime()) return false; + if (hasRenderStartTime()) { + if (!getRenderStartTime().equals(other.getRenderStartTime())) return false; + } + if (hasRenderEndTime() != other.hasRenderEndTime()) return false; + if (hasRenderEndTime()) { + if (!getRenderEndTime().equals(other.getRenderEndTime())) return false; + } + if (!getSkaffoldConfigUri().equals(other.getSkaffoldConfigUri())) return false; + if (!getSkaffoldConfigPath().equals(other.getSkaffoldConfigPath())) return false; + if (!getBuildArtifactsList().equals(other.getBuildArtifactsList())) return false; + if (hasDeliveryPipelineSnapshot() != other.hasDeliveryPipelineSnapshot()) return false; + if (hasDeliveryPipelineSnapshot()) { + if (!getDeliveryPipelineSnapshot().equals(other.getDeliveryPipelineSnapshot())) return false; + } + if (!getTargetSnapshotsList().equals(other.getTargetSnapshotsList())) return false; + if (renderState_ != other.renderState_) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getSkaffoldVersion().equals(other.getSkaffoldVersion())) return false; + if (!internalGetTargetArtifacts().equals(other.internalGetTargetArtifacts())) return false; + if (!internalGetTargetRenders().equals(other.internalGetTargetRenders())) 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) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasRenderStartTime()) { + hash = (37 * hash) + RENDER_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRenderStartTime().hashCode(); + } + if (hasRenderEndTime()) { + hash = (37 * hash) + RENDER_END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRenderEndTime().hashCode(); + } + hash = (37 * hash) + SKAFFOLD_CONFIG_URI_FIELD_NUMBER; + hash = (53 * hash) + getSkaffoldConfigUri().hashCode(); + hash = (37 * hash) + SKAFFOLD_CONFIG_PATH_FIELD_NUMBER; + hash = (53 * hash) + getSkaffoldConfigPath().hashCode(); + if (getBuildArtifactsCount() > 0) { + hash = (37 * hash) + BUILD_ARTIFACTS_FIELD_NUMBER; + hash = (53 * hash) + getBuildArtifactsList().hashCode(); + } + if (hasDeliveryPipelineSnapshot()) { + hash = (37 * hash) + DELIVERY_PIPELINE_SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getDeliveryPipelineSnapshot().hashCode(); + } + if (getTargetSnapshotsCount() > 0) { + hash = (37 * hash) + TARGET_SNAPSHOTS_FIELD_NUMBER; + hash = (53 * hash) + getTargetSnapshotsList().hashCode(); + } + hash = (37 * hash) + RENDER_STATE_FIELD_NUMBER; + hash = (53 * hash) + renderState_; + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + SKAFFOLD_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getSkaffoldVersion().hashCode(); + if (!internalGetTargetArtifacts().getMap().isEmpty()) { + hash = (37 * hash) + TARGET_ARTIFACTS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTargetArtifacts().hashCode(); + } + if (!internalGetTargetRenders().getMap().isEmpty()) { + hash = (37 * hash) + TARGET_RENDERS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTargetRenders().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Release parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Release 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.deploy.v1.Release parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Release parseFrom( + 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.deploy.v1.Release parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Release parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Release parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Release parseFrom( + java.io.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.deploy.v1.Release parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Release parseDelimitedFrom( + java.io.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.deploy.v1.Release parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Release parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.Release prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 `Release` resource in the Google Cloud Deploy API.
+   * A `Release` defines a specific Skaffold configuration instance
+   * that can be deployed.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Release} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Release) + com.google.cloud.deploy.v1.ReleaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetAnnotations(); + case 5: + return internalGetLabels(); + case 20: + return internalGetTargetArtifacts(); + case 22: + return internalGetTargetRenders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableAnnotations(); + case 5: + return internalGetMutableLabels(); + case 20: + return internalGetMutableTargetArtifacts(); + case 22: + return internalGetMutableTargetRenders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Release.class, + com.google.cloud.deploy.v1.Release.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Release.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBuildArtifactsFieldBuilder(); + getTargetSnapshotsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + uid_ = ""; + + description_ = ""; + + internalGetMutableAnnotations().clear(); + internalGetMutableLabels().clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (renderStartTimeBuilder_ == null) { + renderStartTime_ = null; + } else { + renderStartTime_ = null; + renderStartTimeBuilder_ = null; + } + if (renderEndTimeBuilder_ == null) { + renderEndTime_ = null; + } else { + renderEndTime_ = null; + renderEndTimeBuilder_ = null; + } + skaffoldConfigUri_ = ""; + + skaffoldConfigPath_ = ""; + + if (buildArtifactsBuilder_ == null) { + buildArtifacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + buildArtifactsBuilder_.clear(); + } + if (deliveryPipelineSnapshotBuilder_ == null) { + deliveryPipelineSnapshot_ = null; + } else { + deliveryPipelineSnapshot_ = null; + deliveryPipelineSnapshotBuilder_ = null; + } + if (targetSnapshotsBuilder_ == null) { + targetSnapshots_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + targetSnapshotsBuilder_.clear(); + } + renderState_ = 0; + + etag_ = ""; + + skaffoldVersion_ = ""; + + internalGetMutableTargetArtifacts().clear(); + internalGetMutableTargetRenders().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Release_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Release getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Release.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Release build() { + com.google.cloud.deploy.v1.Release result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Release buildPartial() { + com.google.cloud.deploy.v1.Release result = new com.google.cloud.deploy.v1.Release(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.uid_ = uid_; + result.description_ = description_; + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (renderStartTimeBuilder_ == null) { + result.renderStartTime_ = renderStartTime_; + } else { + result.renderStartTime_ = renderStartTimeBuilder_.build(); + } + if (renderEndTimeBuilder_ == null) { + result.renderEndTime_ = renderEndTime_; + } else { + result.renderEndTime_ = renderEndTimeBuilder_.build(); + } + result.skaffoldConfigUri_ = skaffoldConfigUri_; + result.skaffoldConfigPath_ = skaffoldConfigPath_; + if (buildArtifactsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + buildArtifacts_ = java.util.Collections.unmodifiableList(buildArtifacts_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.buildArtifacts_ = buildArtifacts_; + } else { + result.buildArtifacts_ = buildArtifactsBuilder_.build(); + } + if (deliveryPipelineSnapshotBuilder_ == null) { + result.deliveryPipelineSnapshot_ = deliveryPipelineSnapshot_; + } else { + result.deliveryPipelineSnapshot_ = deliveryPipelineSnapshotBuilder_.build(); + } + if (targetSnapshotsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + targetSnapshots_ = java.util.Collections.unmodifiableList(targetSnapshots_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.targetSnapshots_ = targetSnapshots_; + } else { + result.targetSnapshots_ = targetSnapshotsBuilder_.build(); + } + result.renderState_ = renderState_; + result.etag_ = etag_; + result.skaffoldVersion_ = skaffoldVersion_; + result.targetArtifacts_ = internalGetTargetArtifacts(); + result.targetArtifacts_.makeImmutable(); + result.targetRenders_ = internalGetTargetRenders(); + result.targetRenders_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.Release) { + return mergeFrom((com.google.cloud.deploy.v1.Release) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Release other) { + if (other == com.google.cloud.deploy.v1.Release.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasRenderStartTime()) { + mergeRenderStartTime(other.getRenderStartTime()); + } + if (other.hasRenderEndTime()) { + mergeRenderEndTime(other.getRenderEndTime()); + } + if (!other.getSkaffoldConfigUri().isEmpty()) { + skaffoldConfigUri_ = other.skaffoldConfigUri_; + onChanged(); + } + if (!other.getSkaffoldConfigPath().isEmpty()) { + skaffoldConfigPath_ = other.skaffoldConfigPath_; + onChanged(); + } + if (buildArtifactsBuilder_ == null) { + if (!other.buildArtifacts_.isEmpty()) { + if (buildArtifacts_.isEmpty()) { + buildArtifacts_ = other.buildArtifacts_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureBuildArtifactsIsMutable(); + buildArtifacts_.addAll(other.buildArtifacts_); + } + onChanged(); + } + } else { + if (!other.buildArtifacts_.isEmpty()) { + if (buildArtifactsBuilder_.isEmpty()) { + buildArtifactsBuilder_.dispose(); + buildArtifactsBuilder_ = null; + buildArtifacts_ = other.buildArtifacts_; + bitField0_ = (bitField0_ & ~0x00000004); + buildArtifactsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBuildArtifactsFieldBuilder() + : null; + } else { + buildArtifactsBuilder_.addAllMessages(other.buildArtifacts_); + } + } + } + if (other.hasDeliveryPipelineSnapshot()) { + mergeDeliveryPipelineSnapshot(other.getDeliveryPipelineSnapshot()); + } + if (targetSnapshotsBuilder_ == null) { + if (!other.targetSnapshots_.isEmpty()) { + if (targetSnapshots_.isEmpty()) { + targetSnapshots_ = other.targetSnapshots_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTargetSnapshotsIsMutable(); + targetSnapshots_.addAll(other.targetSnapshots_); + } + onChanged(); + } + } else { + if (!other.targetSnapshots_.isEmpty()) { + if (targetSnapshotsBuilder_.isEmpty()) { + targetSnapshotsBuilder_.dispose(); + targetSnapshotsBuilder_ = null; + targetSnapshots_ = other.targetSnapshots_; + bitField0_ = (bitField0_ & ~0x00000008); + targetSnapshotsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTargetSnapshotsFieldBuilder() + : null; + } else { + targetSnapshotsBuilder_.addAllMessages(other.targetSnapshots_); + } + } + } + if (other.renderState_ != 0) { + setRenderStateValue(other.getRenderStateValue()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + if (!other.getSkaffoldVersion().isEmpty()) { + skaffoldVersion_ = other.skaffoldVersion_; + onChanged(); + } + internalGetMutableTargetArtifacts().mergeFrom(other.internalGetTargetArtifacts()); + internalGetMutableTargetRenders().mergeFrom(other.internalGetTargetRenders()); + 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.deploy.v1.Release parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.Release) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Optional. Name of the `Release`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Name of the `Release`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Name of the `Release`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. Name of the `Release`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of the `Release`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 uid_ = ""; + /** + * + * + *
+     * Output only. Unique identifier of the `Release`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier of the `Release`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier of the `Release`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `Release`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `Release`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Description of the `Release`. Max length is 255 characters.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Description of the `Release`. Max length is 255 characters.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Description of the `Release`. Max length is 255 characters.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the `Release`. Max length is 255 characters.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the `Release`. Max length is 255 characters.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged(); + ; + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the `Release` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the `Release` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the `Release` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Release` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Release` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Release` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Release` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the `Release` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the `Release` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_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> + 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 renderStartTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + renderStartTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the render began.
+     * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the renderStartTime field is set. + */ + public boolean hasRenderStartTime() { + return renderStartTimeBuilder_ != null || renderStartTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the render began.
+     * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderStartTime. + */ + public com.google.protobuf.Timestamp getRenderStartTime() { + if (renderStartTimeBuilder_ == null) { + return renderStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : renderStartTime_; + } else { + return renderStartTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the render began.
+     * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRenderStartTime(com.google.protobuf.Timestamp value) { + if (renderStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + renderStartTime_ = value; + onChanged(); + } else { + renderStartTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the render began.
+     * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRenderStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (renderStartTimeBuilder_ == null) { + renderStartTime_ = builderForValue.build(); + onChanged(); + } else { + renderStartTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the render began.
+     * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRenderStartTime(com.google.protobuf.Timestamp value) { + if (renderStartTimeBuilder_ == null) { + if (renderStartTime_ != null) { + renderStartTime_ = + com.google.protobuf.Timestamp.newBuilder(renderStartTime_) + .mergeFrom(value) + .buildPartial(); + } else { + renderStartTime_ = value; + } + onChanged(); + } else { + renderStartTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the render began.
+     * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRenderStartTime() { + if (renderStartTimeBuilder_ == null) { + renderStartTime_ = null; + onChanged(); + } else { + renderStartTime_ = null; + renderStartTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the render began.
+     * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getRenderStartTimeBuilder() { + + onChanged(); + return getRenderStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the render began.
+     * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRenderStartTimeOrBuilder() { + if (renderStartTimeBuilder_ != null) { + return renderStartTimeBuilder_.getMessageOrBuilder(); + } else { + return renderStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : renderStartTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the render began.
+     * 
+ * + * + * .google.protobuf.Timestamp render_start_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> + getRenderStartTimeFieldBuilder() { + if (renderStartTimeBuilder_ == null) { + renderStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRenderStartTime(), getParentForChildren(), isClean()); + renderStartTime_ = null; + } + return renderStartTimeBuilder_; + } + + private com.google.protobuf.Timestamp renderEndTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + renderEndTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the render completed.
+     * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the renderEndTime field is set. + */ + public boolean hasRenderEndTime() { + return renderEndTimeBuilder_ != null || renderEndTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the render completed.
+     * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderEndTime. + */ + public com.google.protobuf.Timestamp getRenderEndTime() { + if (renderEndTimeBuilder_ == null) { + return renderEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : renderEndTime_; + } else { + return renderEndTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the render completed.
+     * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRenderEndTime(com.google.protobuf.Timestamp value) { + if (renderEndTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + renderEndTime_ = value; + onChanged(); + } else { + renderEndTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the render completed.
+     * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRenderEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (renderEndTimeBuilder_ == null) { + renderEndTime_ = builderForValue.build(); + onChanged(); + } else { + renderEndTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the render completed.
+     * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRenderEndTime(com.google.protobuf.Timestamp value) { + if (renderEndTimeBuilder_ == null) { + if (renderEndTime_ != null) { + renderEndTime_ = + com.google.protobuf.Timestamp.newBuilder(renderEndTime_) + .mergeFrom(value) + .buildPartial(); + } else { + renderEndTime_ = value; + } + onChanged(); + } else { + renderEndTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the render completed.
+     * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRenderEndTime() { + if (renderEndTimeBuilder_ == null) { + renderEndTime_ = null; + onChanged(); + } else { + renderEndTime_ = null; + renderEndTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the render completed.
+     * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getRenderEndTimeBuilder() { + + onChanged(); + return getRenderEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the render completed.
+     * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRenderEndTimeOrBuilder() { + if (renderEndTimeBuilder_ != null) { + return renderEndTimeBuilder_.getMessageOrBuilder(); + } else { + return renderEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : renderEndTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the render completed.
+     * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRenderEndTimeFieldBuilder() { + if (renderEndTimeBuilder_ == null) { + renderEndTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRenderEndTime(), getParentForChildren(), isClean()); + renderEndTime_ = null; + } + return renderEndTimeBuilder_; + } + + private java.lang.Object skaffoldConfigUri_ = ""; + /** + * + * + *
+     * Cloud Storage URI of tar.gz archive containing Skaffold configuration.
+     * 
+ * + * string skaffold_config_uri = 17; + * + * @return The skaffoldConfigUri. + */ + public java.lang.String getSkaffoldConfigUri() { + java.lang.Object ref = skaffoldConfigUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skaffoldConfigUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud Storage URI of tar.gz archive containing Skaffold configuration.
+     * 
+ * + * string skaffold_config_uri = 17; + * + * @return The bytes for skaffoldConfigUri. + */ + public com.google.protobuf.ByteString getSkaffoldConfigUriBytes() { + java.lang.Object ref = skaffoldConfigUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skaffoldConfigUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud Storage URI of tar.gz archive containing Skaffold configuration.
+     * 
+ * + * string skaffold_config_uri = 17; + * + * @param value The skaffoldConfigUri to set. + * @return This builder for chaining. + */ + public Builder setSkaffoldConfigUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + skaffoldConfigUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud Storage URI of tar.gz archive containing Skaffold configuration.
+     * 
+ * + * string skaffold_config_uri = 17; + * + * @return This builder for chaining. + */ + public Builder clearSkaffoldConfigUri() { + + skaffoldConfigUri_ = getDefaultInstance().getSkaffoldConfigUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud Storage URI of tar.gz archive containing Skaffold configuration.
+     * 
+ * + * string skaffold_config_uri = 17; + * + * @param value The bytes for skaffoldConfigUri to set. + * @return This builder for chaining. + */ + public Builder setSkaffoldConfigUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + skaffoldConfigUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object skaffoldConfigPath_ = ""; + /** + * + * + *
+     * Filepath of the Skaffold config inside of the config URI.
+     * 
+ * + * string skaffold_config_path = 9; + * + * @return The skaffoldConfigPath. + */ + public java.lang.String getSkaffoldConfigPath() { + java.lang.Object ref = skaffoldConfigPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skaffoldConfigPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filepath of the Skaffold config inside of the config URI.
+     * 
+ * + * string skaffold_config_path = 9; + * + * @return The bytes for skaffoldConfigPath. + */ + public com.google.protobuf.ByteString getSkaffoldConfigPathBytes() { + java.lang.Object ref = skaffoldConfigPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skaffoldConfigPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filepath of the Skaffold config inside of the config URI.
+     * 
+ * + * string skaffold_config_path = 9; + * + * @param value The skaffoldConfigPath to set. + * @return This builder for chaining. + */ + public Builder setSkaffoldConfigPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + skaffoldConfigPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Filepath of the Skaffold config inside of the config URI.
+     * 
+ * + * string skaffold_config_path = 9; + * + * @return This builder for chaining. + */ + public Builder clearSkaffoldConfigPath() { + + skaffoldConfigPath_ = getDefaultInstance().getSkaffoldConfigPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Filepath of the Skaffold config inside of the config URI.
+     * 
+ * + * string skaffold_config_path = 9; + * + * @param value The bytes for skaffoldConfigPath to set. + * @return This builder for chaining. + */ + public Builder setSkaffoldConfigPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + skaffoldConfigPath_ = value; + onChanged(); + return this; + } + + private java.util.List buildArtifacts_ = + java.util.Collections.emptyList(); + + private void ensureBuildArtifactsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + buildArtifacts_ = + new java.util.ArrayList(buildArtifacts_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.BuildArtifact, + com.google.cloud.deploy.v1.BuildArtifact.Builder, + com.google.cloud.deploy.v1.BuildArtifactOrBuilder> + buildArtifactsBuilder_; + + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public java.util.List getBuildArtifactsList() { + if (buildArtifactsBuilder_ == null) { + return java.util.Collections.unmodifiableList(buildArtifacts_); + } else { + return buildArtifactsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public int getBuildArtifactsCount() { + if (buildArtifactsBuilder_ == null) { + return buildArtifacts_.size(); + } else { + return buildArtifactsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public com.google.cloud.deploy.v1.BuildArtifact getBuildArtifacts(int index) { + if (buildArtifactsBuilder_ == null) { + return buildArtifacts_.get(index); + } else { + return buildArtifactsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public Builder setBuildArtifacts(int index, com.google.cloud.deploy.v1.BuildArtifact value) { + if (buildArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBuildArtifactsIsMutable(); + buildArtifacts_.set(index, value); + onChanged(); + } else { + buildArtifactsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public Builder setBuildArtifacts( + int index, com.google.cloud.deploy.v1.BuildArtifact.Builder builderForValue) { + if (buildArtifactsBuilder_ == null) { + ensureBuildArtifactsIsMutable(); + buildArtifacts_.set(index, builderForValue.build()); + onChanged(); + } else { + buildArtifactsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public Builder addBuildArtifacts(com.google.cloud.deploy.v1.BuildArtifact value) { + if (buildArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBuildArtifactsIsMutable(); + buildArtifacts_.add(value); + onChanged(); + } else { + buildArtifactsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public Builder addBuildArtifacts(int index, com.google.cloud.deploy.v1.BuildArtifact value) { + if (buildArtifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBuildArtifactsIsMutable(); + buildArtifacts_.add(index, value); + onChanged(); + } else { + buildArtifactsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public Builder addBuildArtifacts( + com.google.cloud.deploy.v1.BuildArtifact.Builder builderForValue) { + if (buildArtifactsBuilder_ == null) { + ensureBuildArtifactsIsMutable(); + buildArtifacts_.add(builderForValue.build()); + onChanged(); + } else { + buildArtifactsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public Builder addBuildArtifacts( + int index, com.google.cloud.deploy.v1.BuildArtifact.Builder builderForValue) { + if (buildArtifactsBuilder_ == null) { + ensureBuildArtifactsIsMutable(); + buildArtifacts_.add(index, builderForValue.build()); + onChanged(); + } else { + buildArtifactsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public Builder addAllBuildArtifacts( + java.lang.Iterable values) { + if (buildArtifactsBuilder_ == null) { + ensureBuildArtifactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, buildArtifacts_); + onChanged(); + } else { + buildArtifactsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public Builder clearBuildArtifacts() { + if (buildArtifactsBuilder_ == null) { + buildArtifacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + buildArtifactsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public Builder removeBuildArtifacts(int index) { + if (buildArtifactsBuilder_ == null) { + ensureBuildArtifactsIsMutable(); + buildArtifacts_.remove(index); + onChanged(); + } else { + buildArtifactsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public com.google.cloud.deploy.v1.BuildArtifact.Builder getBuildArtifactsBuilder(int index) { + return getBuildArtifactsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public com.google.cloud.deploy.v1.BuildArtifactOrBuilder getBuildArtifactsOrBuilder(int index) { + if (buildArtifactsBuilder_ == null) { + return buildArtifacts_.get(index); + } else { + return buildArtifactsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public java.util.List + getBuildArtifactsOrBuilderList() { + if (buildArtifactsBuilder_ != null) { + return buildArtifactsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(buildArtifacts_); + } + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public com.google.cloud.deploy.v1.BuildArtifact.Builder addBuildArtifactsBuilder() { + return getBuildArtifactsFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.BuildArtifact.getDefaultInstance()); + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public com.google.cloud.deploy.v1.BuildArtifact.Builder addBuildArtifactsBuilder(int index) { + return getBuildArtifactsFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.BuildArtifact.getDefaultInstance()); + } + /** + * + * + *
+     * List of artifacts to pass through to Skaffold command.
+     * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + public java.util.List + getBuildArtifactsBuilderList() { + return getBuildArtifactsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.BuildArtifact, + com.google.cloud.deploy.v1.BuildArtifact.Builder, + com.google.cloud.deploy.v1.BuildArtifactOrBuilder> + getBuildArtifactsFieldBuilder() { + if (buildArtifactsBuilder_ == null) { + buildArtifactsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.BuildArtifact, + com.google.cloud.deploy.v1.BuildArtifact.Builder, + com.google.cloud.deploy.v1.BuildArtifactOrBuilder>( + buildArtifacts_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + buildArtifacts_ = null; + } + return buildArtifactsBuilder_; + } + + private com.google.cloud.deploy.v1.DeliveryPipeline deliveryPipelineSnapshot_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder> + deliveryPipelineSnapshotBuilder_; + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline taken at release creation time.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deliveryPipelineSnapshot field is set. + */ + public boolean hasDeliveryPipelineSnapshot() { + return deliveryPipelineSnapshotBuilder_ != null || deliveryPipelineSnapshot_ != null; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline taken at release creation time.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deliveryPipelineSnapshot. + */ + public com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipelineSnapshot() { + if (deliveryPipelineSnapshotBuilder_ == null) { + return deliveryPipelineSnapshot_ == null + ? com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance() + : deliveryPipelineSnapshot_; + } else { + return deliveryPipelineSnapshotBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline taken at release creation time.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeliveryPipelineSnapshot(com.google.cloud.deploy.v1.DeliveryPipeline value) { + if (deliveryPipelineSnapshotBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deliveryPipelineSnapshot_ = value; + onChanged(); + } else { + deliveryPipelineSnapshotBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline taken at release creation time.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeliveryPipelineSnapshot( + com.google.cloud.deploy.v1.DeliveryPipeline.Builder builderForValue) { + if (deliveryPipelineSnapshotBuilder_ == null) { + deliveryPipelineSnapshot_ = builderForValue.build(); + onChanged(); + } else { + deliveryPipelineSnapshotBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline taken at release creation time.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeliveryPipelineSnapshot( + com.google.cloud.deploy.v1.DeliveryPipeline value) { + if (deliveryPipelineSnapshotBuilder_ == null) { + if (deliveryPipelineSnapshot_ != null) { + deliveryPipelineSnapshot_ = + com.google.cloud.deploy.v1.DeliveryPipeline.newBuilder(deliveryPipelineSnapshot_) + .mergeFrom(value) + .buildPartial(); + } else { + deliveryPipelineSnapshot_ = value; + } + onChanged(); + } else { + deliveryPipelineSnapshotBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline taken at release creation time.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeliveryPipelineSnapshot() { + if (deliveryPipelineSnapshotBuilder_ == null) { + deliveryPipelineSnapshot_ = null; + onChanged(); + } else { + deliveryPipelineSnapshot_ = null; + deliveryPipelineSnapshotBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline taken at release creation time.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.DeliveryPipeline.Builder + getDeliveryPipelineSnapshotBuilder() { + + onChanged(); + return getDeliveryPipelineSnapshotFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline taken at release creation time.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder + getDeliveryPipelineSnapshotOrBuilder() { + if (deliveryPipelineSnapshotBuilder_ != null) { + return deliveryPipelineSnapshotBuilder_.getMessageOrBuilder(); + } else { + return deliveryPipelineSnapshot_ == null + ? com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance() + : deliveryPipelineSnapshot_; + } + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline taken at release creation time.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder> + getDeliveryPipelineSnapshotFieldBuilder() { + if (deliveryPipelineSnapshotBuilder_ == null) { + deliveryPipelineSnapshotBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder>( + getDeliveryPipelineSnapshot(), getParentForChildren(), isClean()); + deliveryPipelineSnapshot_ = null; + } + return deliveryPipelineSnapshotBuilder_; + } + + private java.util.List targetSnapshots_ = + java.util.Collections.emptyList(); + + private void ensureTargetSnapshotsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + targetSnapshots_ = + new java.util.ArrayList(targetSnapshots_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder> + targetSnapshotsBuilder_; + + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getTargetSnapshotsList() { + if (targetSnapshotsBuilder_ == null) { + return java.util.Collections.unmodifiableList(targetSnapshots_); + } else { + return targetSnapshotsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getTargetSnapshotsCount() { + if (targetSnapshotsBuilder_ == null) { + return targetSnapshots_.size(); + } else { + return targetSnapshotsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Target getTargetSnapshots(int index) { + if (targetSnapshotsBuilder_ == null) { + return targetSnapshots_.get(index); + } else { + return targetSnapshotsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTargetSnapshots(int index, com.google.cloud.deploy.v1.Target value) { + if (targetSnapshotsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetSnapshotsIsMutable(); + targetSnapshots_.set(index, value); + onChanged(); + } else { + targetSnapshotsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTargetSnapshots( + int index, com.google.cloud.deploy.v1.Target.Builder builderForValue) { + if (targetSnapshotsBuilder_ == null) { + ensureTargetSnapshotsIsMutable(); + targetSnapshots_.set(index, builderForValue.build()); + onChanged(); + } else { + targetSnapshotsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTargetSnapshots(com.google.cloud.deploy.v1.Target value) { + if (targetSnapshotsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetSnapshotsIsMutable(); + targetSnapshots_.add(value); + onChanged(); + } else { + targetSnapshotsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTargetSnapshots(int index, com.google.cloud.deploy.v1.Target value) { + if (targetSnapshotsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetSnapshotsIsMutable(); + targetSnapshots_.add(index, value); + onChanged(); + } else { + targetSnapshotsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTargetSnapshots(com.google.cloud.deploy.v1.Target.Builder builderForValue) { + if (targetSnapshotsBuilder_ == null) { + ensureTargetSnapshotsIsMutable(); + targetSnapshots_.add(builderForValue.build()); + onChanged(); + } else { + targetSnapshotsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTargetSnapshots( + int index, com.google.cloud.deploy.v1.Target.Builder builderForValue) { + if (targetSnapshotsBuilder_ == null) { + ensureTargetSnapshotsIsMutable(); + targetSnapshots_.add(index, builderForValue.build()); + onChanged(); + } else { + targetSnapshotsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllTargetSnapshots( + java.lang.Iterable values) { + if (targetSnapshotsBuilder_ == null) { + ensureTargetSnapshotsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetSnapshots_); + onChanged(); + } else { + targetSnapshotsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTargetSnapshots() { + if (targetSnapshotsBuilder_ == null) { + targetSnapshots_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + targetSnapshotsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeTargetSnapshots(int index) { + if (targetSnapshotsBuilder_ == null) { + ensureTargetSnapshotsIsMutable(); + targetSnapshots_.remove(index); + onChanged(); + } else { + targetSnapshotsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Target.Builder getTargetSnapshotsBuilder(int index) { + return getTargetSnapshotsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.TargetOrBuilder getTargetSnapshotsOrBuilder(int index) { + if (targetSnapshotsBuilder_ == null) { + return targetSnapshots_.get(index); + } else { + return targetSnapshotsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getTargetSnapshotsOrBuilderList() { + if (targetSnapshotsBuilder_ != null) { + return targetSnapshotsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(targetSnapshots_); + } + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Target.Builder addTargetSnapshotsBuilder() { + return getTargetSnapshotsFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.Target.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Target.Builder addTargetSnapshotsBuilder(int index) { + return getTargetSnapshotsFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.Target.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getTargetSnapshotsBuilderList() { + return getTargetSnapshotsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder> + getTargetSnapshotsFieldBuilder() { + if (targetSnapshotsBuilder_ == null) { + targetSnapshotsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder>( + targetSnapshots_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + targetSnapshots_ = null; + } + return targetSnapshotsBuilder_; + } + + private int renderState_ = 0; + /** + * + * + *
+     * Output only. Current state of the render operation.
+     * 
+ * + * + * .google.cloud.deploy.v1.Release.RenderState render_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for renderState. + */ + @java.lang.Override + public int getRenderStateValue() { + return renderState_; + } + /** + * + * + *
+     * Output only. Current state of the render operation.
+     * 
+ * + * + * .google.cloud.deploy.v1.Release.RenderState render_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for renderState to set. + * @return This builder for chaining. + */ + public Builder setRenderStateValue(int value) { + + renderState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the render operation.
+     * 
+ * + * + * .google.cloud.deploy.v1.Release.RenderState render_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderState. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release.RenderState getRenderState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Release.RenderState result = + com.google.cloud.deploy.v1.Release.RenderState.valueOf(renderState_); + return result == null ? com.google.cloud.deploy.v1.Release.RenderState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Current state of the render operation.
+     * 
+ * + * + * .google.cloud.deploy.v1.Release.RenderState render_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The renderState to set. + * @return This builder for chaining. + */ + public Builder setRenderState(com.google.cloud.deploy.v1.Release.RenderState value) { + if (value == null) { + throw new NullPointerException(); + } + + renderState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the render operation.
+     * 
+ * + * + * .google.cloud.deploy.v1.Release.RenderState render_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRenderState() { + + renderState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 16; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 16; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 16; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 16; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 16; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private java.lang.Object skaffoldVersion_ = ""; + /** + * + * + *
+     * The Skaffold version to use when operating on this release, such as
+     * "1.20.0". Not all versions are valid; Google Cloud Deploy supports a
+     * specific set of versions.
+     * If unset, the most recent supported Skaffold version will be used.
+     * 
+ * + * string skaffold_version = 19; + * + * @return The skaffoldVersion. + */ + public java.lang.String getSkaffoldVersion() { + java.lang.Object ref = skaffoldVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skaffoldVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Skaffold version to use when operating on this release, such as
+     * "1.20.0". Not all versions are valid; Google Cloud Deploy supports a
+     * specific set of versions.
+     * If unset, the most recent supported Skaffold version will be used.
+     * 
+ * + * string skaffold_version = 19; + * + * @return The bytes for skaffoldVersion. + */ + public com.google.protobuf.ByteString getSkaffoldVersionBytes() { + java.lang.Object ref = skaffoldVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skaffoldVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Skaffold version to use when operating on this release, such as
+     * "1.20.0". Not all versions are valid; Google Cloud Deploy supports a
+     * specific set of versions.
+     * If unset, the most recent supported Skaffold version will be used.
+     * 
+ * + * string skaffold_version = 19; + * + * @param value The skaffoldVersion to set. + * @return This builder for chaining. + */ + public Builder setSkaffoldVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + skaffoldVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Skaffold version to use when operating on this release, such as
+     * "1.20.0". Not all versions are valid; Google Cloud Deploy supports a
+     * specific set of versions.
+     * If unset, the most recent supported Skaffold version will be used.
+     * 
+ * + * string skaffold_version = 19; + * + * @return This builder for chaining. + */ + public Builder clearSkaffoldVersion() { + + skaffoldVersion_ = getDefaultInstance().getSkaffoldVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Skaffold version to use when operating on this release, such as
+     * "1.20.0". Not all versions are valid; Google Cloud Deploy supports a
+     * specific set of versions.
+     * If unset, the most recent supported Skaffold version will be used.
+     * 
+ * + * string skaffold_version = 19; + * + * @param value The bytes for skaffoldVersion to set. + * @return This builder for chaining. + */ + public Builder setSkaffoldVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + skaffoldVersion_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.deploy.v1.TargetArtifact> + targetArtifacts_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.deploy.v1.TargetArtifact> + internalGetTargetArtifacts() { + if (targetArtifacts_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TargetArtifactsDefaultEntryHolder.defaultEntry); + } + return targetArtifacts_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.deploy.v1.TargetArtifact> + internalGetMutableTargetArtifacts() { + onChanged(); + ; + if (targetArtifacts_ == null) { + targetArtifacts_ = + com.google.protobuf.MapField.newMapField( + TargetArtifactsDefaultEntryHolder.defaultEntry); + } + if (!targetArtifacts_.isMutable()) { + targetArtifacts_ = targetArtifacts_.copy(); + } + return targetArtifacts_; + } + + public int getTargetArtifactsCount() { + return internalGetTargetArtifacts().getMap().size(); + } + /** + * + * + *
+     * Output only. Map from target ID to the target artifacts created
+     * during the render operation.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsTargetArtifacts(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetTargetArtifacts().getMap().containsKey(key); + } + /** Use {@link #getTargetArtifactsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getTargetArtifacts() { + return getTargetArtifactsMap(); + } + /** + * + * + *
+     * Output only. Map from target ID to the target artifacts created
+     * during the render operation.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getTargetArtifactsMap() { + return internalGetTargetArtifacts().getMap(); + } + /** + * + * + *
+     * Output only. Map from target ID to the target artifacts created
+     * during the render operation.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetArtifact getTargetArtifactsOrDefault( + java.lang.String key, com.google.cloud.deploy.v1.TargetArtifact defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetTargetArtifacts().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. Map from target ID to the target artifacts created
+     * during the render operation.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetArtifact getTargetArtifactsOrThrow( + java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetTargetArtifacts().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTargetArtifacts() { + internalGetMutableTargetArtifacts().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. Map from target ID to the target artifacts created
+     * during the render operation.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeTargetArtifacts(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableTargetArtifacts().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableTargetArtifacts() { + return internalGetMutableTargetArtifacts().getMutableMap(); + } + /** + * + * + *
+     * Output only. Map from target ID to the target artifacts created
+     * during the render operation.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putTargetArtifacts( + java.lang.String key, com.google.cloud.deploy.v1.TargetArtifact value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableTargetArtifacts().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Output only. Map from target ID to the target artifacts created
+     * during the render operation.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllTargetArtifacts( + java.util.Map values) { + internalGetMutableTargetArtifacts().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.deploy.v1.Release.TargetRender> + targetRenders_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.deploy.v1.Release.TargetRender> + internalGetTargetRenders() { + if (targetRenders_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TargetRendersDefaultEntryHolder.defaultEntry); + } + return targetRenders_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.deploy.v1.Release.TargetRender> + internalGetMutableTargetRenders() { + onChanged(); + ; + if (targetRenders_ == null) { + targetRenders_ = + com.google.protobuf.MapField.newMapField(TargetRendersDefaultEntryHolder.defaultEntry); + } + if (!targetRenders_.isMutable()) { + targetRenders_ = targetRenders_.copy(); + } + return targetRenders_; + } + + public int getTargetRendersCount() { + return internalGetTargetRenders().getMap().size(); + } + /** + * + * + *
+     * Output only. Map from target ID to details of the render operation for that target.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsTargetRenders(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetTargetRenders().getMap().containsKey(key); + } + /** Use {@link #getTargetRendersMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getTargetRenders() { + return getTargetRendersMap(); + } + /** + * + * + *
+     * Output only. Map from target ID to details of the render operation for that target.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getTargetRendersMap() { + return internalGetTargetRenders().getMap(); + } + /** + * + * + *
+     * Output only. Map from target ID to details of the render operation for that target.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release.TargetRender getTargetRendersOrDefault( + java.lang.String key, com.google.cloud.deploy.v1.Release.TargetRender defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetTargetRenders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. Map from target ID to details of the render operation for that target.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release.TargetRender getTargetRendersOrThrow( + java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetTargetRenders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTargetRenders() { + internalGetMutableTargetRenders().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. Map from target ID to details of the render operation for that target.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeTargetRenders(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableTargetRenders().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableTargetRenders() { + return internalGetMutableTargetRenders().getMutableMap(); + } + /** + * + * + *
+     * Output only. Map from target ID to details of the render operation for that target.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putTargetRenders( + java.lang.String key, com.google.cloud.deploy.v1.Release.TargetRender value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableTargetRenders().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Output only. Map from target ID to details of the render operation for that target.
+     * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllTargetRenders( + java.util.Map values) { + internalGetMutableTargetRenders().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.Release) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Release) + private static final com.google.cloud.deploy.v1.Release DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Release(); + } + + public static com.google.cloud.deploy.v1.Release getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Release parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Release(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.deploy.v1.Release getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseName.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseName.java new file mode 100644 index 0000000..c83ddff --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseName.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.deploy.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 ReleaseName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String deliveryPipeline; + private final String release; + + @Deprecated + protected ReleaseName() { + project = null; + location = null; + deliveryPipeline = null; + release = null; + } + + private ReleaseName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + deliveryPipeline = Preconditions.checkNotNull(builder.getDeliveryPipeline()); + release = Preconditions.checkNotNull(builder.getRelease()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public String getRelease() { + return release; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ReleaseName of( + String project, String location, String deliveryPipeline, String release) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .setRelease(release) + .build(); + } + + public static String format( + String project, String location, String deliveryPipeline, String release) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .setRelease(release) + .build() + .toString(); + } + + public static ReleaseName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE.validatedMatch( + formattedString, "ReleaseName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("delivery_pipeline"), + matchMap.get("release")); + } + + 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 (ReleaseName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE.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 (deliveryPipeline != null) { + fieldMapBuilder.put("delivery_pipeline", deliveryPipeline); + } + if (release != null) { + fieldMapBuilder.put("release", release); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE.instantiate( + "project", + project, + "location", + location, + "delivery_pipeline", + deliveryPipeline, + "release", + release); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ReleaseName that = ((ReleaseName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.deliveryPipeline, that.deliveryPipeline) + && Objects.equals(this.release, that.release); + } + 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(deliveryPipeline); + h *= 1000003; + h ^= Objects.hashCode(release); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}. + */ + public static class Builder { + private String project; + private String location; + private String deliveryPipeline; + private String release; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public String getRelease() { + return release; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDeliveryPipeline(String deliveryPipeline) { + this.deliveryPipeline = deliveryPipeline; + return this; + } + + public Builder setRelease(String release) { + this.release = release; + return this; + } + + private Builder(ReleaseName releaseName) { + this.project = releaseName.project; + this.location = releaseName.location; + this.deliveryPipeline = releaseName.deliveryPipeline; + this.release = releaseName.release; + } + + public ReleaseName build() { + return new ReleaseName(this); + } + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java new file mode 100644 index 0000000..0850629 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java @@ -0,0 +1,804 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ReleaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Release) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Name of the `Release`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Optional. Name of the `Release`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Unique identifier of the `Release`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. Unique identifier of the `Release`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Description of the `Release`. Max length is 255 characters.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Description of the `Release`. Max length is 255 characters.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + int getAnnotationsCount(); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + java.lang.String getAnnotationsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Time at which the `Release` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time at which the `Release` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time at which the `Release` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time at which the render began.
+   * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the renderStartTime field is set. + */ + boolean hasRenderStartTime(); + /** + * + * + *
+   * Output only. Time at which the render began.
+   * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderStartTime. + */ + com.google.protobuf.Timestamp getRenderStartTime(); + /** + * + * + *
+   * Output only. Time at which the render began.
+   * 
+ * + * + * .google.protobuf.Timestamp render_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getRenderStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time at which the render completed.
+   * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the renderEndTime field is set. + */ + boolean hasRenderEndTime(); + /** + * + * + *
+   * Output only. Time at which the render completed.
+   * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderEndTime. + */ + com.google.protobuf.Timestamp getRenderEndTime(); + /** + * + * + *
+   * Output only. Time at which the render completed.
+   * 
+ * + * + * .google.protobuf.Timestamp render_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getRenderEndTimeOrBuilder(); + + /** + * + * + *
+   * Cloud Storage URI of tar.gz archive containing Skaffold configuration.
+   * 
+ * + * string skaffold_config_uri = 17; + * + * @return The skaffoldConfigUri. + */ + java.lang.String getSkaffoldConfigUri(); + /** + * + * + *
+   * Cloud Storage URI of tar.gz archive containing Skaffold configuration.
+   * 
+ * + * string skaffold_config_uri = 17; + * + * @return The bytes for skaffoldConfigUri. + */ + com.google.protobuf.ByteString getSkaffoldConfigUriBytes(); + + /** + * + * + *
+   * Filepath of the Skaffold config inside of the config URI.
+   * 
+ * + * string skaffold_config_path = 9; + * + * @return The skaffoldConfigPath. + */ + java.lang.String getSkaffoldConfigPath(); + /** + * + * + *
+   * Filepath of the Skaffold config inside of the config URI.
+   * 
+ * + * string skaffold_config_path = 9; + * + * @return The bytes for skaffoldConfigPath. + */ + com.google.protobuf.ByteString getSkaffoldConfigPathBytes(); + + /** + * + * + *
+   * List of artifacts to pass through to Skaffold command.
+   * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + java.util.List getBuildArtifactsList(); + /** + * + * + *
+   * List of artifacts to pass through to Skaffold command.
+   * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + com.google.cloud.deploy.v1.BuildArtifact getBuildArtifacts(int index); + /** + * + * + *
+   * List of artifacts to pass through to Skaffold command.
+   * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + int getBuildArtifactsCount(); + /** + * + * + *
+   * List of artifacts to pass through to Skaffold command.
+   * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + java.util.List + getBuildArtifactsOrBuilderList(); + /** + * + * + *
+   * List of artifacts to pass through to Skaffold command.
+   * 
+ * + * repeated .google.cloud.deploy.v1.BuildArtifact build_artifacts = 10; + */ + com.google.cloud.deploy.v1.BuildArtifactOrBuilder getBuildArtifactsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline taken at release creation time.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deliveryPipelineSnapshot field is set. + */ + boolean hasDeliveryPipelineSnapshot(); + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline taken at release creation time.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deliveryPipelineSnapshot. + */ + com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipelineSnapshot(); + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline taken at release creation time.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline_snapshot = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder getDeliveryPipelineSnapshotOrBuilder(); + + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getTargetSnapshotsList(); + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.Target getTargetSnapshots(int index); + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getTargetSnapshotsCount(); + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getTargetSnapshotsOrBuilderList(); + /** + * + * + *
+   * Output only. Snapshot of the parent pipeline's targets taken at release creation time.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Target target_snapshots = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.TargetOrBuilder getTargetSnapshotsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Current state of the render operation.
+   * 
+ * + * + * .google.cloud.deploy.v1.Release.RenderState render_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for renderState. + */ + int getRenderStateValue(); + /** + * + * + *
+   * Output only. Current state of the render operation.
+   * 
+ * + * + * .google.cloud.deploy.v1.Release.RenderState render_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The renderState. + */ + com.google.cloud.deploy.v1.Release.RenderState getRenderState(); + + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 16; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 16; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * The Skaffold version to use when operating on this release, such as
+   * "1.20.0". Not all versions are valid; Google Cloud Deploy supports a
+   * specific set of versions.
+   * If unset, the most recent supported Skaffold version will be used.
+   * 
+ * + * string skaffold_version = 19; + * + * @return The skaffoldVersion. + */ + java.lang.String getSkaffoldVersion(); + /** + * + * + *
+   * The Skaffold version to use when operating on this release, such as
+   * "1.20.0". Not all versions are valid; Google Cloud Deploy supports a
+   * specific set of versions.
+   * If unset, the most recent supported Skaffold version will be used.
+   * 
+ * + * string skaffold_version = 19; + * + * @return The bytes for skaffoldVersion. + */ + com.google.protobuf.ByteString getSkaffoldVersionBytes(); + + /** + * + * + *
+   * Output only. Map from target ID to the target artifacts created
+   * during the render operation.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getTargetArtifactsCount(); + /** + * + * + *
+   * Output only. Map from target ID to the target artifacts created
+   * during the render operation.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsTargetArtifacts(java.lang.String key); + /** Use {@link #getTargetArtifactsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTargetArtifacts(); + /** + * + * + *
+   * Output only. Map from target ID to the target artifacts created
+   * during the render operation.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map + getTargetArtifactsMap(); + /** + * + * + *
+   * Output only. Map from target ID to the target artifacts created
+   * during the render operation.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.TargetArtifact getTargetArtifactsOrDefault( + java.lang.String key, com.google.cloud.deploy.v1.TargetArtifact defaultValue); + /** + * + * + *
+   * Output only. Map from target ID to the target artifacts created
+   * during the render operation.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.TargetArtifact> target_artifacts = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.TargetArtifact getTargetArtifactsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Map from target ID to details of the render operation for that target.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getTargetRendersCount(); + /** + * + * + *
+   * Output only. Map from target ID to details of the render operation for that target.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsTargetRenders(java.lang.String key); + /** Use {@link #getTargetRendersMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getTargetRenders(); + /** + * + * + *
+   * Output only. Map from target ID to details of the render operation for that target.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map + getTargetRendersMap(); + /** + * + * + *
+   * Output only. Map from target ID to details of the render operation for that target.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.Release.TargetRender getTargetRendersOrDefault( + java.lang.String key, com.google.cloud.deploy.v1.Release.TargetRender defaultValue); + /** + * + * + *
+   * Output only. Map from target ID to details of the render operation for that target.
+   * 
+ * + * + * map<string, .google.cloud.deploy.v1.Release.TargetRender> target_renders = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.Release.TargetRender getTargetRendersOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java new file mode 100644 index 0000000..51bded6 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java @@ -0,0 +1,4771 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * A `Rollout` resource in the Google Cloud Deploy API.
+ * A `Rollout` contains information around a specific deployment to a `Target`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Rollout} + */ +public final class Rollout extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Rollout) + RolloutOrBuilder { + private static final long serialVersionUID = 0L; + // Use Rollout.newBuilder() to construct. + private Rollout(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Rollout() { + name_ = ""; + uid_ = ""; + description_ = ""; + targetId_ = ""; + approvalState_ = 0; + state_ = 0; + failureReason_ = ""; + deployingBuild_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Rollout(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Rollout( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uid_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotations_ = + com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 50: + { + 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 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (approveTime_ != null) { + subBuilder = approveTime_.toBuilder(); + } + approveTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(approveTime_); + approveTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (enqueueTime_ != null) { + subBuilder = enqueueTime_.toBuilder(); + } + enqueueTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(enqueueTime_); + enqueueTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (deployStartTime_ != null) { + subBuilder = deployStartTime_.toBuilder(); + } + deployStartTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deployStartTime_); + deployStartTime_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (deployEndTime_ != null) { + subBuilder = deployEndTime_.toBuilder(); + } + deployEndTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deployEndTime_); + deployEndTime_ = subBuilder.buildPartial(); + } + + break; + } + case 96: + { + int rawValue = input.readEnum(); + + approvalState_ = rawValue; + break; + } + case 104: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + + failureReason_ = s; + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + deployingBuild_ = s; + break; + } + case 146: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetId_ = 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Rollout_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetAnnotations(); + case 5: + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Rollout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Rollout.class, + com.google.cloud.deploy.v1.Rollout.Builder.class); + } + + /** + * + * + *
+   * Valid approval states of a `Rollout`.
+   * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.Rollout.ApprovalState} + */ + public enum ApprovalState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The `Rollout` has an unspecified approval state.
+     * 
+ * + * APPROVAL_STATE_UNSPECIFIED = 0; + */ + APPROVAL_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The `Rollout` requires approval.
+     * 
+ * + * NEEDS_APPROVAL = 1; + */ + NEEDS_APPROVAL(1), + /** + * + * + *
+     * The `Rollout` does not require approval.
+     * 
+ * + * DOES_NOT_NEED_APPROVAL = 2; + */ + DOES_NOT_NEED_APPROVAL(2), + /** + * + * + *
+     * The `Rollout` has been approved.
+     * 
+ * + * APPROVED = 3; + */ + APPROVED(3), + /** + * + * + *
+     * The `Rollout` has been rejected.
+     * 
+ * + * REJECTED = 4; + */ + REJECTED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The `Rollout` has an unspecified approval state.
+     * 
+ * + * APPROVAL_STATE_UNSPECIFIED = 0; + */ + public static final int APPROVAL_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The `Rollout` requires approval.
+     * 
+ * + * NEEDS_APPROVAL = 1; + */ + public static final int NEEDS_APPROVAL_VALUE = 1; + /** + * + * + *
+     * The `Rollout` does not require approval.
+     * 
+ * + * DOES_NOT_NEED_APPROVAL = 2; + */ + public static final int DOES_NOT_NEED_APPROVAL_VALUE = 2; + /** + * + * + *
+     * The `Rollout` has been approved.
+     * 
+ * + * APPROVED = 3; + */ + public static final int APPROVED_VALUE = 3; + /** + * + * + *
+     * The `Rollout` has been rejected.
+     * 
+ * + * REJECTED = 4; + */ + public static final int REJECTED_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ApprovalState 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 ApprovalState forNumber(int value) { + switch (value) { + case 0: + return APPROVAL_STATE_UNSPECIFIED; + case 1: + return NEEDS_APPROVAL; + case 2: + return DOES_NOT_NEED_APPROVAL; + case 3: + return APPROVED; + case 4: + return REJECTED; + 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 ApprovalState findValueByNumber(int number) { + return ApprovalState.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.deploy.v1.Rollout.getDescriptor().getEnumTypes().get(0); + } + + private static final ApprovalState[] VALUES = values(); + + public static ApprovalState 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 ApprovalState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.Rollout.ApprovalState) + } + + /** + * + * + *
+   * Valid states of a `Rollout`.
+   * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.Rollout.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The `Rollout` has an unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The `Rollout` has completed successfully.
+     * 
+ * + * SUCCEEDED = 1; + */ + SUCCEEDED(1), + /** + * + * + *
+     * The `Rollout` has failed.
+     * 
+ * + * FAILED = 2; + */ + FAILED(2), + /** + * + * + *
+     * The `Rollout` is being deployed.
+     * 
+ * + * IN_PROGRESS = 3; + */ + IN_PROGRESS(3), + /** + * + * + *
+     * The `Rollout` needs approval.
+     * 
+ * + * PENDING_APPROVAL = 4; + */ + PENDING_APPROVAL(4), + /** + * + * + *
+     * An approver rejected the `Rollout`.
+     * 
+ * + * APPROVAL_REJECTED = 5; + */ + APPROVAL_REJECTED(5), + /** + * + * + *
+     * The `Rollout` is waiting for an earlier Rollout(s) to complete on this
+     * `Target`.
+     * 
+ * + * PENDING = 6; + */ + PENDING(6), + /** + * + * + *
+     * The `Rollout` is waiting for the `Release` to be fully rendered.
+     * 
+ * + * PENDING_RELEASE = 7; + */ + PENDING_RELEASE(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The `Rollout` has an unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The `Rollout` has completed successfully.
+     * 
+ * + * SUCCEEDED = 1; + */ + public static final int SUCCEEDED_VALUE = 1; + /** + * + * + *
+     * The `Rollout` has failed.
+     * 
+ * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + /** + * + * + *
+     * The `Rollout` is being deployed.
+     * 
+ * + * IN_PROGRESS = 3; + */ + public static final int IN_PROGRESS_VALUE = 3; + /** + * + * + *
+     * The `Rollout` needs approval.
+     * 
+ * + * PENDING_APPROVAL = 4; + */ + public static final int PENDING_APPROVAL_VALUE = 4; + /** + * + * + *
+     * An approver rejected the `Rollout`.
+     * 
+ * + * APPROVAL_REJECTED = 5; + */ + public static final int APPROVAL_REJECTED_VALUE = 5; + /** + * + * + *
+     * The `Rollout` is waiting for an earlier Rollout(s) to complete on this
+     * `Target`.
+     * 
+ * + * PENDING = 6; + */ + public static final int PENDING_VALUE = 6; + /** + * + * + *
+     * The `Rollout` is waiting for the `Release` to be fully rendered.
+     * 
+ * + * PENDING_RELEASE = 7; + */ + public static final int PENDING_RELEASE_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 SUCCEEDED; + case 2: + return FAILED; + case 3: + return IN_PROGRESS; + case 4: + return PENDING_APPROVAL; + case 5: + return APPROVAL_REJECTED; + case 6: + return PENDING; + case 7: + return PENDING_RELEASE; + 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.deploy.v1.Rollout.getDescriptor().getEnumTypes().get(1); + } + + 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.deploy.v1.Rollout.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Optional. Name of the `Rollout`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+   * Optional. Name of the `Rollout`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 UID_FIELD_NUMBER = 2; + private volatile java.lang.Object uid_; + /** + * + * + *
+   * Output only. Unique identifier of the `Rollout`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Unique identifier of the `Rollout`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Description of the `Rollout` for user purposes. Max length is 255
+   * characters.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Description of the `Rollout` for user purposes. Max length is 255
+   * characters.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 4; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Rollout_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Rollout_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + @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 CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time at which the `Rollout` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the `Rollout` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time at which the `Rollout` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int APPROVE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp approveTime_; + /** + * + * + *
+   * Output only. Time at which the `Rollout` was approved.
+   * 
+ * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the approveTime field is set. + */ + @java.lang.Override + public boolean hasApproveTime() { + return approveTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the `Rollout` was approved.
+   * 
+ * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The approveTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getApproveTime() { + return approveTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : approveTime_; + } + /** + * + * + *
+   * Output only. Time at which the `Rollout` was approved.
+   * 
+ * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getApproveTimeOrBuilder() { + return getApproveTime(); + } + + public static final int ENQUEUE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp enqueueTime_; + /** + * + * + *
+   * Output only. Time at which the `Rollout` was enqueued.
+   * 
+ * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the enqueueTime field is set. + */ + @java.lang.Override + public boolean hasEnqueueTime() { + return enqueueTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the `Rollout` was enqueued.
+   * 
+ * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enqueueTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEnqueueTime() { + return enqueueTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : enqueueTime_; + } + /** + * + * + *
+   * Output only. Time at which the `Rollout` was enqueued.
+   * 
+ * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEnqueueTimeOrBuilder() { + return getEnqueueTime(); + } + + public static final int DEPLOY_START_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp deployStartTime_; + /** + * + * + *
+   * Output only. Time at which the `Rollout` started deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployStartTime field is set. + */ + @java.lang.Override + public boolean hasDeployStartTime() { + return deployStartTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the `Rollout` started deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployStartTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeployStartTime() { + return deployStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deployStartTime_; + } + /** + * + * + *
+   * Output only. Time at which the `Rollout` started deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeployStartTimeOrBuilder() { + return getDeployStartTime(); + } + + public static final int DEPLOY_END_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp deployEndTime_; + /** + * + * + *
+   * Output only. Time at which the `Rollout` finished deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployEndTime field is set. + */ + @java.lang.Override + public boolean hasDeployEndTime() { + return deployEndTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the `Rollout` finished deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployEndTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeployEndTime() { + return deployEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deployEndTime_; + } + /** + * + * + *
+   * Output only. Time at which the `Rollout` finished deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeployEndTimeOrBuilder() { + return getDeployEndTime(); + } + + public static final int TARGET_ID_FIELD_NUMBER = 18; + private volatile java.lang.Object targetId_; + /** + * + * + *
+   * Required. The ID of Target to which this `Rollout` is deploying.
+   * 
+ * + * string target_id = 18 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetId. + */ + @java.lang.Override + public java.lang.String getTargetId() { + java.lang.Object ref = targetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID of Target to which this `Rollout` is deploying.
+   * 
+ * + * string target_id = 18 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetIdBytes() { + java.lang.Object ref = targetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPROVAL_STATE_FIELD_NUMBER = 12; + private int approvalState_; + /** + * + * + *
+   * Output only. Approval state of the `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.Rollout.ApprovalState approval_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for approvalState. + */ + @java.lang.Override + public int getApprovalStateValue() { + return approvalState_; + } + /** + * + * + *
+   * Output only. Approval state of the `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.Rollout.ApprovalState approval_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The approvalState. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Rollout.ApprovalState getApprovalState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Rollout.ApprovalState result = + com.google.cloud.deploy.v1.Rollout.ApprovalState.valueOf(approvalState_); + return result == null ? com.google.cloud.deploy.v1.Rollout.ApprovalState.UNRECOGNIZED : result; + } + + public static final int STATE_FIELD_NUMBER = 13; + private int state_; + /** + * + * + *
+   * Output only. Current state of the `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.Rollout.State state = 13 [(.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. Current state of the `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.Rollout.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Rollout.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Rollout.State result = + com.google.cloud.deploy.v1.Rollout.State.valueOf(state_); + return result == null ? com.google.cloud.deploy.v1.Rollout.State.UNRECOGNIZED : result; + } + + public static final int FAILURE_REASON_FIELD_NUMBER = 14; + private volatile java.lang.Object failureReason_; + /** + * + * + *
+   * Output only. Reason the build failed. Empty if the build succeeded.
+   * 
+ * + * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureReason. + */ + @java.lang.Override + public java.lang.String getFailureReason() { + java.lang.Object ref = failureReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + failureReason_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Reason the build failed. Empty if the build succeeded.
+   * 
+ * + * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFailureReasonBytes() { + java.lang.Object ref = failureReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYING_BUILD_FIELD_NUMBER = 17; + private volatile java.lang.Object deployingBuild_; + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to deploy
+   * the Rollout. Format is
+   * `projects/{project}/locations/{location}/builds/{build}`.
+   * 
+ * + * + * string deploying_build = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The deployingBuild. + */ + @java.lang.Override + public java.lang.String getDeployingBuild() { + java.lang.Object ref = deployingBuild_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deployingBuild_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to deploy
+   * the Rollout. Format is
+   * `projects/{project}/locations/{location}/builds/{build}`.
+   * 
+ * + * + * string deploying_build = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for deployingBuild. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeployingBuildBytes() { + java.lang.Object ref = deployingBuild_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployingBuild_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 16; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 16; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 16; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getUidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 4); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (approveTime_ != null) { + output.writeMessage(7, getApproveTime()); + } + if (enqueueTime_ != null) { + output.writeMessage(8, getEnqueueTime()); + } + if (deployStartTime_ != null) { + output.writeMessage(9, getDeployStartTime()); + } + if (deployEndTime_ != null) { + output.writeMessage(10, getDeployEndTime()); + } + if (approvalState_ + != com.google.cloud.deploy.v1.Rollout.ApprovalState.APPROVAL_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(12, approvalState_); + } + if (state_ != com.google.cloud.deploy.v1.Rollout.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(13, state_); + } + if (!getFailureReasonBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, failureReason_); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, etag_); + } + if (!getDeployingBuildBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, deployingBuild_); + } + if (!getTargetIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, targetId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getUidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, annotations__); + } + 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(5, labels__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (approveTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getApproveTime()); + } + if (enqueueTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getEnqueueTime()); + } + if (deployStartTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getDeployStartTime()); + } + if (deployEndTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDeployEndTime()); + } + if (approvalState_ + != com.google.cloud.deploy.v1.Rollout.ApprovalState.APPROVAL_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, approvalState_); + } + if (state_ != com.google.cloud.deploy.v1.Rollout.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, state_); + } + if (!getFailureReasonBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, failureReason_); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, etag_); + } + if (!getDeployingBuildBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, deployingBuild_); + } + if (!getTargetIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, targetId_); + } + 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.deploy.v1.Rollout)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Rollout other = (com.google.cloud.deploy.v1.Rollout) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasApproveTime() != other.hasApproveTime()) return false; + if (hasApproveTime()) { + if (!getApproveTime().equals(other.getApproveTime())) return false; + } + if (hasEnqueueTime() != other.hasEnqueueTime()) return false; + if (hasEnqueueTime()) { + if (!getEnqueueTime().equals(other.getEnqueueTime())) return false; + } + if (hasDeployStartTime() != other.hasDeployStartTime()) return false; + if (hasDeployStartTime()) { + if (!getDeployStartTime().equals(other.getDeployStartTime())) return false; + } + if (hasDeployEndTime() != other.hasDeployEndTime()) return false; + if (hasDeployEndTime()) { + if (!getDeployEndTime().equals(other.getDeployEndTime())) return false; + } + if (!getTargetId().equals(other.getTargetId())) return false; + if (approvalState_ != other.approvalState_) return false; + if (state_ != other.state_) return false; + if (!getFailureReason().equals(other.getFailureReason())) return false; + if (!getDeployingBuild().equals(other.getDeployingBuild())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasApproveTime()) { + hash = (37 * hash) + APPROVE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getApproveTime().hashCode(); + } + if (hasEnqueueTime()) { + hash = (37 * hash) + ENQUEUE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEnqueueTime().hashCode(); + } + if (hasDeployStartTime()) { + hash = (37 * hash) + DEPLOY_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeployStartTime().hashCode(); + } + if (hasDeployEndTime()) { + hash = (37 * hash) + DEPLOY_END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeployEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_ID_FIELD_NUMBER; + hash = (53 * hash) + getTargetId().hashCode(); + hash = (37 * hash) + APPROVAL_STATE_FIELD_NUMBER; + hash = (53 * hash) + approvalState_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + FAILURE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getFailureReason().hashCode(); + hash = (37 * hash) + DEPLOYING_BUILD_FIELD_NUMBER; + hash = (53 * hash) + getDeployingBuild().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Rollout parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Rollout parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Rollout parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Rollout parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Rollout parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Rollout parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Rollout parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Rollout parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Rollout parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Rollout parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Rollout parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Rollout parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.deploy.v1.Rollout prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A `Rollout` resource in the Google Cloud Deploy API.
+   * A `Rollout` contains information around a specific deployment to a `Target`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Rollout} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Rollout) + com.google.cloud.deploy.v1.RolloutOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Rollout_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetAnnotations(); + case 5: + 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 internalGetMutableAnnotations(); + case 5: + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Rollout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Rollout.class, + com.google.cloud.deploy.v1.Rollout.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Rollout.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + uid_ = ""; + + description_ = ""; + + internalGetMutableAnnotations().clear(); + internalGetMutableLabels().clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (approveTimeBuilder_ == null) { + approveTime_ = null; + } else { + approveTime_ = null; + approveTimeBuilder_ = null; + } + if (enqueueTimeBuilder_ == null) { + enqueueTime_ = null; + } else { + enqueueTime_ = null; + enqueueTimeBuilder_ = null; + } + if (deployStartTimeBuilder_ == null) { + deployStartTime_ = null; + } else { + deployStartTime_ = null; + deployStartTimeBuilder_ = null; + } + if (deployEndTimeBuilder_ == null) { + deployEndTime_ = null; + } else { + deployEndTime_ = null; + deployEndTimeBuilder_ = null; + } + targetId_ = ""; + + approvalState_ = 0; + + state_ = 0; + + failureReason_ = ""; + + deployingBuild_ = ""; + + etag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Rollout_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Rollout getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Rollout.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Rollout build() { + com.google.cloud.deploy.v1.Rollout result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Rollout buildPartial() { + com.google.cloud.deploy.v1.Rollout result = new com.google.cloud.deploy.v1.Rollout(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.uid_ = uid_; + result.description_ = description_; + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (approveTimeBuilder_ == null) { + result.approveTime_ = approveTime_; + } else { + result.approveTime_ = approveTimeBuilder_.build(); + } + if (enqueueTimeBuilder_ == null) { + result.enqueueTime_ = enqueueTime_; + } else { + result.enqueueTime_ = enqueueTimeBuilder_.build(); + } + if (deployStartTimeBuilder_ == null) { + result.deployStartTime_ = deployStartTime_; + } else { + result.deployStartTime_ = deployStartTimeBuilder_.build(); + } + if (deployEndTimeBuilder_ == null) { + result.deployEndTime_ = deployEndTime_; + } else { + result.deployEndTime_ = deployEndTimeBuilder_.build(); + } + result.targetId_ = targetId_; + result.approvalState_ = approvalState_; + result.state_ = state_; + result.failureReason_ = failureReason_; + result.deployingBuild_ = deployingBuild_; + result.etag_ = etag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.Rollout) { + return mergeFrom((com.google.cloud.deploy.v1.Rollout) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Rollout other) { + if (other == com.google.cloud.deploy.v1.Rollout.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasApproveTime()) { + mergeApproveTime(other.getApproveTime()); + } + if (other.hasEnqueueTime()) { + mergeEnqueueTime(other.getEnqueueTime()); + } + if (other.hasDeployStartTime()) { + mergeDeployStartTime(other.getDeployStartTime()); + } + if (other.hasDeployEndTime()) { + mergeDeployEndTime(other.getDeployEndTime()); + } + if (!other.getTargetId().isEmpty()) { + targetId_ = other.targetId_; + onChanged(); + } + if (other.approvalState_ != 0) { + setApprovalStateValue(other.getApprovalStateValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getFailureReason().isEmpty()) { + failureReason_ = other.failureReason_; + onChanged(); + } + if (!other.getDeployingBuild().isEmpty()) { + deployingBuild_ = other.deployingBuild_; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.Rollout parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.Rollout) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Optional. Name of the `Rollout`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Name of the `Rollout`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Name of the `Rollout`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. Name of the `Rollout`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of the `Rollout`. Format is projects/{project}/
+     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 uid_ = ""; + /** + * + * + *
+     * Output only. Unique identifier of the `Rollout`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier of the `Rollout`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier of the `Rollout`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `Rollout`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `Rollout`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Description of the `Rollout` for user purposes. Max length is 255
+     * characters.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Description of the `Rollout` for user purposes. Max length is 255
+     * characters.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Description of the `Rollout` for user purposes. Max length is 255
+     * characters.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the `Rollout` for user purposes. Max length is 255
+     * characters.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the `Rollout` for user purposes. Max length is 255
+     * characters.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged(); + ; + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 4; + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the `Rollout` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_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> + 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 approveTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + approveTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the `Rollout` was approved.
+     * 
+ * + * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the approveTime field is set. + */ + public boolean hasApproveTime() { + return approveTimeBuilder_ != null || approveTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was approved.
+     * 
+ * + * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The approveTime. + */ + public com.google.protobuf.Timestamp getApproveTime() { + if (approveTimeBuilder_ == null) { + return approveTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : approveTime_; + } else { + return approveTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was approved.
+     * 
+ * + * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setApproveTime(com.google.protobuf.Timestamp value) { + if (approveTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + approveTime_ = value; + onChanged(); + } else { + approveTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was approved.
+     * 
+ * + * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setApproveTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (approveTimeBuilder_ == null) { + approveTime_ = builderForValue.build(); + onChanged(); + } else { + approveTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was approved.
+     * 
+ * + * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeApproveTime(com.google.protobuf.Timestamp value) { + if (approveTimeBuilder_ == null) { + if (approveTime_ != null) { + approveTime_ = + com.google.protobuf.Timestamp.newBuilder(approveTime_) + .mergeFrom(value) + .buildPartial(); + } else { + approveTime_ = value; + } + onChanged(); + } else { + approveTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was approved.
+     * 
+ * + * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearApproveTime() { + if (approveTimeBuilder_ == null) { + approveTime_ = null; + onChanged(); + } else { + approveTime_ = null; + approveTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was approved.
+     * 
+ * + * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getApproveTimeBuilder() { + + onChanged(); + return getApproveTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was approved.
+     * 
+ * + * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getApproveTimeOrBuilder() { + if (approveTimeBuilder_ != null) { + return approveTimeBuilder_.getMessageOrBuilder(); + } else { + return approveTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : approveTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was approved.
+     * 
+ * + * + * .google.protobuf.Timestamp approve_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> + getApproveTimeFieldBuilder() { + if (approveTimeBuilder_ == null) { + approveTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getApproveTime(), getParentForChildren(), isClean()); + approveTime_ = null; + } + return approveTimeBuilder_; + } + + private com.google.protobuf.Timestamp enqueueTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + enqueueTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the `Rollout` was enqueued.
+     * 
+ * + * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the enqueueTime field is set. + */ + public boolean hasEnqueueTime() { + return enqueueTimeBuilder_ != null || enqueueTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was enqueued.
+     * 
+ * + * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enqueueTime. + */ + public com.google.protobuf.Timestamp getEnqueueTime() { + if (enqueueTimeBuilder_ == null) { + return enqueueTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : enqueueTime_; + } else { + return enqueueTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was enqueued.
+     * 
+ * + * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEnqueueTime(com.google.protobuf.Timestamp value) { + if (enqueueTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + enqueueTime_ = value; + onChanged(); + } else { + enqueueTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was enqueued.
+     * 
+ * + * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEnqueueTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (enqueueTimeBuilder_ == null) { + enqueueTime_ = builderForValue.build(); + onChanged(); + } else { + enqueueTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was enqueued.
+     * 
+ * + * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEnqueueTime(com.google.protobuf.Timestamp value) { + if (enqueueTimeBuilder_ == null) { + if (enqueueTime_ != null) { + enqueueTime_ = + com.google.protobuf.Timestamp.newBuilder(enqueueTime_) + .mergeFrom(value) + .buildPartial(); + } else { + enqueueTime_ = value; + } + onChanged(); + } else { + enqueueTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was enqueued.
+     * 
+ * + * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEnqueueTime() { + if (enqueueTimeBuilder_ == null) { + enqueueTime_ = null; + onChanged(); + } else { + enqueueTime_ = null; + enqueueTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was enqueued.
+     * 
+ * + * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEnqueueTimeBuilder() { + + onChanged(); + return getEnqueueTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was enqueued.
+     * 
+ * + * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEnqueueTimeOrBuilder() { + if (enqueueTimeBuilder_ != null) { + return enqueueTimeBuilder_.getMessageOrBuilder(); + } else { + return enqueueTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : enqueueTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` was enqueued.
+     * 
+ * + * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEnqueueTimeFieldBuilder() { + if (enqueueTimeBuilder_ == null) { + enqueueTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEnqueueTime(), getParentForChildren(), isClean()); + enqueueTime_ = null; + } + return enqueueTimeBuilder_; + } + + private com.google.protobuf.Timestamp deployStartTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deployStartTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the `Rollout` started deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployStartTime field is set. + */ + public boolean hasDeployStartTime() { + return deployStartTimeBuilder_ != null || deployStartTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` started deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployStartTime. + */ + public com.google.protobuf.Timestamp getDeployStartTime() { + if (deployStartTimeBuilder_ == null) { + return deployStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deployStartTime_; + } else { + return deployStartTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` started deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployStartTime(com.google.protobuf.Timestamp value) { + if (deployStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployStartTime_ = value; + onChanged(); + } else { + deployStartTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` started deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deployStartTimeBuilder_ == null) { + deployStartTime_ = builderForValue.build(); + onChanged(); + } else { + deployStartTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` started deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeployStartTime(com.google.protobuf.Timestamp value) { + if (deployStartTimeBuilder_ == null) { + if (deployStartTime_ != null) { + deployStartTime_ = + com.google.protobuf.Timestamp.newBuilder(deployStartTime_) + .mergeFrom(value) + .buildPartial(); + } else { + deployStartTime_ = value; + } + onChanged(); + } else { + deployStartTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` started deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeployStartTime() { + if (deployStartTimeBuilder_ == null) { + deployStartTime_ = null; + onChanged(); + } else { + deployStartTime_ = null; + deployStartTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` started deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeployStartTimeBuilder() { + + onChanged(); + return getDeployStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` started deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeployStartTimeOrBuilder() { + if (deployStartTimeBuilder_ != null) { + return deployStartTimeBuilder_.getMessageOrBuilder(); + } else { + return deployStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deployStartTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` started deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDeployStartTimeFieldBuilder() { + if (deployStartTimeBuilder_ == null) { + deployStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeployStartTime(), getParentForChildren(), isClean()); + deployStartTime_ = null; + } + return deployStartTimeBuilder_; + } + + private com.google.protobuf.Timestamp deployEndTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deployEndTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the `Rollout` finished deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployEndTime field is set. + */ + public boolean hasDeployEndTime() { + return deployEndTimeBuilder_ != null || deployEndTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` finished deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployEndTime. + */ + public com.google.protobuf.Timestamp getDeployEndTime() { + if (deployEndTimeBuilder_ == null) { + return deployEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deployEndTime_; + } else { + return deployEndTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` finished deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployEndTime(com.google.protobuf.Timestamp value) { + if (deployEndTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployEndTime_ = value; + onChanged(); + } else { + deployEndTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` finished deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deployEndTimeBuilder_ == null) { + deployEndTime_ = builderForValue.build(); + onChanged(); + } else { + deployEndTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` finished deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeployEndTime(com.google.protobuf.Timestamp value) { + if (deployEndTimeBuilder_ == null) { + if (deployEndTime_ != null) { + deployEndTime_ = + com.google.protobuf.Timestamp.newBuilder(deployEndTime_) + .mergeFrom(value) + .buildPartial(); + } else { + deployEndTime_ = value; + } + onChanged(); + } else { + deployEndTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` finished deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeployEndTime() { + if (deployEndTimeBuilder_ == null) { + deployEndTime_ = null; + onChanged(); + } else { + deployEndTime_ = null; + deployEndTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` finished deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeployEndTimeBuilder() { + + onChanged(); + return getDeployEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` finished deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeployEndTimeOrBuilder() { + if (deployEndTimeBuilder_ != null) { + return deployEndTimeBuilder_.getMessageOrBuilder(); + } else { + return deployEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deployEndTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the `Rollout` finished deploying.
+     * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDeployEndTimeFieldBuilder() { + if (deployEndTimeBuilder_ == null) { + deployEndTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeployEndTime(), getParentForChildren(), isClean()); + deployEndTime_ = null; + } + return deployEndTimeBuilder_; + } + + private java.lang.Object targetId_ = ""; + /** + * + * + *
+     * Required. The ID of Target to which this `Rollout` is deploying.
+     * 
+ * + * string target_id = 18 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetId. + */ + public java.lang.String getTargetId() { + java.lang.Object ref = targetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID of Target to which this `Rollout` is deploying.
+     * 
+ * + * string target_id = 18 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetId. + */ + public com.google.protobuf.ByteString getTargetIdBytes() { + java.lang.Object ref = targetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID of Target to which this `Rollout` is deploying.
+     * 
+ * + * string target_id = 18 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The targetId to set. + * @return This builder for chaining. + */ + public Builder setTargetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of Target to which this `Rollout` is deploying.
+     * 
+ * + * string target_id = 18 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTargetId() { + + targetId_ = getDefaultInstance().getTargetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID of Target to which this `Rollout` is deploying.
+     * 
+ * + * string target_id = 18 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for targetId to set. + * @return This builder for chaining. + */ + public Builder setTargetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetId_ = value; + onChanged(); + return this; + } + + private int approvalState_ = 0; + /** + * + * + *
+     * Output only. Approval state of the `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollout.ApprovalState approval_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for approvalState. + */ + @java.lang.Override + public int getApprovalStateValue() { + return approvalState_; + } + /** + * + * + *
+     * Output only. Approval state of the `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollout.ApprovalState approval_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for approvalState to set. + * @return This builder for chaining. + */ + public Builder setApprovalStateValue(int value) { + + approvalState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Approval state of the `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollout.ApprovalState approval_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The approvalState. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Rollout.ApprovalState getApprovalState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Rollout.ApprovalState result = + com.google.cloud.deploy.v1.Rollout.ApprovalState.valueOf(approvalState_); + return result == null + ? com.google.cloud.deploy.v1.Rollout.ApprovalState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Approval state of the `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollout.ApprovalState approval_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The approvalState to set. + * @return This builder for chaining. + */ + public Builder setApprovalState(com.google.cloud.deploy.v1.Rollout.ApprovalState value) { + if (value == null) { + throw new NullPointerException(); + } + + approvalState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Approval state of the `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollout.ApprovalState approval_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearApprovalState() { + + approvalState_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current state of the `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollout.State state = 13 [(.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. Current state of the `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollout.State state = 13 [(.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. Current state of the `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollout.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Rollout.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Rollout.State result = + com.google.cloud.deploy.v1.Rollout.State.valueOf(state_); + return result == null ? com.google.cloud.deploy.v1.Rollout.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Current state of the `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollout.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.deploy.v1.Rollout.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollout.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object failureReason_ = ""; + /** + * + * + *
+     * Output only. Reason the build failed. Empty if the build succeeded.
+     * 
+ * + * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureReason. + */ + public java.lang.String getFailureReason() { + java.lang.Object ref = failureReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + failureReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Reason the build failed. Empty if the build succeeded.
+     * 
+ * + * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureReason. + */ + public com.google.protobuf.ByteString getFailureReasonBytes() { + java.lang.Object ref = failureReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Reason the build failed. Empty if the build succeeded.
+     * 
+ * + * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The failureReason to set. + * @return This builder for chaining. + */ + public Builder setFailureReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + failureReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Reason the build failed. Empty if the build succeeded.
+     * 
+ * + * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFailureReason() { + + failureReason_ = getDefaultInstance().getFailureReason(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Reason the build failed. Empty if the build succeeded.
+     * 
+ * + * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for failureReason to set. + * @return This builder for chaining. + */ + public Builder setFailureReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + failureReason_ = value; + onChanged(); + return this; + } + + private java.lang.Object deployingBuild_ = ""; + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to deploy
+     * the Rollout. Format is
+     * `projects/{project}/locations/{location}/builds/{build}`.
+     * 
+ * + * + * string deploying_build = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The deployingBuild. + */ + public java.lang.String getDeployingBuild() { + java.lang.Object ref = deployingBuild_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deployingBuild_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to deploy
+     * the Rollout. Format is
+     * `projects/{project}/locations/{location}/builds/{build}`.
+     * 
+ * + * + * string deploying_build = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for deployingBuild. + */ + public com.google.protobuf.ByteString getDeployingBuildBytes() { + java.lang.Object ref = deployingBuild_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployingBuild_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to deploy
+     * the Rollout. Format is
+     * `projects/{project}/locations/{location}/builds/{build}`.
+     * 
+ * + * + * string deploying_build = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The deployingBuild to set. + * @return This builder for chaining. + */ + public Builder setDeployingBuild(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deployingBuild_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to deploy
+     * the Rollout. Format is
+     * `projects/{project}/locations/{location}/builds/{build}`.
+     * 
+ * + * + * string deploying_build = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDeployingBuild() { + + deployingBuild_ = getDefaultInstance().getDeployingBuild(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to deploy
+     * the Rollout. Format is
+     * `projects/{project}/locations/{location}/builds/{build}`.
+     * 
+ * + * + * string deploying_build = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for deployingBuild to set. + * @return This builder for chaining. + */ + public Builder setDeployingBuildBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deployingBuild_ = value; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 16; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 16; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 16; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 16; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 16; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.Rollout) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Rollout) + private static final com.google.cloud.deploy.v1.Rollout DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Rollout(); + } + + public static com.google.cloud.deploy.v1.Rollout getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Rollout parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Rollout(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Rollout getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutName.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutName.java new file mode 100644 index 0000000..fea4ebf --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutName.java @@ -0,0 +1,298 @@ +/* + * 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.deploy.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 RolloutName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE_ROLLOUT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String deliveryPipeline; + private final String release; + private final String rollout; + + @Deprecated + protected RolloutName() { + project = null; + location = null; + deliveryPipeline = null; + release = null; + rollout = null; + } + + private RolloutName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + deliveryPipeline = Preconditions.checkNotNull(builder.getDeliveryPipeline()); + release = Preconditions.checkNotNull(builder.getRelease()); + rollout = Preconditions.checkNotNull(builder.getRollout()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public String getRelease() { + return release; + } + + public String getRollout() { + return rollout; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RolloutName of( + String project, String location, String deliveryPipeline, String release, String rollout) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .setRelease(release) + .setRollout(rollout) + .build(); + } + + public static String format( + String project, String location, String deliveryPipeline, String release, String rollout) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .setRelease(release) + .setRollout(rollout) + .build() + .toString(); + } + + public static RolloutName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE_ROLLOUT.validatedMatch( + formattedString, "RolloutName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("delivery_pipeline"), + matchMap.get("release"), + matchMap.get("rollout")); + } + + 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 (RolloutName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE_ROLLOUT.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 (deliveryPipeline != null) { + fieldMapBuilder.put("delivery_pipeline", deliveryPipeline); + } + if (release != null) { + fieldMapBuilder.put("release", release); + } + if (rollout != null) { + fieldMapBuilder.put("rollout", rollout); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE_ROLLOUT.instantiate( + "project", + project, + "location", + location, + "delivery_pipeline", + deliveryPipeline, + "release", + release, + "rollout", + rollout); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + RolloutName that = ((RolloutName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.deliveryPipeline, that.deliveryPipeline) + && Objects.equals(this.release, that.release) + && Objects.equals(this.rollout, that.rollout); + } + 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(deliveryPipeline); + h *= 1000003; + h ^= Objects.hashCode(release); + h *= 1000003; + h ^= Objects.hashCode(rollout); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}. + */ + public static class Builder { + private String project; + private String location; + private String deliveryPipeline; + private String release; + private String rollout; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public String getRelease() { + return release; + } + + public String getRollout() { + return rollout; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDeliveryPipeline(String deliveryPipeline) { + this.deliveryPipeline = deliveryPipeline; + return this; + } + + public Builder setRelease(String release) { + this.release = release; + return this; + } + + public Builder setRollout(String rollout) { + this.rollout = rollout; + return this; + } + + private Builder(RolloutName rolloutName) { + this.project = rolloutName.project; + this.location = rolloutName.location; + this.deliveryPipeline = rolloutName.deliveryPipeline; + this.release = rolloutName.release; + this.rollout = rolloutName.rollout; + } + + public RolloutName build() { + return new RolloutName(this); + } + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java new file mode 100644 index 0000000..bfd3b42 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java @@ -0,0 +1,620 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface RolloutOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Rollout) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Name of the `Rollout`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Optional. Name of the `Rollout`. Format is projects/{project}/
+   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Unique identifier of the `Rollout`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. Unique identifier of the `Rollout`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Description of the `Rollout` for user purposes. Max length is 255
+   * characters.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Description of the `Rollout` for user purposes. Max length is 255
+   * characters.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + int getAnnotationsCount(); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + java.lang.String getAnnotationsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 4; + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Time at which the `Rollout` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time at which the `Rollout` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time at which the `Rollout` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time at which the `Rollout` was approved.
+   * 
+ * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the approveTime field is set. + */ + boolean hasApproveTime(); + /** + * + * + *
+   * Output only. Time at which the `Rollout` was approved.
+   * 
+ * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The approveTime. + */ + com.google.protobuf.Timestamp getApproveTime(); + /** + * + * + *
+   * Output only. Time at which the `Rollout` was approved.
+   * 
+ * + * .google.protobuf.Timestamp approve_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getApproveTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time at which the `Rollout` was enqueued.
+   * 
+ * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the enqueueTime field is set. + */ + boolean hasEnqueueTime(); + /** + * + * + *
+   * Output only. Time at which the `Rollout` was enqueued.
+   * 
+ * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enqueueTime. + */ + com.google.protobuf.Timestamp getEnqueueTime(); + /** + * + * + *
+   * Output only. Time at which the `Rollout` was enqueued.
+   * 
+ * + * .google.protobuf.Timestamp enqueue_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEnqueueTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time at which the `Rollout` started deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployStartTime field is set. + */ + boolean hasDeployStartTime(); + /** + * + * + *
+   * Output only. Time at which the `Rollout` started deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployStartTime. + */ + com.google.protobuf.Timestamp getDeployStartTime(); + /** + * + * + *
+   * Output only. Time at which the `Rollout` started deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeployStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time at which the `Rollout` finished deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployEndTime field is set. + */ + boolean hasDeployEndTime(); + /** + * + * + *
+   * Output only. Time at which the `Rollout` finished deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployEndTime. + */ + com.google.protobuf.Timestamp getDeployEndTime(); + /** + * + * + *
+   * Output only. Time at which the `Rollout` finished deploying.
+   * 
+ * + * + * .google.protobuf.Timestamp deploy_end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeployEndTimeOrBuilder(); + + /** + * + * + *
+   * Required. The ID of Target to which this `Rollout` is deploying.
+   * 
+ * + * string target_id = 18 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetId. + */ + java.lang.String getTargetId(); + /** + * + * + *
+   * Required. The ID of Target to which this `Rollout` is deploying.
+   * 
+ * + * string target_id = 18 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetId. + */ + com.google.protobuf.ByteString getTargetIdBytes(); + + /** + * + * + *
+   * Output only. Approval state of the `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.Rollout.ApprovalState approval_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for approvalState. + */ + int getApprovalStateValue(); + /** + * + * + *
+   * Output only. Approval state of the `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.Rollout.ApprovalState approval_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The approvalState. + */ + com.google.cloud.deploy.v1.Rollout.ApprovalState getApprovalState(); + + /** + * + * + *
+   * Output only. Current state of the `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.Rollout.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current state of the `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.Rollout.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.deploy.v1.Rollout.State getState(); + + /** + * + * + *
+   * Output only. Reason the build failed. Empty if the build succeeded.
+   * 
+ * + * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureReason. + */ + java.lang.String getFailureReason(); + /** + * + * + *
+   * Output only. Reason the build failed. Empty if the build succeeded.
+   * 
+ * + * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureReason. + */ + com.google.protobuf.ByteString getFailureReasonBytes(); + + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to deploy
+   * the Rollout. Format is
+   * `projects/{project}/locations/{location}/builds/{build}`.
+   * 
+ * + * + * string deploying_build = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The deployingBuild. + */ + java.lang.String getDeployingBuild(); + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to deploy
+   * the Rollout. Format is
+   * `projects/{project}/locations/{location}/builds/{build}`.
+   * 
+ * + * + * string deploying_build = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for deployingBuild. + */ + com.google.protobuf.ByteString getDeployingBuildBytes(); + + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 16; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 16; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipeline.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipeline.java new file mode 100644 index 0000000..7ab3738 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipeline.java @@ -0,0 +1,966 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.SerialPipeline} + */ +public final class SerialPipeline extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.SerialPipeline) + SerialPipelineOrBuilder { + private static final long serialVersionUID = 0L; + // Use SerialPipeline.newBuilder() to construct. + private SerialPipeline(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SerialPipeline() { + stages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SerialPipeline(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SerialPipeline( + 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)) { + stages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + stages_.add( + input.readMessage(com.google.cloud.deploy.v1.Stage.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)) { + stages_ = java.util.Collections.unmodifiableList(stages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_SerialPipeline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_SerialPipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.SerialPipeline.class, + com.google.cloud.deploy.v1.SerialPipeline.Builder.class); + } + + public static final int STAGES_FIELD_NUMBER = 1; + private java.util.List stages_; + /** + * + * + *
+   * Each stage specifies configuration for a `Target`. The ordering
+   * of this list defines the promotion flow.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + @java.lang.Override + public java.util.List getStagesList() { + return stages_; + } + /** + * + * + *
+   * Each stage specifies configuration for a `Target`. The ordering
+   * of this list defines the promotion flow.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + @java.lang.Override + public java.util.List + getStagesOrBuilderList() { + return stages_; + } + /** + * + * + *
+   * Each stage specifies configuration for a `Target`. The ordering
+   * of this list defines the promotion flow.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + @java.lang.Override + public int getStagesCount() { + return stages_.size(); + } + /** + * + * + *
+   * Each stage specifies configuration for a `Target`. The ordering
+   * of this list defines the promotion flow.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Stage getStages(int index) { + return stages_.get(index); + } + /** + * + * + *
+   * Each stage specifies configuration for a `Target`. The ordering
+   * of this list defines the promotion flow.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.StageOrBuilder getStagesOrBuilder(int index) { + return stages_.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 < stages_.size(); i++) { + output.writeMessage(1, stages_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < stages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, stages_.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.deploy.v1.SerialPipeline)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.SerialPipeline other = + (com.google.cloud.deploy.v1.SerialPipeline) obj; + + if (!getStagesList().equals(other.getStagesList())) 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 (getStagesCount() > 0) { + hash = (37 * hash) + STAGES_FIELD_NUMBER; + hash = (53 * hash) + getStagesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.SerialPipeline parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.SerialPipeline 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.deploy.v1.SerialPipeline parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.SerialPipeline parseFrom( + 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.deploy.v1.SerialPipeline parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.SerialPipeline parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.SerialPipeline parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.SerialPipeline parseFrom( + java.io.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.deploy.v1.SerialPipeline parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.SerialPipeline parseDelimitedFrom( + java.io.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.deploy.v1.SerialPipeline parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.SerialPipeline parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.SerialPipeline prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.SerialPipeline} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.SerialPipeline) + com.google.cloud.deploy.v1.SerialPipelineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_SerialPipeline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_SerialPipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.SerialPipeline.class, + com.google.cloud.deploy.v1.SerialPipeline.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.SerialPipeline.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStagesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (stagesBuilder_ == null) { + stages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + stagesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_SerialPipeline_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.SerialPipeline getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.SerialPipeline.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.SerialPipeline build() { + com.google.cloud.deploy.v1.SerialPipeline result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.SerialPipeline buildPartial() { + com.google.cloud.deploy.v1.SerialPipeline result = + new com.google.cloud.deploy.v1.SerialPipeline(this); + int from_bitField0_ = bitField0_; + if (stagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + stages_ = java.util.Collections.unmodifiableList(stages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.stages_ = stages_; + } else { + result.stages_ = stagesBuilder_.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.deploy.v1.SerialPipeline) { + return mergeFrom((com.google.cloud.deploy.v1.SerialPipeline) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.SerialPipeline other) { + if (other == com.google.cloud.deploy.v1.SerialPipeline.getDefaultInstance()) return this; + if (stagesBuilder_ == null) { + if (!other.stages_.isEmpty()) { + if (stages_.isEmpty()) { + stages_ = other.stages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStagesIsMutable(); + stages_.addAll(other.stages_); + } + onChanged(); + } + } else { + if (!other.stages_.isEmpty()) { + if (stagesBuilder_.isEmpty()) { + stagesBuilder_.dispose(); + stagesBuilder_ = null; + stages_ = other.stages_; + bitField0_ = (bitField0_ & ~0x00000001); + stagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStagesFieldBuilder() + : null; + } else { + stagesBuilder_.addAllMessages(other.stages_); + } + } + } + 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.deploy.v1.SerialPipeline parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.SerialPipeline) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List stages_ = + java.util.Collections.emptyList(); + + private void ensureStagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + stages_ = new java.util.ArrayList(stages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Stage, + com.google.cloud.deploy.v1.Stage.Builder, + com.google.cloud.deploy.v1.StageOrBuilder> + stagesBuilder_; + + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public java.util.List getStagesList() { + if (stagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(stages_); + } else { + return stagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public int getStagesCount() { + if (stagesBuilder_ == null) { + return stages_.size(); + } else { + return stagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public com.google.cloud.deploy.v1.Stage getStages(int index) { + if (stagesBuilder_ == null) { + return stages_.get(index); + } else { + return stagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public Builder setStages(int index, com.google.cloud.deploy.v1.Stage value) { + if (stagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesIsMutable(); + stages_.set(index, value); + onChanged(); + } else { + stagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public Builder setStages(int index, com.google.cloud.deploy.v1.Stage.Builder builderForValue) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.set(index, builderForValue.build()); + onChanged(); + } else { + stagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public Builder addStages(com.google.cloud.deploy.v1.Stage value) { + if (stagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesIsMutable(); + stages_.add(value); + onChanged(); + } else { + stagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public Builder addStages(int index, com.google.cloud.deploy.v1.Stage value) { + if (stagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesIsMutable(); + stages_.add(index, value); + onChanged(); + } else { + stagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public Builder addStages(com.google.cloud.deploy.v1.Stage.Builder builderForValue) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(builderForValue.build()); + onChanged(); + } else { + stagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public Builder addStages(int index, com.google.cloud.deploy.v1.Stage.Builder builderForValue) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(index, builderForValue.build()); + onChanged(); + } else { + stagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public Builder addAllStages( + java.lang.Iterable values) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, stages_); + onChanged(); + } else { + stagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public Builder clearStages() { + if (stagesBuilder_ == null) { + stages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + stagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public Builder removeStages(int index) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.remove(index); + onChanged(); + } else { + stagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public com.google.cloud.deploy.v1.Stage.Builder getStagesBuilder(int index) { + return getStagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public com.google.cloud.deploy.v1.StageOrBuilder getStagesOrBuilder(int index) { + if (stagesBuilder_ == null) { + return stages_.get(index); + } else { + return stagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public java.util.List + getStagesOrBuilderList() { + if (stagesBuilder_ != null) { + return stagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(stages_); + } + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public com.google.cloud.deploy.v1.Stage.Builder addStagesBuilder() { + return getStagesFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.Stage.getDefaultInstance()); + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public com.google.cloud.deploy.v1.Stage.Builder addStagesBuilder(int index) { + return getStagesFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.Stage.getDefaultInstance()); + } + /** + * + * + *
+     * Each stage specifies configuration for a `Target`. The ordering
+     * of this list defines the promotion flow.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + public java.util.List getStagesBuilderList() { + return getStagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Stage, + com.google.cloud.deploy.v1.Stage.Builder, + com.google.cloud.deploy.v1.StageOrBuilder> + getStagesFieldBuilder() { + if (stagesBuilder_ == null) { + stagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Stage, + com.google.cloud.deploy.v1.Stage.Builder, + com.google.cloud.deploy.v1.StageOrBuilder>( + stages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + stages_ = null; + } + return stagesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.SerialPipeline) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.SerialPipeline) + private static final com.google.cloud.deploy.v1.SerialPipeline DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.SerialPipeline(); + } + + public static com.google.cloud.deploy.v1.SerialPipeline getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SerialPipeline parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SerialPipeline(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.deploy.v1.SerialPipeline getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipelineOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipelineOrBuilder.java new file mode 100644 index 0000000..156842f --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipelineOrBuilder.java @@ -0,0 +1,81 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface SerialPipelineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.SerialPipeline) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Each stage specifies configuration for a `Target`. The ordering
+   * of this list defines the promotion flow.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + java.util.List getStagesList(); + /** + * + * + *
+   * Each stage specifies configuration for a `Target`. The ordering
+   * of this list defines the promotion flow.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + com.google.cloud.deploy.v1.Stage getStages(int index); + /** + * + * + *
+   * Each stage specifies configuration for a `Target`. The ordering
+   * of this list defines the promotion flow.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + int getStagesCount(); + /** + * + * + *
+   * Each stage specifies configuration for a `Target`. The ordering
+   * of this list defines the promotion flow.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + java.util.List getStagesOrBuilderList(); + /** + * + * + *
+   * Each stage specifies configuration for a `Target`. The ordering
+   * of this list defines the promotion flow.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Stage stages = 1; + */ + com.google.cloud.deploy.v1.StageOrBuilder getStagesOrBuilder(int index); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersion.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersion.java new file mode 100644 index 0000000..e0a607d --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersion.java @@ -0,0 +1,899 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Details of a supported Skaffold version.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.SkaffoldVersion} + */ +public final class SkaffoldVersion extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.SkaffoldVersion) + SkaffoldVersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SkaffoldVersion.newBuilder() to construct. + private SkaffoldVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SkaffoldVersion() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SkaffoldVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SkaffoldVersion( + 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(); + + version_ = s; + break; + } + case 18: + { + com.google.type.Date.Builder subBuilder = null; + if (supportEndDate_ != null) { + subBuilder = supportEndDate_.toBuilder(); + } + supportEndDate_ = input.readMessage(com.google.type.Date.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(supportEndDate_); + supportEndDate_ = 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_SkaffoldVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_SkaffoldVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.SkaffoldVersion.class, + com.google.cloud.deploy.v1.SkaffoldVersion.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + * + * + *
+   * Release version number. For example, "1.20.3".
+   * 
+ * + * string version = 1; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Release version number. For example, "1.20.3".
+   * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUPPORT_END_DATE_FIELD_NUMBER = 2; + private com.google.type.Date supportEndDate_; + /** + * + * + *
+   * Date when this version is expected to no longer be supported.
+   * 
+ * + * .google.type.Date support_end_date = 2; + * + * @return Whether the supportEndDate field is set. + */ + @java.lang.Override + public boolean hasSupportEndDate() { + return supportEndDate_ != null; + } + /** + * + * + *
+   * Date when this version is expected to no longer be supported.
+   * 
+ * + * .google.type.Date support_end_date = 2; + * + * @return The supportEndDate. + */ + @java.lang.Override + public com.google.type.Date getSupportEndDate() { + return supportEndDate_ == null ? com.google.type.Date.getDefaultInstance() : supportEndDate_; + } + /** + * + * + *
+   * Date when this version is expected to no longer be supported.
+   * 
+ * + * .google.type.Date support_end_date = 2; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getSupportEndDateOrBuilder() { + return getSupportEndDate(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (supportEndDate_ != null) { + output.writeMessage(2, getSupportEndDate()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (supportEndDate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSupportEndDate()); + } + 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.deploy.v1.SkaffoldVersion)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.SkaffoldVersion other = + (com.google.cloud.deploy.v1.SkaffoldVersion) obj; + + if (!getVersion().equals(other.getVersion())) return false; + if (hasSupportEndDate() != other.hasSupportEndDate()) return false; + if (hasSupportEndDate()) { + if (!getSupportEndDate().equals(other.getSupportEndDate())) 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) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (hasSupportEndDate()) { + hash = (37 * hash) + SUPPORT_END_DATE_FIELD_NUMBER; + hash = (53 * hash) + getSupportEndDate().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.SkaffoldVersion parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.SkaffoldVersion 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.deploy.v1.SkaffoldVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.SkaffoldVersion parseFrom( + 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.deploy.v1.SkaffoldVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.SkaffoldVersion parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.SkaffoldVersion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.SkaffoldVersion parseFrom( + java.io.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.deploy.v1.SkaffoldVersion parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.SkaffoldVersion parseDelimitedFrom( + java.io.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.deploy.v1.SkaffoldVersion parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.SkaffoldVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.SkaffoldVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a supported Skaffold version.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.SkaffoldVersion} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.SkaffoldVersion) + com.google.cloud.deploy.v1.SkaffoldVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_SkaffoldVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_SkaffoldVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.SkaffoldVersion.class, + com.google.cloud.deploy.v1.SkaffoldVersion.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.SkaffoldVersion.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(); + version_ = ""; + + if (supportEndDateBuilder_ == null) { + supportEndDate_ = null; + } else { + supportEndDate_ = null; + supportEndDateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_SkaffoldVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.SkaffoldVersion getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.SkaffoldVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.SkaffoldVersion build() { + com.google.cloud.deploy.v1.SkaffoldVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.SkaffoldVersion buildPartial() { + com.google.cloud.deploy.v1.SkaffoldVersion result = + new com.google.cloud.deploy.v1.SkaffoldVersion(this); + result.version_ = version_; + if (supportEndDateBuilder_ == null) { + result.supportEndDate_ = supportEndDate_; + } else { + result.supportEndDate_ = supportEndDateBuilder_.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.deploy.v1.SkaffoldVersion) { + return mergeFrom((com.google.cloud.deploy.v1.SkaffoldVersion) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.SkaffoldVersion other) { + if (other == com.google.cloud.deploy.v1.SkaffoldVersion.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (other.hasSupportEndDate()) { + mergeSupportEndDate(other.getSupportEndDate()); + } + 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.deploy.v1.SkaffoldVersion parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.SkaffoldVersion) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Release version number. For example, "1.20.3".
+     * 
+ * + * string version = 1; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Release version number. For example, "1.20.3".
+     * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Release version number. For example, "1.20.3".
+     * 
+ * + * string version = 1; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Release version number. For example, "1.20.3".
+     * 
+ * + * string version = 1; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Release version number. For example, "1.20.3".
+     * 
+ * + * string version = 1; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private com.google.type.Date supportEndDate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + supportEndDateBuilder_; + /** + * + * + *
+     * Date when this version is expected to no longer be supported.
+     * 
+ * + * .google.type.Date support_end_date = 2; + * + * @return Whether the supportEndDate field is set. + */ + public boolean hasSupportEndDate() { + return supportEndDateBuilder_ != null || supportEndDate_ != null; + } + /** + * + * + *
+     * Date when this version is expected to no longer be supported.
+     * 
+ * + * .google.type.Date support_end_date = 2; + * + * @return The supportEndDate. + */ + public com.google.type.Date getSupportEndDate() { + if (supportEndDateBuilder_ == null) { + return supportEndDate_ == null + ? com.google.type.Date.getDefaultInstance() + : supportEndDate_; + } else { + return supportEndDateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Date when this version is expected to no longer be supported.
+     * 
+ * + * .google.type.Date support_end_date = 2; + */ + public Builder setSupportEndDate(com.google.type.Date value) { + if (supportEndDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + supportEndDate_ = value; + onChanged(); + } else { + supportEndDateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Date when this version is expected to no longer be supported.
+     * 
+ * + * .google.type.Date support_end_date = 2; + */ + public Builder setSupportEndDate(com.google.type.Date.Builder builderForValue) { + if (supportEndDateBuilder_ == null) { + supportEndDate_ = builderForValue.build(); + onChanged(); + } else { + supportEndDateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Date when this version is expected to no longer be supported.
+     * 
+ * + * .google.type.Date support_end_date = 2; + */ + public Builder mergeSupportEndDate(com.google.type.Date value) { + if (supportEndDateBuilder_ == null) { + if (supportEndDate_ != null) { + supportEndDate_ = + com.google.type.Date.newBuilder(supportEndDate_).mergeFrom(value).buildPartial(); + } else { + supportEndDate_ = value; + } + onChanged(); + } else { + supportEndDateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Date when this version is expected to no longer be supported.
+     * 
+ * + * .google.type.Date support_end_date = 2; + */ + public Builder clearSupportEndDate() { + if (supportEndDateBuilder_ == null) { + supportEndDate_ = null; + onChanged(); + } else { + supportEndDate_ = null; + supportEndDateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Date when this version is expected to no longer be supported.
+     * 
+ * + * .google.type.Date support_end_date = 2; + */ + public com.google.type.Date.Builder getSupportEndDateBuilder() { + + onChanged(); + return getSupportEndDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Date when this version is expected to no longer be supported.
+     * 
+ * + * .google.type.Date support_end_date = 2; + */ + public com.google.type.DateOrBuilder getSupportEndDateOrBuilder() { + if (supportEndDateBuilder_ != null) { + return supportEndDateBuilder_.getMessageOrBuilder(); + } else { + return supportEndDate_ == null + ? com.google.type.Date.getDefaultInstance() + : supportEndDate_; + } + } + /** + * + * + *
+     * Date when this version is expected to no longer be supported.
+     * 
+ * + * .google.type.Date support_end_date = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getSupportEndDateFieldBuilder() { + if (supportEndDateBuilder_ == null) { + supportEndDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getSupportEndDate(), getParentForChildren(), isClean()); + supportEndDate_ = null; + } + return supportEndDateBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.SkaffoldVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.SkaffoldVersion) + private static final com.google.cloud.deploy.v1.SkaffoldVersion DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.SkaffoldVersion(); + } + + public static com.google.cloud.deploy.v1.SkaffoldVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SkaffoldVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SkaffoldVersion(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.deploy.v1.SkaffoldVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersionOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersionOrBuilder.java new file mode 100644 index 0000000..d19cc82 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersionOrBuilder.java @@ -0,0 +1,85 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface SkaffoldVersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.SkaffoldVersion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Release version number. For example, "1.20.3".
+   * 
+ * + * string version = 1; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Release version number. For example, "1.20.3".
+   * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Date when this version is expected to no longer be supported.
+   * 
+ * + * .google.type.Date support_end_date = 2; + * + * @return Whether the supportEndDate field is set. + */ + boolean hasSupportEndDate(); + /** + * + * + *
+   * Date when this version is expected to no longer be supported.
+   * 
+ * + * .google.type.Date support_end_date = 2; + * + * @return The supportEndDate. + */ + com.google.type.Date getSupportEndDate(); + /** + * + * + *
+   * Date when this version is expected to no longer be supported.
+   * 
+ * + * .google.type.Date support_end_date = 2; + */ + com.google.type.DateOrBuilder getSupportEndDateOrBuilder(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Stage.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Stage.java new file mode 100644 index 0000000..24ac549 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Stage.java @@ -0,0 +1,958 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Stage specifies a location to which to deploy.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Stage} + */ +public final class Stage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Stage) + StageOrBuilder { + private static final long serialVersionUID = 0L; + // Use Stage.newBuilder() to construct. + private Stage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Stage() { + targetId_ = ""; + profiles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Stage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Stage( + 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(); + + targetId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + profiles_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + profiles_.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)) { + profiles_ = profiles_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Stage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Stage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Stage.class, com.google.cloud.deploy.v1.Stage.Builder.class); + } + + public static final int TARGET_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object targetId_; + /** + * + * + *
+   * The target_id to which this stage points. This field refers exclusively to
+   * the last segment of a target name. For example, this field would just be
+   * `my-target` (rather than
+   * `projects/project/deliveryPipelines/pipeline/targets/my-target`). The
+   * parent `DeliveryPipeline` of the `Target` is inferred to be the parent
+   * `DeliveryPipeline` of the `Release` in which this `Stage` lives.
+   * 
+ * + * string target_id = 1; + * + * @return The targetId. + */ + @java.lang.Override + public java.lang.String getTargetId() { + java.lang.Object ref = targetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetId_ = s; + return s; + } + } + /** + * + * + *
+   * The target_id to which this stage points. This field refers exclusively to
+   * the last segment of a target name. For example, this field would just be
+   * `my-target` (rather than
+   * `projects/project/deliveryPipelines/pipeline/targets/my-target`). The
+   * parent `DeliveryPipeline` of the `Target` is inferred to be the parent
+   * `DeliveryPipeline` of the `Release` in which this `Stage` lives.
+   * 
+ * + * string target_id = 1; + * + * @return The bytes for targetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetIdBytes() { + java.lang.Object ref = targetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROFILES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList profiles_; + /** + * + * + *
+   * Skaffold profiles to use when rendering the manifest for this stage's
+   * `Target`.
+   * 
+ * + * repeated string profiles = 2; + * + * @return A list containing the profiles. + */ + public com.google.protobuf.ProtocolStringList getProfilesList() { + return profiles_; + } + /** + * + * + *
+   * Skaffold profiles to use when rendering the manifest for this stage's
+   * `Target`.
+   * 
+ * + * repeated string profiles = 2; + * + * @return The count of profiles. + */ + public int getProfilesCount() { + return profiles_.size(); + } + /** + * + * + *
+   * Skaffold profiles to use when rendering the manifest for this stage's
+   * `Target`.
+   * 
+ * + * repeated string profiles = 2; + * + * @param index The index of the element to return. + * @return The profiles at the given index. + */ + public java.lang.String getProfiles(int index) { + return profiles_.get(index); + } + /** + * + * + *
+   * Skaffold profiles to use when rendering the manifest for this stage's
+   * `Target`.
+   * 
+ * + * repeated string profiles = 2; + * + * @param index The index of the value to return. + * @return The bytes of the profiles at the given index. + */ + public com.google.protobuf.ByteString getProfilesBytes(int index) { + return profiles_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTargetIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, targetId_); + } + for (int i = 0; i < profiles_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, profiles_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTargetIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, targetId_); + } + { + int dataSize = 0; + for (int i = 0; i < profiles_.size(); i++) { + dataSize += computeStringSizeNoTag(profiles_.getRaw(i)); + } + size += dataSize; + size += 1 * getProfilesList().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.deploy.v1.Stage)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Stage other = (com.google.cloud.deploy.v1.Stage) obj; + + if (!getTargetId().equals(other.getTargetId())) return false; + if (!getProfilesList().equals(other.getProfilesList())) 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) + TARGET_ID_FIELD_NUMBER; + hash = (53 * hash) + getTargetId().hashCode(); + if (getProfilesCount() > 0) { + hash = (37 * hash) + PROFILES_FIELD_NUMBER; + hash = (53 * hash) + getProfilesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Stage parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Stage 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.deploy.v1.Stage parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Stage parseFrom( + 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.deploy.v1.Stage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Stage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Stage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Stage parseFrom( + java.io.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.deploy.v1.Stage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Stage parseDelimitedFrom( + java.io.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.deploy.v1.Stage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Stage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.Stage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Stage specifies a location to which to deploy.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Stage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Stage) + com.google.cloud.deploy.v1.StageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Stage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Stage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Stage.class, + com.google.cloud.deploy.v1.Stage.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Stage.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(); + targetId_ = ""; + + profiles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Stage_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Stage getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Stage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Stage build() { + com.google.cloud.deploy.v1.Stage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Stage buildPartial() { + com.google.cloud.deploy.v1.Stage result = new com.google.cloud.deploy.v1.Stage(this); + int from_bitField0_ = bitField0_; + result.targetId_ = targetId_; + if (((bitField0_ & 0x00000001) != 0)) { + profiles_ = profiles_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.profiles_ = profiles_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.Stage) { + return mergeFrom((com.google.cloud.deploy.v1.Stage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Stage other) { + if (other == com.google.cloud.deploy.v1.Stage.getDefaultInstance()) return this; + if (!other.getTargetId().isEmpty()) { + targetId_ = other.targetId_; + onChanged(); + } + if (!other.profiles_.isEmpty()) { + if (profiles_.isEmpty()) { + profiles_ = other.profiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProfilesIsMutable(); + profiles_.addAll(other.profiles_); + } + 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.deploy.v1.Stage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.Stage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object targetId_ = ""; + /** + * + * + *
+     * The target_id to which this stage points. This field refers exclusively to
+     * the last segment of a target name. For example, this field would just be
+     * `my-target` (rather than
+     * `projects/project/deliveryPipelines/pipeline/targets/my-target`). The
+     * parent `DeliveryPipeline` of the `Target` is inferred to be the parent
+     * `DeliveryPipeline` of the `Release` in which this `Stage` lives.
+     * 
+ * + * string target_id = 1; + * + * @return The targetId. + */ + public java.lang.String getTargetId() { + java.lang.Object ref = targetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The target_id to which this stage points. This field refers exclusively to
+     * the last segment of a target name. For example, this field would just be
+     * `my-target` (rather than
+     * `projects/project/deliveryPipelines/pipeline/targets/my-target`). The
+     * parent `DeliveryPipeline` of the `Target` is inferred to be the parent
+     * `DeliveryPipeline` of the `Release` in which this `Stage` lives.
+     * 
+ * + * string target_id = 1; + * + * @return The bytes for targetId. + */ + public com.google.protobuf.ByteString getTargetIdBytes() { + java.lang.Object ref = targetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The target_id to which this stage points. This field refers exclusively to
+     * the last segment of a target name. For example, this field would just be
+     * `my-target` (rather than
+     * `projects/project/deliveryPipelines/pipeline/targets/my-target`). The
+     * parent `DeliveryPipeline` of the `Target` is inferred to be the parent
+     * `DeliveryPipeline` of the `Release` in which this `Stage` lives.
+     * 
+ * + * string target_id = 1; + * + * @param value The targetId to set. + * @return This builder for chaining. + */ + public Builder setTargetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The target_id to which this stage points. This field refers exclusively to
+     * the last segment of a target name. For example, this field would just be
+     * `my-target` (rather than
+     * `projects/project/deliveryPipelines/pipeline/targets/my-target`). The
+     * parent `DeliveryPipeline` of the `Target` is inferred to be the parent
+     * `DeliveryPipeline` of the `Release` in which this `Stage` lives.
+     * 
+ * + * string target_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearTargetId() { + + targetId_ = getDefaultInstance().getTargetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The target_id to which this stage points. This field refers exclusively to
+     * the last segment of a target name. For example, this field would just be
+     * `my-target` (rather than
+     * `projects/project/deliveryPipelines/pipeline/targets/my-target`). The
+     * parent `DeliveryPipeline` of the `Target` is inferred to be the parent
+     * `DeliveryPipeline` of the `Release` in which this `Stage` lives.
+     * 
+ * + * string target_id = 1; + * + * @param value The bytes for targetId to set. + * @return This builder for chaining. + */ + public Builder setTargetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList profiles_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureProfilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + profiles_ = new com.google.protobuf.LazyStringArrayList(profiles_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Skaffold profiles to use when rendering the manifest for this stage's
+     * `Target`.
+     * 
+ * + * repeated string profiles = 2; + * + * @return A list containing the profiles. + */ + public com.google.protobuf.ProtocolStringList getProfilesList() { + return profiles_.getUnmodifiableView(); + } + /** + * + * + *
+     * Skaffold profiles to use when rendering the manifest for this stage's
+     * `Target`.
+     * 
+ * + * repeated string profiles = 2; + * + * @return The count of profiles. + */ + public int getProfilesCount() { + return profiles_.size(); + } + /** + * + * + *
+     * Skaffold profiles to use when rendering the manifest for this stage's
+     * `Target`.
+     * 
+ * + * repeated string profiles = 2; + * + * @param index The index of the element to return. + * @return The profiles at the given index. + */ + public java.lang.String getProfiles(int index) { + return profiles_.get(index); + } + /** + * + * + *
+     * Skaffold profiles to use when rendering the manifest for this stage's
+     * `Target`.
+     * 
+ * + * repeated string profiles = 2; + * + * @param index The index of the value to return. + * @return The bytes of the profiles at the given index. + */ + public com.google.protobuf.ByteString getProfilesBytes(int index) { + return profiles_.getByteString(index); + } + /** + * + * + *
+     * Skaffold profiles to use when rendering the manifest for this stage's
+     * `Target`.
+     * 
+ * + * repeated string profiles = 2; + * + * @param index The index to set the value at. + * @param value The profiles to set. + * @return This builder for chaining. + */ + public Builder setProfiles(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfilesIsMutable(); + profiles_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Skaffold profiles to use when rendering the manifest for this stage's
+     * `Target`.
+     * 
+ * + * repeated string profiles = 2; + * + * @param value The profiles to add. + * @return This builder for chaining. + */ + public Builder addProfiles(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfilesIsMutable(); + profiles_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Skaffold profiles to use when rendering the manifest for this stage's
+     * `Target`.
+     * 
+ * + * repeated string profiles = 2; + * + * @param values The profiles to add. + * @return This builder for chaining. + */ + public Builder addAllProfiles(java.lang.Iterable values) { + ensureProfilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, profiles_); + onChanged(); + return this; + } + /** + * + * + *
+     * Skaffold profiles to use when rendering the manifest for this stage's
+     * `Target`.
+     * 
+ * + * repeated string profiles = 2; + * + * @return This builder for chaining. + */ + public Builder clearProfiles() { + profiles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Skaffold profiles to use when rendering the manifest for this stage's
+     * `Target`.
+     * 
+ * + * repeated string profiles = 2; + * + * @param value The bytes of the profiles to add. + * @return This builder for chaining. + */ + public Builder addProfilesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProfilesIsMutable(); + profiles_.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.deploy.v1.Stage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Stage) + private static final com.google.cloud.deploy.v1.Stage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Stage(); + } + + public static com.google.cloud.deploy.v1.Stage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Stage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Stage(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.deploy.v1.Stage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StageOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StageOrBuilder.java new file mode 100644 index 0000000..abb2bb4 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StageOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface StageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Stage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The target_id to which this stage points. This field refers exclusively to
+   * the last segment of a target name. For example, this field would just be
+   * `my-target` (rather than
+   * `projects/project/deliveryPipelines/pipeline/targets/my-target`). The
+   * parent `DeliveryPipeline` of the `Target` is inferred to be the parent
+   * `DeliveryPipeline` of the `Release` in which this `Stage` lives.
+   * 
+ * + * string target_id = 1; + * + * @return The targetId. + */ + java.lang.String getTargetId(); + /** + * + * + *
+   * The target_id to which this stage points. This field refers exclusively to
+   * the last segment of a target name. For example, this field would just be
+   * `my-target` (rather than
+   * `projects/project/deliveryPipelines/pipeline/targets/my-target`). The
+   * parent `DeliveryPipeline` of the `Target` is inferred to be the parent
+   * `DeliveryPipeline` of the `Release` in which this `Stage` lives.
+   * 
+ * + * string target_id = 1; + * + * @return The bytes for targetId. + */ + com.google.protobuf.ByteString getTargetIdBytes(); + + /** + * + * + *
+   * Skaffold profiles to use when rendering the manifest for this stage's
+   * `Target`.
+   * 
+ * + * repeated string profiles = 2; + * + * @return A list containing the profiles. + */ + java.util.List getProfilesList(); + /** + * + * + *
+   * Skaffold profiles to use when rendering the manifest for this stage's
+   * `Target`.
+   * 
+ * + * repeated string profiles = 2; + * + * @return The count of profiles. + */ + int getProfilesCount(); + /** + * + * + *
+   * Skaffold profiles to use when rendering the manifest for this stage's
+   * `Target`.
+   * 
+ * + * repeated string profiles = 2; + * + * @param index The index of the element to return. + * @return The profiles at the given index. + */ + java.lang.String getProfiles(int index); + /** + * + * + *
+   * Skaffold profiles to use when rendering the manifest for this stage's
+   * `Target`.
+   * 
+ * + * repeated string profiles = 2; + * + * @param index The index of the value to return. + * @return The bytes of the profiles at the given index. + */ + com.google.protobuf.ByteString getProfilesBytes(int index); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java new file mode 100644 index 0000000..18e74c4 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java @@ -0,0 +1,3791 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * A `Target` resource in the Google Cloud Deploy API.
+ * A `Target` defines a location to which a Skaffold configuration
+ * can be deployed.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Target} + */ +public final class Target extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Target) + TargetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Target.newBuilder() to construct. + private Target(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Target() { + name_ = ""; + targetId_ = ""; + uid_ = ""; + description_ = ""; + etag_ = ""; + executionConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Target(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Target( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetId_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + uid_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotations_ = + com.google.protobuf.MapField.newMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = s; + break; + } + case 104: + { + requireApproval_ = input.readBool(); + break; + } + case 122: + { + com.google.cloud.deploy.v1.GkeCluster.Builder subBuilder = null; + if (deploymentTargetCase_ == 15) { + subBuilder = + ((com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_).toBuilder(); + } + deploymentTarget_ = + input.readMessage( + com.google.cloud.deploy.v1.GkeCluster.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_); + deploymentTarget_ = subBuilder.buildPartial(); + } + deploymentTargetCase_ = 15; + break; + } + case 130: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + executionConfigs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + executionConfigs_.add( + input.readMessage( + com.google.cloud.deploy.v1.ExecutionConfig.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_ & 0x00000004) != 0)) { + executionConfigs_ = java.util.Collections.unmodifiableList(executionConfigs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Target_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + case 6: + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Target_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Target.class, + com.google.cloud.deploy.v1.Target.Builder.class); + } + + private int deploymentTargetCase_ = 0; + private java.lang.Object deploymentTarget_; + + public enum DeploymentTargetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GKE(15), + DEPLOYMENTTARGET_NOT_SET(0); + private final int value; + + private DeploymentTargetCase(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 DeploymentTargetCase valueOf(int value) { + return forNumber(value); + } + + public static DeploymentTargetCase forNumber(int value) { + switch (value) { + case 15: + return GKE; + case 0: + return DEPLOYMENTTARGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DeploymentTargetCase getDeploymentTargetCase() { + return DeploymentTargetCase.forNumber(deploymentTargetCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/
+   * deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+   * Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/
+   * deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 TARGET_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object targetId_; + /** + * + * + *
+   * Output only. Resource id of the `Target`.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The targetId. + */ + @java.lang.Override + public java.lang.String getTargetId() { + java.lang.Object ref = targetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource id of the `Target`.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for targetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetIdBytes() { + java.lang.Object ref = targetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 3; + private volatile java.lang.Object uid_; + /** + * + * + *
+   * Output only. Unique identifier of the `Target`.
+   * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Unique identifier of the `Target`.
+   * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. Description of the `Target`. Max length is 255 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Description of the `Target`. Max length is 255 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Target_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LABELS_FIELD_NUMBER = 6; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Target_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(); + } + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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 REQUIRE_APPROVAL_FIELD_NUMBER = 13; + private boolean requireApproval_; + /** + * + * + *
+   * Optional. Whether or not the `Target` requires approval.
+   * 
+ * + * bool require_approval = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requireApproval. + */ + @java.lang.Override + public boolean getRequireApproval() { + return requireApproval_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time at which the `Target` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the `Target` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time at which the `Target` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Most recent time at which the `Target` was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Most recent time at which the `Target` was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Most recent time at which the `Target` was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int GKE_FIELD_NUMBER = 15; + /** + * + * + *
+   * Information specifying a GKE Cluster.
+   * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + * + * @return Whether the gke field is set. + */ + @java.lang.Override + public boolean hasGke() { + return deploymentTargetCase_ == 15; + } + /** + * + * + *
+   * Information specifying a GKE Cluster.
+   * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + * + * @return The gke. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.GkeCluster getGke() { + if (deploymentTargetCase_ == 15) { + return (com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_; + } + return com.google.cloud.deploy.v1.GkeCluster.getDefaultInstance(); + } + /** + * + * + *
+   * Information specifying a GKE Cluster.
+   * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.GkeClusterOrBuilder getGkeOrBuilder() { + if (deploymentTargetCase_ == 15) { + return (com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_; + } + return com.google.cloud.deploy.v1.GkeCluster.getDefaultInstance(); + } + + public static final int ETAG_FIELD_NUMBER = 12; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_CONFIGS_FIELD_NUMBER = 16; + private java.util.List executionConfigs_; + /** + * + * + *
+   * Configurations for all execution that relates to this `Target`.
+   * Each `ExecutionEnvironmentUsage` value may only be used in a single
+   * configuration; using the same value multiple times is an error.
+   * When one or more configurations are specified, they must include the
+   * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+   * When no configurations are specified, execution will use the default
+   * specified in `DefaultPool`.
+   * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + @java.lang.Override + public java.util.List getExecutionConfigsList() { + return executionConfigs_; + } + /** + * + * + *
+   * Configurations for all execution that relates to this `Target`.
+   * Each `ExecutionEnvironmentUsage` value may only be used in a single
+   * configuration; using the same value multiple times is an error.
+   * When one or more configurations are specified, they must include the
+   * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+   * When no configurations are specified, execution will use the default
+   * specified in `DefaultPool`.
+   * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + @java.lang.Override + public java.util.List + getExecutionConfigsOrBuilderList() { + return executionConfigs_; + } + /** + * + * + *
+   * Configurations for all execution that relates to this `Target`.
+   * Each `ExecutionEnvironmentUsage` value may only be used in a single
+   * configuration; using the same value multiple times is an error.
+   * When one or more configurations are specified, they must include the
+   * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+   * When no configurations are specified, execution will use the default
+   * specified in `DefaultPool`.
+   * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + @java.lang.Override + public int getExecutionConfigsCount() { + return executionConfigs_.size(); + } + /** + * + * + *
+   * Configurations for all execution that relates to this `Target`.
+   * Each `ExecutionEnvironmentUsage` value may only be used in a single
+   * configuration; using the same value multiple times is an error.
+   * When one or more configurations are specified, they must include the
+   * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+   * When no configurations are specified, execution will use the default
+   * specified in `DefaultPool`.
+   * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.ExecutionConfig getExecutionConfigs(int index) { + return executionConfigs_.get(index); + } + /** + * + * + *
+   * Configurations for all execution that relates to this `Target`.
+   * Each `ExecutionEnvironmentUsage` value may only be used in a single
+   * configuration; using the same value multiple times is an error.
+   * When one or more configurations are specified, they must include the
+   * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+   * When no configurations are specified, execution will use the default
+   * specified in `DefaultPool`.
+   * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.ExecutionConfigOrBuilder getExecutionConfigsOrBuilder( + int index) { + return executionConfigs_.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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getTargetIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetId_); + } + if (!getUidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uid_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); + if (createTime_ != null) { + output.writeMessage(8, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(9, getUpdateTime()); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, etag_); + } + if (requireApproval_ != false) { + output.writeBool(13, requireApproval_); + } + if (deploymentTargetCase_ == 15) { + output.writeMessage(15, (com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_); + } + for (int i = 0; i < executionConfigs_.size(); i++) { + output.writeMessage(16, executionConfigs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getTargetIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetId_); + } + if (!getUidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uid_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + 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(6, labels__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, etag_); + } + if (requireApproval_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, requireApproval_); + } + if (deploymentTargetCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_); + } + for (int i = 0; i < executionConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(16, executionConfigs_.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.deploy.v1.Target)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Target other = (com.google.cloud.deploy.v1.Target) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTargetId().equals(other.getTargetId())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (getRequireApproval() != other.getRequireApproval()) 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 (!getEtag().equals(other.getEtag())) return false; + if (!getExecutionConfigsList().equals(other.getExecutionConfigsList())) return false; + if (!getDeploymentTargetCase().equals(other.getDeploymentTargetCase())) return false; + switch (deploymentTargetCase_) { + case 15: + if (!getGke().equals(other.getGke())) 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) + TARGET_ID_FIELD_NUMBER; + hash = (53 * hash) + getTargetId().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + REQUIRE_APPROVAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequireApproval()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (getExecutionConfigsCount() > 0) { + hash = (37 * hash) + EXECUTION_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getExecutionConfigsList().hashCode(); + } + switch (deploymentTargetCase_) { + case 15: + hash = (37 * hash) + GKE_FIELD_NUMBER; + hash = (53 * hash) + getGke().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Target parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Target 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.deploy.v1.Target parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Target parseFrom( + 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.deploy.v1.Target parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Target parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Target parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Target parseFrom( + java.io.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.deploy.v1.Target parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Target parseDelimitedFrom( + java.io.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.deploy.v1.Target parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Target parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.Target prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 `Target` resource in the Google Cloud Deploy API.
+   * A `Target` defines a location to which a Skaffold configuration
+   * can be deployed.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Target} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Target) + com.google.cloud.deploy.v1.TargetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Target_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 5: + return internalGetMutableAnnotations(); + case 6: + 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Target_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Target.class, + com.google.cloud.deploy.v1.Target.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Target.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExecutionConfigsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + targetId_ = ""; + + uid_ = ""; + + description_ = ""; + + internalGetMutableAnnotations().clear(); + internalGetMutableLabels().clear(); + requireApproval_ = false; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + etag_ = ""; + + if (executionConfigsBuilder_ == null) { + executionConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + executionConfigsBuilder_.clear(); + } + deploymentTargetCase_ = 0; + deploymentTarget_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Target_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Target getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Target.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Target build() { + com.google.cloud.deploy.v1.Target result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Target buildPartial() { + com.google.cloud.deploy.v1.Target result = new com.google.cloud.deploy.v1.Target(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.targetId_ = targetId_; + result.uid_ = uid_; + result.description_ = description_; + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.requireApproval_ = requireApproval_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (deploymentTargetCase_ == 15) { + if (gkeBuilder_ == null) { + result.deploymentTarget_ = deploymentTarget_; + } else { + result.deploymentTarget_ = gkeBuilder_.build(); + } + } + result.etag_ = etag_; + if (executionConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + executionConfigs_ = java.util.Collections.unmodifiableList(executionConfigs_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.executionConfigs_ = executionConfigs_; + } else { + result.executionConfigs_ = executionConfigsBuilder_.build(); + } + result.deploymentTargetCase_ = deploymentTargetCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.Target) { + return mergeFrom((com.google.cloud.deploy.v1.Target) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Target other) { + if (other == com.google.cloud.deploy.v1.Target.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getTargetId().isEmpty()) { + targetId_ = other.targetId_; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.getRequireApproval() != false) { + setRequireApproval(other.getRequireApproval()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + if (executionConfigsBuilder_ == null) { + if (!other.executionConfigs_.isEmpty()) { + if (executionConfigs_.isEmpty()) { + executionConfigs_ = other.executionConfigs_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureExecutionConfigsIsMutable(); + executionConfigs_.addAll(other.executionConfigs_); + } + onChanged(); + } + } else { + if (!other.executionConfigs_.isEmpty()) { + if (executionConfigsBuilder_.isEmpty()) { + executionConfigsBuilder_.dispose(); + executionConfigsBuilder_ = null; + executionConfigs_ = other.executionConfigs_; + bitField0_ = (bitField0_ & ~0x00000004); + executionConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExecutionConfigsFieldBuilder() + : null; + } else { + executionConfigsBuilder_.addAllMessages(other.executionConfigs_); + } + } + } + switch (other.getDeploymentTargetCase()) { + case GKE: + { + mergeGke(other.getGke()); + break; + } + case DEPLOYMENTTARGET_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.deploy.v1.Target parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.Target) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int deploymentTargetCase_ = 0; + private java.lang.Object deploymentTarget_; + + public DeploymentTargetCase getDeploymentTargetCase() { + return DeploymentTargetCase.forNumber(deploymentTargetCase_); + } + + public Builder clearDeploymentTarget() { + deploymentTargetCase_ = 0; + deploymentTarget_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/
+     * deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/
+     * deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/
+     * deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/
+     * deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/
+     * deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 targetId_ = ""; + /** + * + * + *
+     * Output only. Resource id of the `Target`.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The targetId. + */ + public java.lang.String getTargetId() { + java.lang.Object ref = targetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource id of the `Target`.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for targetId. + */ + public com.google.protobuf.ByteString getTargetIdBytes() { + java.lang.Object ref = targetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource id of the `Target`.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The targetId to set. + * @return This builder for chaining. + */ + public Builder setTargetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource id of the `Target`.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTargetId() { + + targetId_ = getDefaultInstance().getTargetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource id of the `Target`.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for targetId to set. + * @return This builder for chaining. + */ + public Builder setTargetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetId_ = value; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. Unique identifier of the `Target`.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier of the `Target`.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier of the `Target`.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `Target`.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `Target`.
+     * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description of the `Target`. Max length is 255 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Description of the `Target`. Max length is 255 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Description of the `Target`. Max length is 255 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the `Target`. Max length is 255 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the `Target`. Max length is 255 characters.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + onChanged(); + ; + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by the
+     * user, and not by Google Cloud Deploy. See
+     * https://google.aip.dev/128#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + return this; + } + + 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(); + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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(); + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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; + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Google Cloud Deploy. Labels must meet the following
+     * constraints: Each resource is limited to 64 labels. Keys must conform to
+     * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+     * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+     * <= 128 bytes in size.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private boolean requireApproval_; + /** + * + * + *
+     * Optional. Whether or not the `Target` requires approval.
+     * 
+ * + * bool require_approval = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requireApproval. + */ + @java.lang.Override + public boolean getRequireApproval() { + return requireApproval_; + } + /** + * + * + *
+     * Optional. Whether or not the `Target` requires approval.
+     * 
+ * + * bool require_approval = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requireApproval to set. + * @return This builder for chaining. + */ + public Builder setRequireApproval(boolean value) { + + requireApproval_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Whether or not the `Target` requires approval.
+     * 
+ * + * bool require_approval = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequireApproval() { + + requireApproval_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the `Target` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the `Target` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the `Target` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Target` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Target` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Target` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `Target` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the `Target` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the `Target` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Most recent time at which the `Target` was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Most recent time at which the `Target` was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Most recent time at which the `Target` was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Most recent time at which the `Target` was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Most recent time at which the `Target` was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Most recent time at which the `Target` was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Most recent time at which the `Target` was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Most recent time at which the `Target` was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Most recent time at which the `Target` was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.GkeCluster, + com.google.cloud.deploy.v1.GkeCluster.Builder, + com.google.cloud.deploy.v1.GkeClusterOrBuilder> + gkeBuilder_; + /** + * + * + *
+     * Information specifying a GKE Cluster.
+     * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + * + * @return Whether the gke field is set. + */ + @java.lang.Override + public boolean hasGke() { + return deploymentTargetCase_ == 15; + } + /** + * + * + *
+     * Information specifying a GKE Cluster.
+     * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + * + * @return The gke. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.GkeCluster getGke() { + if (gkeBuilder_ == null) { + if (deploymentTargetCase_ == 15) { + return (com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_; + } + return com.google.cloud.deploy.v1.GkeCluster.getDefaultInstance(); + } else { + if (deploymentTargetCase_ == 15) { + return gkeBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.GkeCluster.getDefaultInstance(); + } + } + /** + * + * + *
+     * Information specifying a GKE Cluster.
+     * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + */ + public Builder setGke(com.google.cloud.deploy.v1.GkeCluster value) { + if (gkeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deploymentTarget_ = value; + onChanged(); + } else { + gkeBuilder_.setMessage(value); + } + deploymentTargetCase_ = 15; + return this; + } + /** + * + * + *
+     * Information specifying a GKE Cluster.
+     * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + */ + public Builder setGke(com.google.cloud.deploy.v1.GkeCluster.Builder builderForValue) { + if (gkeBuilder_ == null) { + deploymentTarget_ = builderForValue.build(); + onChanged(); + } else { + gkeBuilder_.setMessage(builderForValue.build()); + } + deploymentTargetCase_ = 15; + return this; + } + /** + * + * + *
+     * Information specifying a GKE Cluster.
+     * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + */ + public Builder mergeGke(com.google.cloud.deploy.v1.GkeCluster value) { + if (gkeBuilder_ == null) { + if (deploymentTargetCase_ == 15 + && deploymentTarget_ != com.google.cloud.deploy.v1.GkeCluster.getDefaultInstance()) { + deploymentTarget_ = + com.google.cloud.deploy.v1.GkeCluster.newBuilder( + (com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_) + .mergeFrom(value) + .buildPartial(); + } else { + deploymentTarget_ = value; + } + onChanged(); + } else { + if (deploymentTargetCase_ == 15) { + gkeBuilder_.mergeFrom(value); + } + gkeBuilder_.setMessage(value); + } + deploymentTargetCase_ = 15; + return this; + } + /** + * + * + *
+     * Information specifying a GKE Cluster.
+     * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + */ + public Builder clearGke() { + if (gkeBuilder_ == null) { + if (deploymentTargetCase_ == 15) { + deploymentTargetCase_ = 0; + deploymentTarget_ = null; + onChanged(); + } + } else { + if (deploymentTargetCase_ == 15) { + deploymentTargetCase_ = 0; + deploymentTarget_ = null; + } + gkeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Information specifying a GKE Cluster.
+     * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + */ + public com.google.cloud.deploy.v1.GkeCluster.Builder getGkeBuilder() { + return getGkeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Information specifying a GKE Cluster.
+     * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.GkeClusterOrBuilder getGkeOrBuilder() { + if ((deploymentTargetCase_ == 15) && (gkeBuilder_ != null)) { + return gkeBuilder_.getMessageOrBuilder(); + } else { + if (deploymentTargetCase_ == 15) { + return (com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_; + } + return com.google.cloud.deploy.v1.GkeCluster.getDefaultInstance(); + } + } + /** + * + * + *
+     * Information specifying a GKE Cluster.
+     * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.GkeCluster, + com.google.cloud.deploy.v1.GkeCluster.Builder, + com.google.cloud.deploy.v1.GkeClusterOrBuilder> + getGkeFieldBuilder() { + if (gkeBuilder_ == null) { + if (!(deploymentTargetCase_ == 15)) { + deploymentTarget_ = com.google.cloud.deploy.v1.GkeCluster.getDefaultInstance(); + } + gkeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.GkeCluster, + com.google.cloud.deploy.v1.GkeCluster.Builder, + com.google.cloud.deploy.v1.GkeClusterOrBuilder>( + (com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_, + getParentForChildren(), + isClean()); + deploymentTarget_ = null; + } + deploymentTargetCase_ = 15; + onChanged(); + ; + return gkeBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + onChanged(); + return this; + } + + private java.util.List executionConfigs_ = + java.util.Collections.emptyList(); + + private void ensureExecutionConfigsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + executionConfigs_ = + new java.util.ArrayList(executionConfigs_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.ExecutionConfig, + com.google.cloud.deploy.v1.ExecutionConfig.Builder, + com.google.cloud.deploy.v1.ExecutionConfigOrBuilder> + executionConfigsBuilder_; + + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public java.util.List getExecutionConfigsList() { + if (executionConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(executionConfigs_); + } else { + return executionConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public int getExecutionConfigsCount() { + if (executionConfigsBuilder_ == null) { + return executionConfigs_.size(); + } else { + return executionConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public com.google.cloud.deploy.v1.ExecutionConfig getExecutionConfigs(int index) { + if (executionConfigsBuilder_ == null) { + return executionConfigs_.get(index); + } else { + return executionConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public Builder setExecutionConfigs( + int index, com.google.cloud.deploy.v1.ExecutionConfig value) { + if (executionConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExecutionConfigsIsMutable(); + executionConfigs_.set(index, value); + onChanged(); + } else { + executionConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public Builder setExecutionConfigs( + int index, com.google.cloud.deploy.v1.ExecutionConfig.Builder builderForValue) { + if (executionConfigsBuilder_ == null) { + ensureExecutionConfigsIsMutable(); + executionConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + executionConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public Builder addExecutionConfigs(com.google.cloud.deploy.v1.ExecutionConfig value) { + if (executionConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExecutionConfigsIsMutable(); + executionConfigs_.add(value); + onChanged(); + } else { + executionConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public Builder addExecutionConfigs( + int index, com.google.cloud.deploy.v1.ExecutionConfig value) { + if (executionConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExecutionConfigsIsMutable(); + executionConfigs_.add(index, value); + onChanged(); + } else { + executionConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public Builder addExecutionConfigs( + com.google.cloud.deploy.v1.ExecutionConfig.Builder builderForValue) { + if (executionConfigsBuilder_ == null) { + ensureExecutionConfigsIsMutable(); + executionConfigs_.add(builderForValue.build()); + onChanged(); + } else { + executionConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public Builder addExecutionConfigs( + int index, com.google.cloud.deploy.v1.ExecutionConfig.Builder builderForValue) { + if (executionConfigsBuilder_ == null) { + ensureExecutionConfigsIsMutable(); + executionConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + executionConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public Builder addAllExecutionConfigs( + java.lang.Iterable values) { + if (executionConfigsBuilder_ == null) { + ensureExecutionConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, executionConfigs_); + onChanged(); + } else { + executionConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public Builder clearExecutionConfigs() { + if (executionConfigsBuilder_ == null) { + executionConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + executionConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public Builder removeExecutionConfigs(int index) { + if (executionConfigsBuilder_ == null) { + ensureExecutionConfigsIsMutable(); + executionConfigs_.remove(index); + onChanged(); + } else { + executionConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public com.google.cloud.deploy.v1.ExecutionConfig.Builder getExecutionConfigsBuilder( + int index) { + return getExecutionConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public com.google.cloud.deploy.v1.ExecutionConfigOrBuilder getExecutionConfigsOrBuilder( + int index) { + if (executionConfigsBuilder_ == null) { + return executionConfigs_.get(index); + } else { + return executionConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public java.util.List + getExecutionConfigsOrBuilderList() { + if (executionConfigsBuilder_ != null) { + return executionConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(executionConfigs_); + } + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public com.google.cloud.deploy.v1.ExecutionConfig.Builder addExecutionConfigsBuilder() { + return getExecutionConfigsFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.ExecutionConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public com.google.cloud.deploy.v1.ExecutionConfig.Builder addExecutionConfigsBuilder( + int index) { + return getExecutionConfigsFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.ExecutionConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Configurations for all execution that relates to this `Target`.
+     * Each `ExecutionEnvironmentUsage` value may only be used in a single
+     * configuration; using the same value multiple times is an error.
+     * When one or more configurations are specified, they must include the
+     * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+     * When no configurations are specified, execution will use the default
+     * specified in `DefaultPool`.
+     * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + public java.util.List + getExecutionConfigsBuilderList() { + return getExecutionConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.ExecutionConfig, + com.google.cloud.deploy.v1.ExecutionConfig.Builder, + com.google.cloud.deploy.v1.ExecutionConfigOrBuilder> + getExecutionConfigsFieldBuilder() { + if (executionConfigsBuilder_ == null) { + executionConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.ExecutionConfig, + com.google.cloud.deploy.v1.ExecutionConfig.Builder, + com.google.cloud.deploy.v1.ExecutionConfigOrBuilder>( + executionConfigs_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + executionConfigs_ = null; + } + return executionConfigsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.Target) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Target) + private static final com.google.cloud.deploy.v1.Target DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Target(); + } + + public static com.google.cloud.deploy.v1.Target getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Target parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Target(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.deploy.v1.Target getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifact.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifact.java new file mode 100644 index 0000000..f0eeece --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifact.java @@ -0,0 +1,1141 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The artifacts produced by a target render operation.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.TargetArtifact} + */ +public final class TargetArtifact extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.TargetArtifact) + TargetArtifactOrBuilder { + private static final long serialVersionUID = 0L; + // Use TargetArtifact.newBuilder() to construct. + private TargetArtifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TargetArtifact() { + skaffoldConfigPath_ = ""; + manifestPath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TargetArtifact(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TargetArtifact( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + skaffoldConfigPath_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + manifestPath_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + uriCase_ = 4; + uri_ = 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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetArtifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetArtifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.TargetArtifact.class, + com.google.cloud.deploy.v1.TargetArtifact.Builder.class); + } + + private int uriCase_ = 0; + private java.lang.Object uri_; + + public enum UriCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ARTIFACT_URI(4), + URI_NOT_SET(0); + private final int value; + + private UriCase(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 UriCase valueOf(int value) { + return forNumber(value); + } + + public static UriCase forNumber(int value) { + switch (value) { + case 4: + return ARTIFACT_URI; + case 0: + return URI_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public UriCase getUriCase() { + return UriCase.forNumber(uriCase_); + } + + public static final int ARTIFACT_URI_FIELD_NUMBER = 4; + /** + * + * + *
+   * Output only. URI of a directory containing the artifacts. This contains
+   * deployment configuration used by Skaffold during a rollout, and all
+   * paths are relative to this location.
+   * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the artifactUri field is set. + */ + public boolean hasArtifactUri() { + return uriCase_ == 4; + } + /** + * + * + *
+   * Output only. URI of a directory containing the artifacts. This contains
+   * deployment configuration used by Skaffold during a rollout, and all
+   * paths are relative to this location.
+   * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The artifactUri. + */ + public java.lang.String getArtifactUri() { + java.lang.Object ref = ""; + if (uriCase_ == 4) { + ref = uri_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (uriCase_ == 4) { + uri_ = s; + } + return s; + } + } + /** + * + * + *
+   * Output only. URI of a directory containing the artifacts. This contains
+   * deployment configuration used by Skaffold during a rollout, and all
+   * paths are relative to this location.
+   * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for artifactUri. + */ + public com.google.protobuf.ByteString getArtifactUriBytes() { + java.lang.Object ref = ""; + if (uriCase_ == 4) { + ref = uri_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (uriCase_ == 4) { + uri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SKAFFOLD_CONFIG_PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object skaffoldConfigPath_; + /** + * + * + *
+   * Output only. File path of the resolved Skaffold configuration relative to the URI.
+   * 
+ * + * string skaffold_config_path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The skaffoldConfigPath. + */ + @java.lang.Override + public java.lang.String getSkaffoldConfigPath() { + java.lang.Object ref = skaffoldConfigPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skaffoldConfigPath_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. File path of the resolved Skaffold configuration relative to the URI.
+   * 
+ * + * string skaffold_config_path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for skaffoldConfigPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSkaffoldConfigPathBytes() { + java.lang.Object ref = skaffoldConfigPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skaffoldConfigPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MANIFEST_PATH_FIELD_NUMBER = 3; + private volatile java.lang.Object manifestPath_; + /** + * + * + *
+   * Output only. File path of the rendered manifest relative to the URI.
+   * 
+ * + * string manifest_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The manifestPath. + */ + @java.lang.Override + public java.lang.String getManifestPath() { + java.lang.Object ref = manifestPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + manifestPath_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. File path of the rendered manifest relative to the URI.
+   * 
+ * + * string manifest_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for manifestPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getManifestPathBytes() { + java.lang.Object ref = manifestPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + manifestPath_ = 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 (!getSkaffoldConfigPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, skaffoldConfigPath_); + } + if (!getManifestPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, manifestPath_); + } + if (uriCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSkaffoldConfigPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, skaffoldConfigPath_); + } + if (!getManifestPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, manifestPath_); + } + if (uriCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, uri_); + } + 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.deploy.v1.TargetArtifact)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.TargetArtifact other = + (com.google.cloud.deploy.v1.TargetArtifact) obj; + + if (!getSkaffoldConfigPath().equals(other.getSkaffoldConfigPath())) return false; + if (!getManifestPath().equals(other.getManifestPath())) return false; + if (!getUriCase().equals(other.getUriCase())) return false; + switch (uriCase_) { + case 4: + if (!getArtifactUri().equals(other.getArtifactUri())) 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) + SKAFFOLD_CONFIG_PATH_FIELD_NUMBER; + hash = (53 * hash) + getSkaffoldConfigPath().hashCode(); + hash = (37 * hash) + MANIFEST_PATH_FIELD_NUMBER; + hash = (53 * hash) + getManifestPath().hashCode(); + switch (uriCase_) { + case 4: + hash = (37 * hash) + ARTIFACT_URI_FIELD_NUMBER; + hash = (53 * hash) + getArtifactUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.TargetArtifact parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.TargetArtifact 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.deploy.v1.TargetArtifact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.TargetArtifact parseFrom( + 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.deploy.v1.TargetArtifact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.TargetArtifact parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.TargetArtifact parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.TargetArtifact parseFrom( + java.io.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.deploy.v1.TargetArtifact parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.TargetArtifact parseDelimitedFrom( + java.io.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.deploy.v1.TargetArtifact parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.TargetArtifact parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.TargetArtifact prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 artifacts produced by a target render operation.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.TargetArtifact} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.TargetArtifact) + com.google.cloud.deploy.v1.TargetArtifactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetArtifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetArtifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.TargetArtifact.class, + com.google.cloud.deploy.v1.TargetArtifact.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.TargetArtifact.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(); + skaffoldConfigPath_ = ""; + + manifestPath_ = ""; + + uriCase_ = 0; + uri_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetArtifact_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.TargetArtifact getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.TargetArtifact.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.TargetArtifact build() { + com.google.cloud.deploy.v1.TargetArtifact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.TargetArtifact buildPartial() { + com.google.cloud.deploy.v1.TargetArtifact result = + new com.google.cloud.deploy.v1.TargetArtifact(this); + if (uriCase_ == 4) { + result.uri_ = uri_; + } + result.skaffoldConfigPath_ = skaffoldConfigPath_; + result.manifestPath_ = manifestPath_; + result.uriCase_ = uriCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.deploy.v1.TargetArtifact) { + return mergeFrom((com.google.cloud.deploy.v1.TargetArtifact) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.TargetArtifact other) { + if (other == com.google.cloud.deploy.v1.TargetArtifact.getDefaultInstance()) return this; + if (!other.getSkaffoldConfigPath().isEmpty()) { + skaffoldConfigPath_ = other.skaffoldConfigPath_; + onChanged(); + } + if (!other.getManifestPath().isEmpty()) { + manifestPath_ = other.manifestPath_; + onChanged(); + } + switch (other.getUriCase()) { + case ARTIFACT_URI: + { + uriCase_ = 4; + uri_ = other.uri_; + onChanged(); + break; + } + case URI_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.deploy.v1.TargetArtifact parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.TargetArtifact) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int uriCase_ = 0; + private java.lang.Object uri_; + + public UriCase getUriCase() { + return UriCase.forNumber(uriCase_); + } + + public Builder clearUri() { + uriCase_ = 0; + uri_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. URI of a directory containing the artifacts. This contains
+     * deployment configuration used by Skaffold during a rollout, and all
+     * paths are relative to this location.
+     * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the artifactUri field is set. + */ + @java.lang.Override + public boolean hasArtifactUri() { + return uriCase_ == 4; + } + /** + * + * + *
+     * Output only. URI of a directory containing the artifacts. This contains
+     * deployment configuration used by Skaffold during a rollout, and all
+     * paths are relative to this location.
+     * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The artifactUri. + */ + @java.lang.Override + public java.lang.String getArtifactUri() { + java.lang.Object ref = ""; + if (uriCase_ == 4) { + ref = uri_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (uriCase_ == 4) { + uri_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. URI of a directory containing the artifacts. This contains
+     * deployment configuration used by Skaffold during a rollout, and all
+     * paths are relative to this location.
+     * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for artifactUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactUriBytes() { + java.lang.Object ref = ""; + if (uriCase_ == 4) { + ref = uri_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (uriCase_ == 4) { + uri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. URI of a directory containing the artifacts. This contains
+     * deployment configuration used by Skaffold during a rollout, and all
+     * paths are relative to this location.
+     * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The artifactUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uriCase_ = 4; + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. URI of a directory containing the artifacts. This contains
+     * deployment configuration used by Skaffold during a rollout, and all
+     * paths are relative to this location.
+     * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearArtifactUri() { + if (uriCase_ == 4) { + uriCase_ = 0; + uri_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. URI of a directory containing the artifacts. This contains
+     * deployment configuration used by Skaffold during a rollout, and all
+     * paths are relative to this location.
+     * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for artifactUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uriCase_ = 4; + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object skaffoldConfigPath_ = ""; + /** + * + * + *
+     * Output only. File path of the resolved Skaffold configuration relative to the URI.
+     * 
+ * + * string skaffold_config_path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The skaffoldConfigPath. + */ + public java.lang.String getSkaffoldConfigPath() { + java.lang.Object ref = skaffoldConfigPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skaffoldConfigPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. File path of the resolved Skaffold configuration relative to the URI.
+     * 
+ * + * string skaffold_config_path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for skaffoldConfigPath. + */ + public com.google.protobuf.ByteString getSkaffoldConfigPathBytes() { + java.lang.Object ref = skaffoldConfigPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skaffoldConfigPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. File path of the resolved Skaffold configuration relative to the URI.
+     * 
+ * + * string skaffold_config_path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The skaffoldConfigPath to set. + * @return This builder for chaining. + */ + public Builder setSkaffoldConfigPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + skaffoldConfigPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. File path of the resolved Skaffold configuration relative to the URI.
+     * 
+ * + * string skaffold_config_path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSkaffoldConfigPath() { + + skaffoldConfigPath_ = getDefaultInstance().getSkaffoldConfigPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. File path of the resolved Skaffold configuration relative to the URI.
+     * 
+ * + * string skaffold_config_path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for skaffoldConfigPath to set. + * @return This builder for chaining. + */ + public Builder setSkaffoldConfigPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + skaffoldConfigPath_ = value; + onChanged(); + return this; + } + + private java.lang.Object manifestPath_ = ""; + /** + * + * + *
+     * Output only. File path of the rendered manifest relative to the URI.
+     * 
+ * + * string manifest_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The manifestPath. + */ + public java.lang.String getManifestPath() { + java.lang.Object ref = manifestPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + manifestPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. File path of the rendered manifest relative to the URI.
+     * 
+ * + * string manifest_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for manifestPath. + */ + public com.google.protobuf.ByteString getManifestPathBytes() { + java.lang.Object ref = manifestPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + manifestPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. File path of the rendered manifest relative to the URI.
+     * 
+ * + * string manifest_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The manifestPath to set. + * @return This builder for chaining. + */ + public Builder setManifestPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + manifestPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. File path of the rendered manifest relative to the URI.
+     * 
+ * + * string manifest_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearManifestPath() { + + manifestPath_ = getDefaultInstance().getManifestPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. File path of the rendered manifest relative to the URI.
+     * 
+ * + * string manifest_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for manifestPath to set. + * @return This builder for chaining. + */ + public Builder setManifestPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + manifestPath_ = 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.deploy.v1.TargetArtifact) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.TargetArtifact) + private static final com.google.cloud.deploy.v1.TargetArtifact DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.TargetArtifact(); + } + + public static com.google.cloud.deploy.v1.TargetArtifact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TargetArtifact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TargetArtifact(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.deploy.v1.TargetArtifact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifactOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifactOrBuilder.java new file mode 100644 index 0000000..c0778c7 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifactOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface TargetArtifactOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.TargetArtifact) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. URI of a directory containing the artifacts. This contains
+   * deployment configuration used by Skaffold during a rollout, and all
+   * paths are relative to this location.
+   * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the artifactUri field is set. + */ + boolean hasArtifactUri(); + /** + * + * + *
+   * Output only. URI of a directory containing the artifacts. This contains
+   * deployment configuration used by Skaffold during a rollout, and all
+   * paths are relative to this location.
+   * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The artifactUri. + */ + java.lang.String getArtifactUri(); + /** + * + * + *
+   * Output only. URI of a directory containing the artifacts. This contains
+   * deployment configuration used by Skaffold during a rollout, and all
+   * paths are relative to this location.
+   * 
+ * + * string artifact_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for artifactUri. + */ + com.google.protobuf.ByteString getArtifactUriBytes(); + + /** + * + * + *
+   * Output only. File path of the resolved Skaffold configuration relative to the URI.
+   * 
+ * + * string skaffold_config_path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The skaffoldConfigPath. + */ + java.lang.String getSkaffoldConfigPath(); + /** + * + * + *
+   * Output only. File path of the resolved Skaffold configuration relative to the URI.
+   * 
+ * + * string skaffold_config_path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for skaffoldConfigPath. + */ + com.google.protobuf.ByteString getSkaffoldConfigPathBytes(); + + /** + * + * + *
+   * Output only. File path of the rendered manifest relative to the URI.
+   * 
+ * + * string manifest_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The manifestPath. + */ + java.lang.String getManifestPath(); + /** + * + * + *
+   * Output only. File path of the rendered manifest relative to the URI.
+   * 
+ * + * string manifest_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for manifestPath. + */ + com.google.protobuf.ByteString getManifestPathBytes(); + + public com.google.cloud.deploy.v1.TargetArtifact.UriCase getUriCase(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetName.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetName.java new file mode 100644 index 0000000..b8c6c87 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.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 TargetName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_TARGET = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/targets/{target}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String target; + + @Deprecated + protected TargetName() { + project = null; + location = null; + target = null; + } + + private TargetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + target = Preconditions.checkNotNull(builder.getTarget()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTarget() { + return target; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TargetName of(String project, String location, String target) { + return newBuilder().setProject(project).setLocation(location).setTarget(target).build(); + } + + public static String format(String project, String location, String target) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTarget(target) + .build() + .toString(); + } + + public static TargetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_TARGET.validatedMatch( + formattedString, "TargetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("target")); + } + + 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 (TargetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_TARGET.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 (target != null) { + fieldMapBuilder.put("target", target); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_TARGET.instantiate( + "project", project, "location", location, "target", target); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + TargetName that = ((TargetName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.target, that.target); + } + 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(target); + return h; + } + + /** Builder for projects/{project}/locations/{location}/targets/{target}. */ + public static class Builder { + private String project; + private String location; + private String target; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTarget() { + return target; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setTarget(String target) { + this.target = target; + return this; + } + + private Builder(TargetName targetName) { + this.project = targetName.project; + this.location = targetName.location; + this.target = targetName.target; + } + + public TargetName build() { + return new TargetName(this); + } + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java new file mode 100644 index 0000000..2490aec --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java @@ -0,0 +1,517 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface TargetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Target) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/
+   * deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/
+   * deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Resource id of the `Target`.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The targetId. + */ + java.lang.String getTargetId(); + /** + * + * + *
+   * Output only. Resource id of the `Target`.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for targetId. + */ + com.google.protobuf.ByteString getTargetIdBytes(); + + /** + * + * + *
+   * Output only. Unique identifier of the `Target`.
+   * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. Unique identifier of the `Target`.
+   * 
+ * + * string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Optional. Description of the `Target`. Max length is 255 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of the `Target`. Max length is 255 characters.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by the
+   * user, and not by Google Cloud Deploy. See
+   * https://google.aip.dev/128#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Google Cloud Deploy. Labels must meet the following
+   * constraints: Each resource is limited to 64 labels. Keys must conform to
+   * the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp:
+   * [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be
+   * <= 128 bytes in size.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Whether or not the `Target` requires approval.
+   * 
+ * + * bool require_approval = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requireApproval. + */ + boolean getRequireApproval(); + + /** + * + * + *
+   * Output only. Time at which the `Target` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time at which the `Target` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time at which the `Target` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Most recent time at which the `Target` was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Most recent time at which the `Target` was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Most recent time at which the `Target` was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Information specifying a GKE Cluster.
+   * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + * + * @return Whether the gke field is set. + */ + boolean hasGke(); + /** + * + * + *
+   * Information specifying a GKE Cluster.
+   * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + * + * @return The gke. + */ + com.google.cloud.deploy.v1.GkeCluster getGke(); + /** + * + * + *
+   * Information specifying a GKE Cluster.
+   * 
+ * + * .google.cloud.deploy.v1.GkeCluster gke = 15; + */ + com.google.cloud.deploy.v1.GkeClusterOrBuilder getGkeOrBuilder(); + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Configurations for all execution that relates to this `Target`.
+   * Each `ExecutionEnvironmentUsage` value may only be used in a single
+   * configuration; using the same value multiple times is an error.
+   * When one or more configurations are specified, they must include the
+   * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+   * When no configurations are specified, execution will use the default
+   * specified in `DefaultPool`.
+   * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + java.util.List getExecutionConfigsList(); + /** + * + * + *
+   * Configurations for all execution that relates to this `Target`.
+   * Each `ExecutionEnvironmentUsage` value may only be used in a single
+   * configuration; using the same value multiple times is an error.
+   * When one or more configurations are specified, they must include the
+   * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+   * When no configurations are specified, execution will use the default
+   * specified in `DefaultPool`.
+   * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + com.google.cloud.deploy.v1.ExecutionConfig getExecutionConfigs(int index); + /** + * + * + *
+   * Configurations for all execution that relates to this `Target`.
+   * Each `ExecutionEnvironmentUsage` value may only be used in a single
+   * configuration; using the same value multiple times is an error.
+   * When one or more configurations are specified, they must include the
+   * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+   * When no configurations are specified, execution will use the default
+   * specified in `DefaultPool`.
+   * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + int getExecutionConfigsCount(); + /** + * + * + *
+   * Configurations for all execution that relates to this `Target`.
+   * Each `ExecutionEnvironmentUsage` value may only be used in a single
+   * configuration; using the same value multiple times is an error.
+   * When one or more configurations are specified, they must include the
+   * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+   * When no configurations are specified, execution will use the default
+   * specified in `DefaultPool`.
+   * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + java.util.List + getExecutionConfigsOrBuilderList(); + /** + * + * + *
+   * Configurations for all execution that relates to this `Target`.
+   * Each `ExecutionEnvironmentUsage` value may only be used in a single
+   * configuration; using the same value multiple times is an error.
+   * When one or more configurations are specified, they must include the
+   * `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
+   * When no configurations are specified, execution will use the default
+   * specified in `DefaultPool`.
+   * 
+ * + * repeated .google.cloud.deploy.v1.ExecutionConfig execution_configs = 16; + */ + com.google.cloud.deploy.v1.ExecutionConfigOrBuilder getExecutionConfigsOrBuilder(int index); + + public com.google.cloud.deploy.v1.Target.DeploymentTargetCase getDeploymentTargetCase(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java new file mode 100644 index 0000000..2c51426 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java @@ -0,0 +1,1114 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * TargetsPresentCondition contains information on any Targets defined in
+ * the Delivery Pipeline that do not actually exist.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.TargetsPresentCondition} + */ +public final class TargetsPresentCondition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.TargetsPresentCondition) + TargetsPresentConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use TargetsPresentCondition.newBuilder() to construct. + private TargetsPresentCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TargetsPresentCondition() { + missingTargets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TargetsPresentCondition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TargetsPresentCondition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + status_ = input.readBool(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + missingTargets_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + missingTargets_.add(s); + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + missingTargets_ = missingTargets_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetsPresentCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetsPresentCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.TargetsPresentCondition.class, + com.google.cloud.deploy.v1.TargetsPresentCondition.Builder.class); + } + + public static final int STATUS_FIELD_NUMBER = 1; + private boolean status_; + /** + * + * + *
+   * True if there aren't any missing Targets.
+   * 
+ * + * bool status = 1; + * + * @return The status. + */ + @java.lang.Override + public boolean getStatus() { + return status_; + } + + public static final int MISSING_TARGETS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList missingTargets_; + /** + * + * + *
+   * The list of Target names that are missing. For example,
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the missingTargets. + */ + public com.google.protobuf.ProtocolStringList getMissingTargetsList() { + return missingTargets_; + } + /** + * + * + *
+   * The list of Target names that are missing. For example,
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of missingTargets. + */ + public int getMissingTargetsCount() { + return missingTargets_.size(); + } + /** + * + * + *
+   * The list of Target names that are missing. For example,
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The missingTargets at the given index. + */ + public java.lang.String getMissingTargets(int index) { + return missingTargets_.get(index); + } + /** + * + * + *
+   * The list of Target names that are missing. For example,
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the missingTargets at the given index. + */ + public com.google.protobuf.ByteString getMissingTargetsBytes(int index) { + return missingTargets_.getByteString(index); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (status_ != false) { + output.writeBool(1, status_); + } + for (int i = 0; i < missingTargets_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, missingTargets_.getRaw(i)); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, status_); + } + { + int dataSize = 0; + for (int i = 0; i < missingTargets_.size(); i++) { + dataSize += computeStringSizeNoTag(missingTargets_.getRaw(i)); + } + size += dataSize; + size += 1 * getMissingTargetsList().size(); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.TargetsPresentCondition)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.TargetsPresentCondition other = + (com.google.cloud.deploy.v1.TargetsPresentCondition) obj; + + if (getStatus() != other.getStatus()) return false; + if (!getMissingTargetsList().equals(other.getMissingTargetsList())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStatus()); + if (getMissingTargetsCount() > 0) { + hash = (37 * hash) + MISSING_TARGETS_FIELD_NUMBER; + hash = (53 * hash) + getMissingTargetsList().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.TargetsPresentCondition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.TargetsPresentCondition 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.deploy.v1.TargetsPresentCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.TargetsPresentCondition parseFrom( + 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.deploy.v1.TargetsPresentCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.TargetsPresentCondition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.TargetsPresentCondition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.TargetsPresentCondition parseFrom( + java.io.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.deploy.v1.TargetsPresentCondition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.TargetsPresentCondition parseDelimitedFrom( + java.io.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.deploy.v1.TargetsPresentCondition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.TargetsPresentCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.TargetsPresentCondition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * TargetsPresentCondition contains information on any Targets defined in
+   * the Delivery Pipeline that do not actually exist.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.TargetsPresentCondition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.TargetsPresentCondition) + com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetsPresentCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetsPresentCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.TargetsPresentCondition.class, + com.google.cloud.deploy.v1.TargetsPresentCondition.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.TargetsPresentCondition.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(); + status_ = false; + + missingTargets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetsPresentCondition_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.TargetsPresentCondition getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.TargetsPresentCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.TargetsPresentCondition build() { + com.google.cloud.deploy.v1.TargetsPresentCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.TargetsPresentCondition buildPartial() { + com.google.cloud.deploy.v1.TargetsPresentCondition result = + new com.google.cloud.deploy.v1.TargetsPresentCondition(this); + int from_bitField0_ = bitField0_; + result.status_ = status_; + if (((bitField0_ & 0x00000001) != 0)) { + missingTargets_ = missingTargets_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.missingTargets_ = missingTargets_; + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.TargetsPresentCondition) { + return mergeFrom((com.google.cloud.deploy.v1.TargetsPresentCondition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.TargetsPresentCondition other) { + if (other == com.google.cloud.deploy.v1.TargetsPresentCondition.getDefaultInstance()) + return this; + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + if (!other.missingTargets_.isEmpty()) { + if (missingTargets_.isEmpty()) { + missingTargets_ = other.missingTargets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMissingTargetsIsMutable(); + missingTargets_.addAll(other.missingTargets_); + } + onChanged(); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.TargetsPresentCondition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.deploy.v1.TargetsPresentCondition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private boolean status_; + /** + * + * + *
+     * True if there aren't any missing Targets.
+     * 
+ * + * bool status = 1; + * + * @return The status. + */ + @java.lang.Override + public boolean getStatus() { + return status_; + } + /** + * + * + *
+     * True if there aren't any missing Targets.
+     * 
+ * + * bool status = 1; + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * True if there aren't any missing Targets.
+     * 
+ * + * bool status = 1; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList missingTargets_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureMissingTargetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + missingTargets_ = new com.google.protobuf.LazyStringArrayList(missingTargets_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The list of Target names that are missing. For example,
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the missingTargets. + */ + public com.google.protobuf.ProtocolStringList getMissingTargetsList() { + return missingTargets_.getUnmodifiableView(); + } + /** + * + * + *
+     * The list of Target names that are missing. For example,
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of missingTargets. + */ + public int getMissingTargetsCount() { + return missingTargets_.size(); + } + /** + * + * + *
+     * The list of Target names that are missing. For example,
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The missingTargets at the given index. + */ + public java.lang.String getMissingTargets(int index) { + return missingTargets_.get(index); + } + /** + * + * + *
+     * The list of Target names that are missing. For example,
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the missingTargets at the given index. + */ + public com.google.protobuf.ByteString getMissingTargetsBytes(int index) { + return missingTargets_.getByteString(index); + } + /** + * + * + *
+     * The list of Target names that are missing. For example,
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The missingTargets to set. + * @return This builder for chaining. + */ + public Builder setMissingTargets(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMissingTargetsIsMutable(); + missingTargets_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of Target names that are missing. For example,
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The missingTargets to add. + * @return This builder for chaining. + */ + public Builder addMissingTargets(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMissingTargetsIsMutable(); + missingTargets_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of Target names that are missing. For example,
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @param values The missingTargets to add. + * @return This builder for chaining. + */ + public Builder addAllMissingTargets(java.lang.Iterable values) { + ensureMissingTargetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, missingTargets_); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of Target names that are missing. For example,
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearMissingTargets() { + missingTargets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of Target names that are missing. For example,
+     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the missingTargets to add. + * @return This builder for chaining. + */ + public Builder addMissingTargetsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMissingTargetsIsMutable(); + missingTargets_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Last time the condition was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.TargetsPresentCondition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.TargetsPresentCondition) + private static final com.google.cloud.deploy.v1.TargetsPresentCondition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.TargetsPresentCondition(); + } + + public static com.google.cloud.deploy.v1.TargetsPresentCondition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TargetsPresentCondition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TargetsPresentCondition(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.deploy.v1.TargetsPresentCondition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentConditionOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentConditionOrBuilder.java new file mode 100644 index 0000000..322b943 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentConditionOrBuilder.java @@ -0,0 +1,128 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface TargetsPresentConditionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.TargetsPresentCondition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * True if there aren't any missing Targets.
+   * 
+ * + * bool status = 1; + * + * @return The status. + */ + boolean getStatus(); + + /** + * + * + *
+   * The list of Target names that are missing. For example,
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the missingTargets. + */ + java.util.List getMissingTargetsList(); + /** + * + * + *
+   * The list of Target names that are missing. For example,
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of missingTargets. + */ + int getMissingTargetsCount(); + /** + * + * + *
+   * The list of Target names that are missing. For example,
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The missingTargets at the given index. + */ + java.lang.String getMissingTargets(int index); + /** + * + * + *
+   * The list of Target names that are missing. For example,
+   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * 
+ * + * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the missingTargets at the given index. + */ + com.google.protobuf.ByteString getMissingTargetsBytes(int index); + + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Last time the condition was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequest.java new file mode 100644 index 0000000..a1d78c3 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequest.java @@ -0,0 +1,1529 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `UpdateDeliveryPipeline`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} + */ +public final class UpdateDeliveryPipelineRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) + UpdateDeliveryPipelineRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDeliveryPipelineRequest.newBuilder() to construct. + private UpdateDeliveryPipelineRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDeliveryPipelineRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDeliveryPipelineRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateDeliveryPipelineRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.deploy.v1.DeliveryPipeline.Builder subBuilder = null; + if (deliveryPipeline_ != null) { + subBuilder = deliveryPipeline_.toBuilder(); + } + deliveryPipeline_ = + input.readMessage( + com.google.cloud.deploy.v1.DeliveryPipeline.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deliveryPipeline_); + deliveryPipeline_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 32: + { + allowMissing_ = input.readBool(); + break; + } + case 40: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.class, + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `DeliveryPipeline` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `DeliveryPipeline` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `DeliveryPipeline` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int DELIVERY_PIPELINE_FIELD_NUMBER = 2; + private com.google.cloud.deploy.v1.DeliveryPipeline deliveryPipeline_; + /** + * + * + *
+   * Required. The `DeliveryPipeline` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryPipeline field is set. + */ + @java.lang.Override + public boolean hasDeliveryPipeline() { + return deliveryPipeline_ != null; + } + /** + * + * + *
+   * Required. The `DeliveryPipeline` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryPipeline. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipeline() { + return deliveryPipeline_ == null + ? com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance() + : deliveryPipeline_; + } + /** + * + * + *
+   * Required. The `DeliveryPipeline` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder getDeliveryPipelineOrBuilder() { + return getDeliveryPipeline(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 4; + private boolean allowMissing_; + /** + * + * + *
+   * Optional. If set to true, updating a `DeliveryPipeline` that does not exist will
+   * result in the creation of a new `DeliveryPipeline`.
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (deliveryPipeline_ != null) { + output.writeMessage(2, getDeliveryPipeline()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (allowMissing_ != false) { + output.writeBool(4, allowMissing_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (deliveryPipeline_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeliveryPipeline()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowMissing_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest other = + (com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasDeliveryPipeline() != other.hasDeliveryPipeline()) return false; + if (hasDeliveryPipeline()) { + if (!getDeliveryPipeline().equals(other.getDeliveryPipeline())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasDeliveryPipeline()) { + hash = (37 * hash) + DELIVERY_PIPELINE_FIELD_NUMBER; + hash = (53 * hash) + getDeliveryPipeline().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest 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.deploy.v1.UpdateDeliveryPipelineRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest parseFrom( + 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.deploy.v1.UpdateDeliveryPipelineRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest parseFrom( + java.io.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.deploy.v1.UpdateDeliveryPipelineRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest parseDelimitedFrom( + java.io.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.deploy.v1.UpdateDeliveryPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.UpdateDeliveryPipelineRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `UpdateDeliveryPipeline`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.UpdateDeliveryPipelineRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.class, + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + if (deliveryPipelineBuilder_ == null) { + deliveryPipeline_ = null; + } else { + deliveryPipeline_ = null; + deliveryPipelineBuilder_ = null; + } + requestId_ = ""; + + allowMissing_ = false; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest build() { + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest buildPartial() { + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest result = + new com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest(this); + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + if (deliveryPipelineBuilder_ == null) { + result.deliveryPipeline_ = deliveryPipeline_; + } else { + result.deliveryPipeline_ = deliveryPipelineBuilder_.build(); + } + result.requestId_ = requestId_; + result.allowMissing_ = allowMissing_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) { + return mergeFrom((com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest other) { + if (other == com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasDeliveryPipeline()) { + mergeDeliveryPipeline(other.getDeliveryPipeline()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `DeliveryPipeline` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `DeliveryPipeline` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `DeliveryPipeline` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `DeliveryPipeline` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `DeliveryPipeline` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `DeliveryPipeline` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `DeliveryPipeline` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `DeliveryPipeline` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `DeliveryPipeline` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.deploy.v1.DeliveryPipeline deliveryPipeline_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder> + deliveryPipelineBuilder_; + /** + * + * + *
+     * Required. The `DeliveryPipeline` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryPipeline field is set. + */ + public boolean hasDeliveryPipeline() { + return deliveryPipelineBuilder_ != null || deliveryPipeline_ != null; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryPipeline. + */ + public com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipeline() { + if (deliveryPipelineBuilder_ == null) { + return deliveryPipeline_ == null + ? com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance() + : deliveryPipeline_; + } else { + return deliveryPipelineBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeliveryPipeline(com.google.cloud.deploy.v1.DeliveryPipeline value) { + if (deliveryPipelineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deliveryPipeline_ = value; + onChanged(); + } else { + deliveryPipelineBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeliveryPipeline( + com.google.cloud.deploy.v1.DeliveryPipeline.Builder builderForValue) { + if (deliveryPipelineBuilder_ == null) { + deliveryPipeline_ = builderForValue.build(); + onChanged(); + } else { + deliveryPipelineBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDeliveryPipeline(com.google.cloud.deploy.v1.DeliveryPipeline value) { + if (deliveryPipelineBuilder_ == null) { + if (deliveryPipeline_ != null) { + deliveryPipeline_ = + com.google.cloud.deploy.v1.DeliveryPipeline.newBuilder(deliveryPipeline_) + .mergeFrom(value) + .buildPartial(); + } else { + deliveryPipeline_ = value; + } + onChanged(); + } else { + deliveryPipelineBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDeliveryPipeline() { + if (deliveryPipelineBuilder_ == null) { + deliveryPipeline_ = null; + onChanged(); + } else { + deliveryPipeline_ = null; + deliveryPipelineBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.DeliveryPipeline.Builder getDeliveryPipelineBuilder() { + + onChanged(); + return getDeliveryPipelineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder getDeliveryPipelineOrBuilder() { + if (deliveryPipelineBuilder_ != null) { + return deliveryPipelineBuilder_.getMessageOrBuilder(); + } else { + return deliveryPipeline_ == null + ? com.google.cloud.deploy.v1.DeliveryPipeline.getDefaultInstance() + : deliveryPipeline_; + } + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder> + getDeliveryPipelineFieldBuilder() { + if (deliveryPipelineBuilder_ == null) { + deliveryPipelineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeliveryPipeline, + com.google.cloud.deploy.v1.DeliveryPipeline.Builder, + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder>( + getDeliveryPipeline(), getParentForChildren(), isClean()); + deliveryPipeline_ = null; + } + return deliveryPipelineBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * Optional. If set to true, updating a `DeliveryPipeline` that does not exist will
+     * result in the creation of a new `DeliveryPipeline`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * Optional. If set to true, updating a `DeliveryPipeline` that does not exist will
+     * result in the creation of a new `DeliveryPipeline`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, updating a `DeliveryPipeline` that does not exist will
+     * result in the creation of a new `DeliveryPipeline`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) + private static final com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest(); + } + + public static com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDeliveryPipelineRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateDeliveryPipelineRequest(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.deploy.v1.UpdateDeliveryPipelineRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequestOrBuilder.java new file mode 100644 index 0000000..c286089 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequestOrBuilder.java @@ -0,0 +1,189 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface UpdateDeliveryPipelineRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `DeliveryPipeline` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `DeliveryPipeline` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `DeliveryPipeline` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The `DeliveryPipeline` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deliveryPipeline field is set. + */ + boolean hasDeliveryPipeline(); + /** + * + * + *
+   * Required. The `DeliveryPipeline` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deliveryPipeline. + */ + com.google.cloud.deploy.v1.DeliveryPipeline getDeliveryPipeline(); + /** + * + * + *
+   * Required. The `DeliveryPipeline` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeliveryPipeline delivery_pipeline = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.DeliveryPipelineOrBuilder getDeliveryPipelineOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, updating a `DeliveryPipeline` that does not exist will
+   * result in the creation of a new `DeliveryPipeline`.
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequest.java new file mode 100644 index 0000000..7b1b40a --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequest.java @@ -0,0 +1,1504 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object for `UpdateTarget`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.UpdateTargetRequest} + */ +public final class UpdateTargetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.UpdateTargetRequest) + UpdateTargetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTargetRequest.newBuilder() to construct. + private UpdateTargetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTargetRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTargetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateTargetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.deploy.v1.Target.Builder subBuilder = null; + if (target_ != null) { + subBuilder = target_.toBuilder(); + } + target_ = + input.readMessage(com.google.cloud.deploy.v1.Target.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(target_); + target_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 32: + { + allowMissing_ = input.readBool(); + break; + } + case 40: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (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.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateTargetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateTargetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.UpdateTargetRequest.class, + com.google.cloud.deploy.v1.UpdateTargetRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Target resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Target resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Target resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + public static final int TARGET_FIELD_NUMBER = 2; + private com.google.cloud.deploy.v1.Target target_; + /** + * + * + *
+   * Required. The `Target` to update.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return target_ != null; + } + /** + * + * + *
+   * Required. The `Target` to update.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Target getTarget() { + return target_ == null ? com.google.cloud.deploy.v1.Target.getDefaultInstance() : target_; + } + /** + * + * + *
+   * Required. The `Target` to update.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetOrBuilder getTargetOrBuilder() { + return getTarget(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 4; + private boolean allowMissing_; + /** + * + * + *
+   * Optional. If set to true, updating a `Target` that does not exist will
+   * result in the creation of a new `Target`.
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (target_ != null) { + output.writeMessage(2, getTarget()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (allowMissing_ != false) { + output.writeBool(4, allowMissing_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (target_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTarget()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowMissing_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.UpdateTargetRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.UpdateTargetRequest other = + (com.google.cloud.deploy.v1.UpdateTargetRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasTarget() != other.hasTarget()) return false; + if (hasTarget()) { + if (!getTarget().equals(other.getTarget())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasTarget()) { + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.UpdateTargetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.UpdateTargetRequest 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.deploy.v1.UpdateTargetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.UpdateTargetRequest parseFrom( + 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.deploy.v1.UpdateTargetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.UpdateTargetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.UpdateTargetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.UpdateTargetRequest parseFrom( + java.io.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.deploy.v1.UpdateTargetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.UpdateTargetRequest parseDelimitedFrom( + java.io.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.deploy.v1.UpdateTargetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.UpdateTargetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.deploy.v1.UpdateTargetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 request object for `UpdateTarget`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.UpdateTargetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.UpdateTargetRequest) + com.google.cloud.deploy.v1.UpdateTargetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateTargetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateTargetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.UpdateTargetRequest.class, + com.google.cloud.deploy.v1.UpdateTargetRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.UpdateTargetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + if (targetBuilder_ == null) { + target_ = null; + } else { + target_ = null; + targetBuilder_ = null; + } + requestId_ = ""; + + allowMissing_ = false; + + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateTargetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.UpdateTargetRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.UpdateTargetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.UpdateTargetRequest build() { + com.google.cloud.deploy.v1.UpdateTargetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.UpdateTargetRequest buildPartial() { + com.google.cloud.deploy.v1.UpdateTargetRequest result = + new com.google.cloud.deploy.v1.UpdateTargetRequest(this); + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + if (targetBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = targetBuilder_.build(); + } + result.requestId_ = requestId_; + result.allowMissing_ = allowMissing_; + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.UpdateTargetRequest) { + return mergeFrom((com.google.cloud.deploy.v1.UpdateTargetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.UpdateTargetRequest other) { + if (other == com.google.cloud.deploy.v1.UpdateTargetRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasTarget()) { + mergeTarget(other.getTarget()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.deploy.v1.UpdateTargetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.deploy.v1.UpdateTargetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Target resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Target resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Target resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Target resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Target resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Target resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Target resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Target resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Target resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.deploy.v1.Target target_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder> + targetBuilder_; + /** + * + * + *
+     * Required. The `Target` to update.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + public boolean hasTarget() { + return targetBuilder_ != null || target_ != null; + } + /** + * + * + *
+     * Required. The `Target` to update.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + public com.google.cloud.deploy.v1.Target getTarget() { + if (targetBuilder_ == null) { + return target_ == null ? com.google.cloud.deploy.v1.Target.getDefaultInstance() : target_; + } else { + return targetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The `Target` to update.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.cloud.deploy.v1.Target value) { + if (targetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + targetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `Target` to update.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.cloud.deploy.v1.Target.Builder builderForValue) { + if (targetBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + targetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The `Target` to update.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTarget(com.google.cloud.deploy.v1.Target value) { + if (targetBuilder_ == null) { + if (target_ != null) { + target_ = + com.google.cloud.deploy.v1.Target.newBuilder(target_).mergeFrom(value).buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + targetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The `Target` to update.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTarget() { + if (targetBuilder_ == null) { + target_ = null; + onChanged(); + } else { + target_ = null; + targetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The `Target` to update.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.Target.Builder getTargetBuilder() { + + onChanged(); + return getTargetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The `Target` to update.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.TargetOrBuilder getTargetOrBuilder() { + if (targetBuilder_ != null) { + return targetBuilder_.getMessageOrBuilder(); + } else { + return target_ == null ? com.google.cloud.deploy.v1.Target.getDefaultInstance() : target_; + } + } + /** + * + * + *
+     * Required. The `Target` to update.
+     * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder> + getTargetFieldBuilder() { + if (targetBuilder_ == null) { + targetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Target, + com.google.cloud.deploy.v1.Target.Builder, + com.google.cloud.deploy.v1.TargetOrBuilder>( + getTarget(), getParentForChildren(), isClean()); + target_ = null; + } + return targetBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * Optional. If set to true, updating a `Target` that does not exist will
+     * result in the creation of a new `Target`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * Optional. If set to true, updating a `Target` that does not exist will
+     * result in the creation of a new `Target`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, updating a `Target` that does not exist will
+     * result in the creation of a new `Target`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + + allowMissing_ = false; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided with
+     * an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.UpdateTargetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.UpdateTargetRequest) + private static final com.google.cloud.deploy.v1.UpdateTargetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.UpdateTargetRequest(); + } + + public static com.google.cloud.deploy.v1.UpdateTargetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTargetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateTargetRequest(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.deploy.v1.UpdateTargetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequestOrBuilder.java new file mode 100644 index 0000000..6c7a9e0 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequestOrBuilder.java @@ -0,0 +1,186 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface UpdateTargetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.UpdateTargetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Target resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Target resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Target resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The `Target` to update.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + boolean hasTarget(); + /** + * + * + *
+   * Required. The `Target` to update.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + com.google.cloud.deploy.v1.Target getTarget(); + /** + * + * + *
+   * Required. The `Target` to update.
+   * 
+ * + * .google.cloud.deploy.v1.Target target = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.TargetOrBuilder getTargetOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, updating a `Target` that does not exist will
+   * result in the creation of a new `Target`.
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided with
+   * an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.proto b/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.proto new file mode 100644 index 0000000..54071e0 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.proto @@ -0,0 +1,1390 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.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"; +import "google/type/date.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy"; +option java_multiple_files = true; +option java_outer_classname = "CloudDeployProto"; +option java_package = "com.google.cloud.deploy.v1"; +option (google.api.resource_definition) = { + type: "cloudbuild.googleapis.com/Build" + pattern: "projects/{project}/locations/{location}/builds/{build}" +}; +option (google.api.resource_definition) = { + type: "container.googleapis.com/Cluster" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}" +}; +option (google.api.resource_definition) = { + type: "clouddeploy.googleapis.com/Operation" + pattern: "projects/{project}/locations/{location}/operations/{operation}" +}; +option (google.api.resource_definition) = { + type: "cloudbuild.googleapis.com/WorkerPool" + pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}" +}; + +// CloudDeploy service creates and manages Continuous Delivery operations +// on Google Cloud Platform via Skaffold (https://skaffold.dev). +service CloudDeploy { + option (google.api.default_host) = "clouddeploy.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists DeliveryPipelines in a given project and location. + rpc ListDeliveryPipelines(ListDeliveryPipelinesRequest) returns (ListDeliveryPipelinesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/deliveryPipelines" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single DeliveryPipeline. + rpc GetDeliveryPipeline(GetDeliveryPipelineRequest) returns (DeliveryPipeline) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new DeliveryPipeline in a given project and location. + rpc CreateDeliveryPipeline(CreateDeliveryPipelineRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/deliveryPipelines" + body: "delivery_pipeline" + }; + option (google.api.method_signature) = "parent,delivery_pipeline,delivery_pipeline_id"; + option (google.longrunning.operation_info) = { + response_type: "DeliveryPipeline" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single DeliveryPipeline. + rpc UpdateDeliveryPipeline(UpdateDeliveryPipelineRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{delivery_pipeline.name=projects/*/locations/*/deliveryPipelines/*}" + body: "delivery_pipeline" + }; + option (google.api.method_signature) = "delivery_pipeline,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DeliveryPipeline" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single DeliveryPipeline. + rpc DeleteDeliveryPipeline(DeleteDeliveryPipelineRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Targets in a given project and location. + rpc ListTargets(ListTargetsRequest) returns (ListTargetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/targets" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Target. + rpc GetTarget(GetTargetRequest) returns (Target) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/targets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Target in a given project and location. + rpc CreateTarget(CreateTargetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/targets" + body: "target" + }; + option (google.api.method_signature) = "parent,target,target_id"; + option (google.longrunning.operation_info) = { + response_type: "Target" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Target. + rpc UpdateTarget(UpdateTargetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{target.name=projects/*/locations/*/targets/*}" + body: "target" + }; + option (google.api.method_signature) = "target,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Target" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Target. + rpc DeleteTarget(DeleteTargetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/targets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Releases in a given project and location. + rpc ListReleases(ListReleasesRequest) returns (ListReleasesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Release. + rpc GetRelease(GetReleaseRequest) returns (Release) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Release in a given project and location. + rpc CreateRelease(CreateReleaseRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases" + body: "release" + }; + option (google.api.method_signature) = "parent,release,release_id"; + option (google.longrunning.operation_info) = { + response_type: "Release" + metadata_type: "OperationMetadata" + }; + } + + // Approves a Rollout. + rpc ApproveRollout(ApproveRolloutRequest) returns (ApproveRolloutResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:approve" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Rollouts in a given project and location. + rpc ListRollouts(ListRolloutsRequest) returns (ListRolloutsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Rollout. + rpc GetRollout(GetRolloutRequest) returns (Rollout) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Rollout in a given project and location. + rpc CreateRollout(CreateRolloutRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts" + body: "rollout" + }; + option (google.api.method_signature) = "parent,rollout,rollout_id"; + option (google.longrunning.operation_info) = { + response_type: "Rollout" + metadata_type: "OperationMetadata" + }; + } + + // Gets the configuration for a location. + rpc GetConfig(GetConfigRequest) returns (Config) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/config}" + }; + option (google.api.method_signature) = "name"; + } +} + +// A `DeliveryPipeline` resource in the Google Cloud Deploy API. +// +// A `DeliveryPipeline` defines a pipeline through which a Skaffold +// configuration can progress. +message DeliveryPipeline { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}" + }; + + // Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/ + // locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `DeliveryPipeline`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the `DeliveryPipeline`. Max length is 255 characters. + string description = 3; + + // User annotations. These attributes can only be set and used by the + // user, and not by Google Cloud Deploy. See + // https://google.aip.dev/128#annotations for more details such as format and + // size limitations. + map annotations = 4; + + // Labels are attributes that can be set and used by both the + // user and by Google Cloud Deploy. Labels must meet the following + // constraints: Each resource is limited to 64 labels. Keys must conform to + // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: + // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be + // <= 128 bytes in size. + map labels = 5; + + // Output only. Time at which the pipeline was created. + google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Most recent time at which the pipeline was updated. + google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The ordering configuration of the `DeliveryPipeline`. + oneof pipeline { + // SerialPipeline defines a sequential set of stages for a + // `DeliveryPipeline`. + SerialPipeline serial_pipeline = 8; + } + + // Output only. Information around the state of the Delivery Pipeline. + PipelineCondition condition = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 10; +} + +// SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`. +message SerialPipeline { + // Each stage specifies configuration for a `Target`. The ordering + // of this list defines the promotion flow. + repeated Stage stages = 1; +} + +// Stage specifies a location to which to deploy. +message Stage { + // The target_id to which this stage points. This field refers exclusively to + // the last segment of a target name. For example, this field would just be + // `my-target` (rather than + // `projects/project/deliveryPipelines/pipeline/targets/my-target`). The + // parent `DeliveryPipeline` of the `Target` is inferred to be the parent + // `DeliveryPipeline` of the `Release` in which this `Stage` lives. + string target_id = 1; + + // Skaffold profiles to use when rendering the manifest for this stage's + // `Target`. + repeated string profiles = 2; +} + +// PipelineReadyCondition contains information around the status of the +// Pipeline. +message PipelineReadyCondition { + // True if the Pipeline is in a valid state. Otherwise at least one condition + // in `PipelineCondition` is in an invalid state. Iterate over those + // conditions and see which condition(s) has status = false to find out what + // is wrong with the Pipeline. + bool status = 3; + + // Last time the condition was updated. + google.protobuf.Timestamp update_time = 4; +} + +// TargetsPresentCondition contains information on any Targets defined in +// the Delivery Pipeline that do not actually exist. +message TargetsPresentCondition { + // True if there aren't any missing Targets. + bool status = 1; + + // The list of Target names that are missing. For example, + // projects/{project_id}/locations/{location_name}/targets/{target_name}. + repeated string missing_targets = 2 [(google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Target" + }]; + + // Last time the condition was updated. + google.protobuf.Timestamp update_time = 4; +} + +// PipelineCondition contains all conditions relevant to a Delivery Pipeline. +message PipelineCondition { + // Details around the Pipeline's overall status. + PipelineReadyCondition pipeline_ready_condition = 1; + + // Detalis around targets enumerated in the pipeline. + TargetsPresentCondition targets_present_condition = 3; +} + +// The request object for `ListDeliveryPipelines`. +message ListDeliveryPipelinesRequest { + // Required. The parent, which owns this collection of pipelines. Format must be + // projects/{project_id}/locations/{location_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // The maximum number of pipelines to return. The service may return + // fewer than this value. If unspecified, at most 50 pipelines will + // be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListDeliveryPipelines` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3; + + // Filter builds to be returned. See https://google.aip.dev/160 for more + // details. + string filter = 4; + + // Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5; +} + +// The response object from `ListDeliveryPipelines`. +message ListDeliveryPipelinesResponse { + // The `DeliveryPipeline` objects. + repeated DeliveryPipeline delivery_pipelines = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetDeliveryPipeline` +message GetDeliveryPipelineRequest { + // Required. Name of the `DeliveryPipeline`. Format must be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; +} + +// The request object for `CreateDeliveryPipeline`. +message CreateDeliveryPipelineRequest { + // Required. The parent collection in which the `DeliveryPipeline` should be created. + // Format should be projects/{project_id}/locations/{location_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Required. ID of the `DeliveryPipeline`. + string delivery_pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `DeliveryPipeline` to create. + DeliveryPipeline delivery_pipeline = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `UpdateDeliveryPipeline`. +message UpdateDeliveryPipelineRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `DeliveryPipeline` resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `DeliveryPipeline` to update. + DeliveryPipeline delivery_pipeline = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, updating a `DeliveryPipeline` that does not exist will + // result in the creation of a new `DeliveryPipeline`. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `DeleteDeliveryPipeline`. +message DeleteDeliveryPipelineRequest { + // Required. The name of the `DeliveryPipeline` to delete. Format should be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, then deleting an already deleted or non-existing + // `DeliveryPipeline` will succeed. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not actually + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, all child resources under this pipeline will also be + // deleted. Otherwise, the request will only work if the pipeline has + // no child resources. + bool force = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A `Target` resource in the Google Cloud Deploy API. +// +// A `Target` defines a location to which a Skaffold configuration +// can be deployed. +message Target { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Target" + pattern: "projects/{project}/locations/{location}/targets/{target}" + }; + + // Optional. Name of the `Target`. Format is projects/{project}/locations/{location}/ + // deliveryPipelines/{deliveryPipeline}/targets/[a-z][a-z0-9\-]{0,62}. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Resource id of the `Target`. + string target_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Unique identifier of the `Target`. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the `Target`. Max length is 255 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User annotations. These attributes can only be set and used by the + // user, and not by Google Cloud Deploy. See + // https://google.aip.dev/128#annotations for more details such as format and + // size limitations. + map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels are attributes that can be set and used by both the + // user and by Google Cloud Deploy. Labels must meet the following + // constraints: Each resource is limited to 64 labels. Keys must conform to + // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: + // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be + // <= 128 bytes in size. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether or not the `Target` requires approval. + bool require_approval = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Time at which the `Target` was created. + google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Most recent time at which the `Target` was updated. + google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Destination to which the Skaffold configuration is applied during a + // rollout. + oneof deployment_target { + // Information specifying a GKE Cluster. + GkeCluster gke = 15; + } + + // Optional. This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Configurations for all execution that relates to this `Target`. + // Each `ExecutionEnvironmentUsage` value may only be used in a single + // configuration; using the same value multiple times is an error. + // When one or more configurations are specified, they must include the + // `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. + // When no configurations are specified, execution will use the default + // specified in `DefaultPool`. + repeated ExecutionConfig execution_configs = 16; +} + +// Configuration of the environment to use when calling Skaffold. +message ExecutionConfig { + // Possible usages of this configuration. + enum ExecutionEnvironmentUsage { + // Default value. This value is unused. + EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0; + + // Use for rendering. + RENDER = 1; + + // Use for deploying and deployment hooks. + DEPLOY = 2; + } + + // Required. Usages when this configuration should be applied. + repeated ExecutionEnvironmentUsage usages = 1 [(google.api.field_behavior) = REQUIRED]; + + // Details of the environment. + oneof execution_environment { + // Optional. Use default Cloud Build pool. + DefaultPool default_pool = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Use private Cloud Build pool. + PrivatePool private_pool = 3 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Execution using the default Cloud Build pool. +message DefaultPool { + // Optional. Google service account to use for execution. If unspecified, + // the project execution service account + // (-compute@developer.gserviceaccount.com) will be used. + string service_account = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage location where execution outputs should be stored. This can + // either be a bucket ("gs://my-bucket") or a path within a bucket + // ("gs://my-bucket/my-dir"). + // If unspecified, a default bucket located in the same region will be used. + string artifact_storage = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Execution using a private Cloud Build pool. +message PrivatePool { + // Required. Resource name of the Cloud Build worker pool to use. The format is + // `projects/{project}/locations/{location}/workerPools/{pool}`. + string worker_pool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; + + // Optional. Google service account to use for execution. If unspecified, + // the project execution service account + // (-compute@developer.gserviceaccount.com) will be used. + string service_account = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage location where execution outputs should be stored. This can + // either be a bucket ("gs://my-bucket") or a path within a bucket + // ("gs://my-bucket/my-dir"). + // If unspecified, a default bucket located in the same region will be used. + string artifact_storage = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Information specifying a GKE Cluster. +message GkeCluster { + // Information specifying a GKE Cluster. Format is + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}. + string cluster = 1 [(google.api.resource_reference) = { + type: "container.googleapis.com/Cluster" + }]; +} + +// The request object for `ListTargets`. +message ListTargetsRequest { + // Required. The parent, which owns this collection of targets. Format must be + // projects/{project_id}/locations/{location_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Target" + } + ]; + + // Optional. The maximum number of `Target` objects to return. The service may return + // fewer than this value. If unspecified, at most 50 `Target` objects will be + // returned. The maximum value is 1000; values above 1000 will be set to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListTargets` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + // details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response object from `ListTargets`. +message ListTargetsResponse { + // The `Target` objects. + repeated Target targets = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetTarget`. +message GetTargetRequest { + // Required. Name of the `Target`. Format must be + // projects/{project_id}/locations/{location_name}/targets/{target_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Target" + } + ]; +} + +// The request object for `CreateTarget`. +message CreateTargetRequest { + // Required. The parent collection in which the `Target` should be created. + // Format should be + // projects/{project_id}/locations/{location_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Target" + } + ]; + + // Required. ID of the `Target`. + string target_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Target` to create. + Target target = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `UpdateTarget`. +message UpdateTargetRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Target resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Target` to update. + Target target = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, updating a `Target` that does not exist will + // result in the creation of a new `Target`. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `DeleteTarget`. +message DeleteTargetRequest { + // Required. The name of the `Target` to delete. Format should be + // projects/{project_id}/locations/{location_name}/targets/{target_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Target" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, then deleting an already deleted or non-existing + // DeliveryPipeline will succeed. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not actually + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A `Release` resource in the Google Cloud Deploy API. +// +// A `Release` defines a specific Skaffold configuration instance +// that can be deployed. +message Release { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Release" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}" + }; + + // Details of rendering for a single target. + message TargetRender { + // Valid states of the render operation. + enum TargetRenderState { + // The render operation state is unspecified. + TARGET_RENDER_STATE_UNSPECIFIED = 0; + + // The render operation has completed successfully. + SUCCEEDED = 1; + + // The render operation has failed. + FAILED = 2; + + // The render operation is in progress. + IN_PROGRESS = 3; + } + + // Output only. The resource name of the Cloud Build `Build` object that is used to + // render the manifest for this target. Format is + // `projects/{project}/locations/{location}/builds/{build}`. + string rendering_build = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // Output only. Current state of the render operation for this Target. + TargetRenderState rendering_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Valid states of the render operation. + enum RenderState { + // The render state is unspecified. + RENDER_STATE_UNSPECIFIED = 0; + + // All rendering operations have completed successfully. + SUCCEEDED = 1; + + // All rendering operations have completed, and one or more have failed. + FAILED = 2; + + // Rendering has started and is not complete. + IN_PROGRESS = 3; + } + + // Optional. Name of the `Release`. Format is projects/{project}/ + // locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/[a-z][a-z0-9\-]{0,62}. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `Release`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the `Release`. Max length is 255 characters. + string description = 3; + + // User annotations. These attributes can only be set and used by the + // user, and not by Google Cloud Deploy. See + // https://google.aip.dev/128#annotations for more details such as format and + // size limitations. + map annotations = 4; + + // Labels are attributes that can be set and used by both the + // user and by Google Cloud Deploy. Labels must meet the following + // constraints: Each resource is limited to 64 labels. Keys must conform to + // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: + // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be + // <= 128 bytes in size. + map labels = 5; + + // Output only. Time at which the `Release` was created. + google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the render began. + google.protobuf.Timestamp render_start_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the render completed. + google.protobuf.Timestamp render_end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Cloud Storage URI of tar.gz archive containing Skaffold configuration. + string skaffold_config_uri = 17; + + // Filepath of the Skaffold config inside of the config URI. + string skaffold_config_path = 9; + + // List of artifacts to pass through to Skaffold command. + repeated BuildArtifact build_artifacts = 10; + + // Output only. Snapshot of the parent pipeline taken at release creation time. + DeliveryPipeline delivery_pipeline_snapshot = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Snapshot of the parent pipeline's targets taken at release creation time. + repeated Target target_snapshots = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the render operation. + RenderState render_state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 16; + + // The Skaffold version to use when operating on this release, such as + // "1.20.0". Not all versions are valid; Google Cloud Deploy supports a + // specific set of versions. + // + // If unset, the most recent supported Skaffold version will be used. + string skaffold_version = 19; + + // Output only. Map from target ID to the target artifacts created + // during the render operation. + map target_artifacts = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Map from target ID to details of the render operation for that target. + map target_renders = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Description of an a image to use during Skaffold rendering. +message BuildArtifact { + // Image name in Skaffold configuration. + string image = 3; + + // Image tag to use. This will generally be the full path to an image, such + // as "gcr.io/my-project/busybox:1.2.3" or + // "gcr.io/my-project/busybox@sha256:abc123". + string tag = 2; +} + +// The artifacts produced by a target render operation. +message TargetArtifact { + oneof uri { + // Output only. URI of a directory containing the artifacts. This contains + // deployment configuration used by Skaffold during a rollout, and all + // paths are relative to this location. + string artifact_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. File path of the resolved Skaffold configuration relative to the URI. + string skaffold_config_path = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. File path of the rendered manifest relative to the URI. + string manifest_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request object for `ListReleases`. +message ListReleasesRequest { + // Required. The `DeliveryPipeline` which owns this collection of `Release` objects. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Optional. The maximum number of `Release` objects to return. The service may return + // fewer than this value. If unspecified, at most 50 `Release` objects will be + // returned. The maximum value is 1000; values above 1000 will be set to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListReleases` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + // details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response object from `ListReleases`. +message ListReleasesResponse { + // The `Release` objects. + repeated Release releases = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetRelease`. +message GetReleaseRequest { + // Required. Name of the `Release`. Format must be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; +} + +// The request object for `CreateRelease`, +message CreateReleaseRequest { + // Required. The parent collection in which the `Release` should be created. + // Format should be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Required. ID of the `Release`. + string release_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Release` to create. + Release release = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A `Rollout` resource in the Google Cloud Deploy API. +// +// A `Rollout` contains information around a specific deployment to a `Target`. +message Rollout { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Rollout" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}" + }; + + // Valid approval states of a `Rollout`. + enum ApprovalState { + // The `Rollout` has an unspecified approval state. + APPROVAL_STATE_UNSPECIFIED = 0; + + // The `Rollout` requires approval. + NEEDS_APPROVAL = 1; + + // The `Rollout` does not require approval. + DOES_NOT_NEED_APPROVAL = 2; + + // The `Rollout` has been approved. + APPROVED = 3; + + // The `Rollout` has been rejected. + REJECTED = 4; + } + + // Valid states of a `Rollout`. + enum State { + // The `Rollout` has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The `Rollout` has completed successfully. + SUCCEEDED = 1; + + // The `Rollout` has failed. + FAILED = 2; + + // The `Rollout` is being deployed. + IN_PROGRESS = 3; + + // The `Rollout` needs approval. + PENDING_APPROVAL = 4; + + // An approver rejected the `Rollout`. + APPROVAL_REJECTED = 5; + + // The `Rollout` is waiting for an earlier Rollout(s) to complete on this + // `Target`. + PENDING = 6; + + // The `Rollout` is waiting for the `Release` to be fully rendered. + PENDING_RELEASE = 7; + } + + // Optional. Name of the `Rollout`. Format is projects/{project}/ + // locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `Rollout`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the `Rollout` for user purposes. Max length is 255 + // characters. + string description = 3; + + // User annotations. These attributes can only be set and used by the + // user, and not by Google Cloud Deploy. See + // https://google.aip.dev/128#annotations for more details such as format and + // size limitations. + map annotations = 4; + + // Labels are attributes that can be set and used by both the + // user and by Google Cloud Deploy. Labels must meet the following + // constraints: Each resource is limited to 64 labels. Keys must conform to + // the regexp: [a-zA-Z][a-zA-Z0-9_-]{0,62} Values must conform to the regexp: + // [a-zA-Z0-9_-]{0,63} Both keys and values are additionally constrained to be + // <= 128 bytes in size. + map labels = 5; + + // Output only. Time at which the `Rollout` was created. + google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` was approved. + google.protobuf.Timestamp approve_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` was enqueued. + google.protobuf.Timestamp enqueue_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` started deploying. + google.protobuf.Timestamp deploy_start_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` finished deploying. + google.protobuf.Timestamp deploy_end_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The ID of Target to which this `Rollout` is deploying. + string target_id = 18 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Approval state of the `Rollout`. + ApprovalState approval_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the `Rollout`. + State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reason the build failed. Empty if the build succeeded. + string failure_reason = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the Cloud Build `Build` object that is used to deploy + // the Rollout. Format is + // `projects/{project}/locations/{location}/builds/{build}`. + string deploying_build = 17 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 16; +} + +// ListRolloutsRequest is the request object used by `ListRollouts`. +message ListRolloutsRequest { + // Required. The `Release` which owns this collection of `Rollout` objects. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; + + // Optional. The maximum number of `Rollout` objects to return. The service may return + // fewer than this value. If unspecified, at most 50 `Rollout` objects will be + // returned. The maximum value is 1000; values above 1000 will be set to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListRollouts` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter builds to be returned. See https://google.aip.dev/160 for more + // details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// ListRolloutsResponse is the response object reutrned by `ListRollouts`. +message ListRolloutsResponse { + // The `Rollout` objects. + repeated Rollout rollouts = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetRolloutRequest is the request object used by `GetRollout`. +message GetRolloutRequest { + // Required. Name of the `Rollout`. Format must be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; +} + +// CreateRolloutRequest is the request object used by `CreateRollout`. +message CreateRolloutRequest { + // Required. The parent collection in which the `Rollout` should be created. + // Format should be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; + + // Required. ID of the `Rollout`. + string rollout_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Rollout` to create. + Rollout rollout = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided with + // an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request object used by `ApproveRollout`. +message ApproveRolloutRequest { + // Required. Name of the Rollout. Format is + // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/{release}/rollouts/{rollout}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; + + // Required. True = approve; false = reject + bool approved = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The response object from `ApproveRollout`. +message ApproveRolloutResponse { + +} + +// Service-wide configuration. +message Config { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Config" + pattern: "projects/{project}/locations/{location}/config" + }; + + // Name of the configuration. + string name = 1; + + // Output only. All supported versions of Skaffold. + repeated SkaffoldVersion supported_versions = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Default Skaffold version that is assigned when a Release is created without + // specifying a Skaffold version. + string default_skaffold_version = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Details of a supported Skaffold version. +message SkaffoldVersion { + // Release version number. For example, "1.20.3". + string version = 1; + + // Date when this version is expected to no longer be supported. + google.type.Date support_end_date = 2; +} + +// Request to get a configuration. +message GetConfigRequest { + // Required. Name of requested configuration. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Config" + } + ]; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..ee228ce --- /dev/null +++ b/renovate.json @@ -0,0 +1,77 @@ +{ + "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-deploy", + "^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, + "dependencyDashboardLabels": [ + "type: process" + ] +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 0000000..669597b --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + deploy-install-without-bom + jar + Google Google CLoud Deploy Install Without Bom + https://github.com/googleapis/java-deploy + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-deploy + 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..6352dac --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-deploy-samples + 0.0.1-SNAPSHOT + pom + Google Google CLoud Deploy Samples Parent + https://github.com/googleapis/java-deploy + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.18 + + + + 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..19e8d3b --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + deploy-snapshot + jar + Google Google CLoud Deploy Snapshot Samples + https://github.com/googleapis/java-deploy + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-deploy + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + \ No newline at end of file diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 0000000..e76f444 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + deploy-snippets + jar + Google Google CLoud Deploy Snippets + https://github.com/googleapis/java-deploy + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-deploy + 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..6d80b15 --- /dev/null +++ b/versions.txt @@ -0,0 +1,6 @@ +# Format: +# module:released-version:current-version + +google-cloud-deploy:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-deploy-v1:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-deploy-v1:0.0.0:0.0.1-SNAPSHOT