From a49131ea010a6b979081b7e60310811ca59af9f5 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Fri, 4 Jun 2021 12:41:50 -0400 Subject: [PATCH] feat: initial generation --- .github/.OwlBot.lock.yaml | 3 + .github/.OwlBot.yaml | 29 + .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/readme/synth.py | 19 + .github/release-please.yml | 3 + .github/snippet-bot.yml | 0 .github/sync-repo-settings.yaml | 49 + .github/trusted-contribution.yml | 2 + .github/workflows/approve-readme.yaml | 54 + .github/workflows/auto-release.yaml | 88 + .github/workflows/ci.yaml | 79 + .github/workflows/samples.yaml | 14 + .gitignore | 17 + .kokoro/build.bat | 3 + .kokoro/build.sh | 125 + .kokoro/coerce_logs.sh | 38 + .kokoro/common.cfg | 13 + .kokoro/common.sh | 58 + .kokoro/continuous/common.cfg | 25 + .kokoro/continuous/java8.cfg | 12 + .kokoro/continuous/readme.cfg | 55 + .kokoro/dependencies.sh | 90 + .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 | 15 + CODE_OF_CONDUCT.md | 94 + CONTRIBUTING.md | 139 + LICENSE | 201 + codecov.yaml | 4 + google-cloud-life-sciences-bom/pom.xml | 85 + google-cloud-life-sciences/pom.xml | 111 + .../v2beta/WorkflowsServiceV2BetaClient.java | 329 ++ .../WorkflowsServiceV2BetaSettings.java | 199 + .../lifesciences/v2beta/gapic_metadata.json | 21 + .../lifesciences/v2beta/package-info.java | 44 + ...WorkflowsServiceV2BetaCallableFactory.java | 115 + .../stub/GrpcWorkflowsServiceV2BetaStub.java | 178 + .../stub/WorkflowsServiceV2BetaStub.java | 55 + .../WorkflowsServiceV2BetaStubSettings.java | 316 ++ .../v2beta/MockWorkflowsServiceV2Beta.java | 59 + .../MockWorkflowsServiceV2BetaImpl.java | 81 + .../WorkflowsServiceV2BetaClientTest.java | 141 + .../pom.xml | 69 + .../v2beta/WorkflowsServiceV2BetaGrpc.java | 419 ++ java.header | 15 + license-checks.xml | 10 + owlbot.py | 24 + pom.xml | 179 + .../clirr-ignored-differences.xml | 19 + .../pom.xml | 46 + .../lifesciences/v2beta/Accelerator.java | 767 +++ .../v2beta/AcceleratorOrBuilder.java | 75 + .../cloud/lifesciences/v2beta/Action.java | 4967 +++++++++++++++++ .../lifesciences/v2beta/ActionOrBuilder.java | 819 +++ .../v2beta/ContainerKilledEvent.java | 551 ++ .../v2beta/ContainerKilledEventOrBuilder.java | 38 + .../v2beta/ContainerStartedEvent.java | 1081 ++++ .../ContainerStartedEventOrBuilder.java | 133 + .../v2beta/ContainerStoppedEvent.java | 859 +++ .../ContainerStoppedEventOrBuilder.java | 88 + .../lifesciences/v2beta/DelayedEvent.java | 971 ++++ .../v2beta/DelayedEventOrBuilder.java | 117 + .../cloud/lifesciences/v2beta/Disk.java | 1124 ++++ .../lifesciences/v2beta/DiskOrBuilder.java | 122 + .../cloud/lifesciences/v2beta/Event.java | 4154 ++++++++++++++ .../lifesciences/v2beta/EventOrBuilder.java | 447 ++ .../lifesciences/v2beta/ExistingDisk.java | 692 +++ .../v2beta/ExistingDiskOrBuilder.java | 66 + .../lifesciences/v2beta/FailedEvent.java | 785 +++ .../v2beta/FailedEventOrBuilder.java | 75 + .../cloud/lifesciences/v2beta/Metadata.java | 2564 +++++++++ .../v2beta/MetadataOrBuilder.java | 303 + .../cloud/lifesciences/v2beta/Mount.java | 903 +++ .../lifesciences/v2beta/MountOrBuilder.java | 88 + .../cloud/lifesciences/v2beta/NFSMount.java | 634 +++ .../v2beta/NFSMountOrBuilder.java | 50 + .../cloud/lifesciences/v2beta/Network.java | 982 ++++ .../lifesciences/v2beta/NetworkOrBuilder.java | 110 + .../lifesciences/v2beta/PersistentDisk.java | 929 +++ .../v2beta/PersistentDiskOrBuilder.java | 93 + .../cloud/lifesciences/v2beta/Pipeline.java | 1890 +++++++ .../v2beta/PipelineOrBuilder.java | 223 + .../lifesciences/v2beta/PullStartedEvent.java | 637 +++ .../v2beta/PullStartedEventOrBuilder.java | 50 + .../lifesciences/v2beta/PullStoppedEvent.java | 637 +++ .../v2beta/PullStoppedEventOrBuilder.java | 50 + .../cloud/lifesciences/v2beta/Resources.java | 1319 +++++ .../v2beta/ResourcesOrBuilder.java | 170 + .../v2beta/RunPipelineRequest.java | 1511 +++++ .../v2beta/RunPipelineRequestOrBuilder.java | 196 + .../v2beta/RunPipelineResponse.java | 459 ++ .../v2beta/RunPipelineResponseOrBuilder.java | 24 + .../cloud/lifesciences/v2beta/Secret.java | 836 +++ .../lifesciences/v2beta/SecretOrBuilder.java | 81 + .../lifesciences/v2beta/ServiceAccount.java | 936 ++++ .../v2beta/ServiceAccountOrBuilder.java | 107 + .../v2beta/UnexpectedExitStatusEvent.java | 649 +++ .../UnexpectedExitStatusEventOrBuilder.java | 51 + .../lifesciences/v2beta/VirtualMachine.java | 4482 +++++++++++++++ .../v2beta/VirtualMachineOrBuilder.java | 621 +++ .../cloud/lifesciences/v2beta/Volume.java | 1657 ++++++ .../lifesciences/v2beta/VolumeOrBuilder.java | 163 + .../v2beta/WorkerAssignedEvent.java | 997 ++++ .../v2beta/WorkerAssignedEventOrBuilder.java | 100 + .../v2beta/WorkerReleasedEvent.java | 818 +++ .../v2beta/WorkerReleasedEventOrBuilder.java | 75 + .../lifesciences/v2beta/WorkflowsProto.java | 700 +++ .../cloud/lifesciences/v2beta/workflows.proto | 745 +++ renovate.json | 73 + samples/install-without-bom/pom.xml | 84 + samples/pom.xml | 56 + samples/snapshot/pom.xml | 83 + samples/snippets/pom.xml | 47 + versions.txt | 6 + 156 files changed, 49913 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/readme/synth.py create mode 100644 .github/release-please.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 100644 .kokoro/continuous/readme.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 codecov.yaml create mode 100644 google-cloud-life-sciences-bom/pom.xml create mode 100644 google-cloud-life-sciences/pom.xml create mode 100644 google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaClient.java create mode 100644 google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaSettings.java create mode 100644 google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/gapic_metadata.json create mode 100644 google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/package-info.java create mode 100644 google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaCallableFactory.java create mode 100644 google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaStub.java create mode 100644 google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStub.java create mode 100644 google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStubSettings.java create mode 100644 google-cloud-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/MockWorkflowsServiceV2Beta.java create mode 100644 google-cloud-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/MockWorkflowsServiceV2BetaImpl.java create mode 100644 google-cloud-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaClientTest.java create mode 100644 grpc-google-cloud-life-sciences-v2beta/pom.xml create mode 100644 grpc-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaGrpc.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-life-sciences-v2beta/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-life-sciences-v2beta/pom.xml create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Accelerator.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/AcceleratorOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Action.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ActionOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerKilledEvent.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerKilledEventOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStartedEvent.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStartedEventOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStoppedEvent.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStoppedEventOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DelayedEvent.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DelayedEventOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Disk.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DiskOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Event.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/EventOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ExistingDisk.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ExistingDiskOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/FailedEvent.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/FailedEventOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Metadata.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/MetadataOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Mount.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/MountOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NFSMount.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NFSMountOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Network.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NetworkOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PersistentDisk.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PersistentDiskOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Pipeline.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PipelineOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStartedEvent.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStartedEventOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStoppedEvent.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStoppedEventOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Resources.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ResourcesOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineRequest.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineRequestOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineResponse.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineResponseOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Secret.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/SecretOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ServiceAccount.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ServiceAccountOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/UnexpectedExitStatusEvent.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/UnexpectedExitStatusEventOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VirtualMachine.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VirtualMachineOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Volume.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VolumeOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerAssignedEvent.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerAssignedEventOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerReleasedEvent.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerReleasedEventOrBuilder.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsProto.java create mode 100644 proto-google-cloud-life-sciences-v2beta/src/main/proto/google/cloud/lifesciences/v2beta/workflows.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 00000000..5d229638 --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + digest: sha256:689e998ca8b33117d8607b1c3df12b9cfebd68b621ba5ab6ce17be8715506203 + 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 00000000..5529f8c0 --- /dev/null +++ b/.github/.OwlBot.yaml @@ -0,0 +1,29 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker: + image: "gcr.io/repo-automation-bots/owlbot-java:latest" + +deep-remove-regex: +- "/grpc-google-.*/src" +- "/proto-google-.*/src" +- "/google-.*/src" + +deep-copy-regex: +- source: "/google/cloud/lifesciences/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/$1/proto-google-cloud-life-sciences-$1/src" +- source: "/google/cloud/lifesciences/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/$1/grpc-google-cloud-life-sciences-$1/src" +- source: "/google/cloud/lifesciences/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/$1/google-cloud-life-sciences/src" \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..30fdb7b9 --- /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 00000000..fd772e9f --- /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-life-sciences/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. life-sciences 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 00000000..754e30c6 --- /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 00000000..99586903 --- /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 00000000..5a17012a --- /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-life-sciences/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 00000000..1a23ea42 --- /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 00000000..c644a24e --- /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/readme/synth.py b/.github/readme/synth.py new file mode 100644 index 00000000..7b48cc28 --- /dev/null +++ b/.github/readme/synth.py @@ -0,0 +1,19 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated the README for this library.""" + +from synthtool.languages import java + +java.custom_templates(["java_library/README.md"]) diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 00000000..8ca7f9ca --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,3 @@ +bumpMinorPreMajor: true +handleGHRelease: true +releaseType: java-yoshi diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 00000000..e69de29b diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 00000000..e100454f --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,49 @@ + +# 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)" + - "linkage-monitor" + - "lint" + - "clirr" + - "units (7)" + - "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 00000000..f247d5c7 --- /dev/null +++ b/.github/trusted-contribution.yml @@ -0,0 +1,2 @@ +trustedContributors: +- renovate-bot \ No newline at end of file diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 00000000..7513acae --- /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 00000000..9b4fd4d8 --- /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 00000000..0195b32f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,79 @@ +on: + push: + branches: + - master + pull_request: +name: ci +jobs: + units: + runs-on: ubuntu-latest + strategy: + matrix: + java: [7, 8, 11] + steps: + - uses: actions/checkout@v2 + - 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: 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: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/dependencies.sh + linkage-monitor: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - name: Install artifacts to local Maven repository + run: .kokoro/build.sh + shell: bash + - name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) + uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - 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: 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 00000000..c46230a7 --- /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 00000000..069d08fc --- /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 00000000..05826ad9 --- /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 00000000..b6e2eb2e --- /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_BUILD_COP}" == "true" ]] +then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-life-sciences +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 00000000..5cf7ba49 --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,38 @@ +#!/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 + echo "processing ${xml}" + 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 00000000..2291ea89 --- /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-life-sciences/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-life-sciences/.kokoro/build.sh" +} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 00000000..ace89f45 --- /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 00000000..7d7f9121 --- /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-life-sciences/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-life-sciences/.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 00000000..495cc7ba --- /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/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 00000000..1e17e00d --- /dev/null +++ b/.kokoro/continuous/readme.cfg @@ -0,0 +1,55 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# 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. + +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-life-sciences/.kokoro/readme.sh" +} + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.log" + } +} + +# The github token is stored here. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + # TODO(theacodes): remove this after secrets have globally propagated + backend_type: FASTCONFIGPUSH + } + } +} + +# Common env vars for all repositories and builds. +env_vars: { + key: "GITHUB_USER" + value: "yoshi-automation" +} +env_vars: { + key: "GITHUB_EMAIL" + value: "yoshi-automation@google.com" +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 00000000..59d2aafc --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,90 @@ +#!/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 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/\\s--\\smodule.*// >.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 $(find -name ".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 00000000..7d7f9121 --- /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-life-sciences/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-life-sciences/.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 00000000..0048c8ec --- /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_BUILD_COP" + 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 00000000..709f2b4c --- /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 00000000..cb24f44e --- /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 00000000..f9c54151 --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-life-sciences/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 00000000..f866f70e --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-life-sciences/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /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 00000000..f2542931 --- /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_BUILD_COP" + value: "true" +} diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh new file mode 100755 index 00000000..f5251425 --- /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 00000000..ec572442 --- /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 00000000..51c2253a --- /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-life-sciences/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-life-sciences/.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 00000000..f8183aa3 --- /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-life-sciences/.kokoro/dependencies.sh" +} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 00000000..dded67a9 --- /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 00000000..709f2b4c --- /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 00000000..cb24f44e --- /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 00000000..f9c54151 --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-life-sciences/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 00000000..f866f70e --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-life-sciences/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /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 00000000..8403b0fd --- /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-life-sciences/.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 00000000..6d323c8a --- /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 00000000..01e09600 --- /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 00000000..016950a1 --- /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-life-sciences + +# 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-life-sciences \ + --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 00000000..12a9ba81 --- /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-life-sciences/.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-life-sciences/.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 00000000..754cae39 --- /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-life-sciences/.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 00000000..6e3f6599 --- /dev/null +++ b/.kokoro/release/common.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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 00000000..a91d1735 --- /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-life-sciences/.kokoro/release/drop.sh" +} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 00000000..5c4551ef --- /dev/null +++ b/.kokoro/release/drop.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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 00000000..70448bac --- /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-life-sciences/.kokoro/release/promote.sh" +} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 00000000..1fa95fa5 --- /dev/null +++ b/.kokoro/release/promote.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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 00000000..82663ed0 --- /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-life-sciences/.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 00000000..d9d83789 --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# Copyright 2019 Google Inc. +# +# Licensed under the Apache License, Version 2.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-life-sciences +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 00000000..9bafc3f0 --- /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-life-sciences/.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 00000000..d565ff31 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# Copyright 2021 Google Inc. +# +# Licensed under the Apache License, Version 2.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-life-sciences +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 00000000..2061f232 --- /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-life-sciences/.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 00000000..1f55b770 --- /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 00000000..5b666eab --- /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-life-sciences/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-life-sciences/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-life-sciences" + } +} + +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 00000000..8a103384 --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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 00000000..9da0f839 --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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 00000000..0943db9c --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "life-sciences", + "name_pretty": "Cloud Life Sciences", + "product_documentation": "https://cloud.google.com/life-sciences/docs", + "api_description": "is a suite of services and tools for managing, processing, and transforming life sciences data.", + "client_documentation": "https://googleapis.dev/java/google-cloud-life-sciences/latest/index.html", + "release_level": "beta", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-life-sciences", + "repo_short": "java-life-sciences", + "distribution_name": "com.google.cloud:google-cloud-life-sciences", + "api_id": "life-sciences.googleapis.com", + "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 00000000..2add2547 --- /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 00000000..f2dbdee0 --- /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 00000000..261eeb9e --- /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/codecov.yaml b/codecov.yaml new file mode 100644 index 00000000..5724ea94 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/google-cloud-life-sciences-bom/pom.xml b/google-cloud-life-sciences-bom/pom.xml new file mode 100644 index 00000000..79f49140 --- /dev/null +++ b/google-cloud-life-sciences-bom/pom.xml @@ -0,0 +1,85 @@ + + + 4.0.0 + com.google.cloud + google-cloud-life-sciences-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 0.11.0 + + + Google Cloud Life Sciences BOM + https://github.com/googleapis/java-life-sciences + + BOM for Cloud Life Sciences + + + + Google LLC + + + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + + + scm:git:https://github.com/googleapis/java-life-sciences.git + scm:git:git@github.com:googleapis/java-life-sciences.git + https://github.com/googleapis/java-life-sciences + + + + true + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + com.google.cloud + google-cloud-life-sciences + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-life-sciences-v2beta + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-life-sciences-v2beta + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + diff --git a/google-cloud-life-sciences/pom.xml b/google-cloud-life-sciences/pom.xml new file mode 100644 index 00000000..49c2c647 --- /dev/null +++ b/google-cloud-life-sciences/pom.xml @@ -0,0 +1,111 @@ + + + 4.0.0 + com.google.cloud + google-cloud-life-sciences + 0.0.1-SNAPSHOT + jar + Google Cloud Life Sciences + https://github.com/googleapis/java-life-sciences + Cloud Life Sciences is a suite of services and tools for managing, processing, and transforming life sciences data. + + com.google.cloud + google-cloud-life-sciences-parent + 0.0.1-SNAPSHOT + + + google-cloud-life-sciences + + + + 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-life-sciences-v2beta + + + 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-life-sciences-v2beta + 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-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaClient.java b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaClient.java new file mode 100644 index 00000000..8766eed7 --- /dev/null +++ b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaClient.java @@ -0,0 +1,329 @@ +/* + * 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.lifesciences.v2beta; + +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.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.lifesciences.v2beta.stub.WorkflowsServiceV2BetaStub; +import com.google.cloud.lifesciences.v2beta.stub.WorkflowsServiceV2BetaStubSettings; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: A service for running workflows, such as pipelines consisting of Docker + * containers. + * + *

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 (WorkflowsServiceV2BetaClient workflowsServiceV2BetaClient =
+ *     WorkflowsServiceV2BetaClient.create()) {
+ *   RunPipelineRequest request =
+ *       RunPipelineRequest.newBuilder()
+ *           .setParent("parent-995424086")
+ *           .setPipeline(Pipeline.newBuilder().build())
+ *           .putAllLabels(new HashMap())
+ *           .setPubSubTopic("pubSubTopic320524524")
+ *           .build();
+ *   RunPipelineResponse response = workflowsServiceV2BetaClient.runPipelineAsync(request).get();
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * WorkflowsServiceV2BetaSettings workflowsServiceV2BetaSettings =
+ *     WorkflowsServiceV2BetaSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * WorkflowsServiceV2BetaClient workflowsServiceV2BetaClient =
+ *     WorkflowsServiceV2BetaClient.create(workflowsServiceV2BetaSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * WorkflowsServiceV2BetaSettings workflowsServiceV2BetaSettings =
+ *     WorkflowsServiceV2BetaSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * WorkflowsServiceV2BetaClient workflowsServiceV2BetaClient =
+ *     WorkflowsServiceV2BetaClient.create(workflowsServiceV2BetaSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class WorkflowsServiceV2BetaClient implements BackgroundResource { + private final WorkflowsServiceV2BetaSettings settings; + private final WorkflowsServiceV2BetaStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of WorkflowsServiceV2BetaClient with default settings. */ + public static final WorkflowsServiceV2BetaClient create() throws IOException { + return create(WorkflowsServiceV2BetaSettings.newBuilder().build()); + } + + /** + * Constructs an instance of WorkflowsServiceV2BetaClient, 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 WorkflowsServiceV2BetaClient create(WorkflowsServiceV2BetaSettings settings) + throws IOException { + return new WorkflowsServiceV2BetaClient(settings); + } + + /** + * Constructs an instance of WorkflowsServiceV2BetaClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(WorkflowsServiceV2BetaSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final WorkflowsServiceV2BetaClient create(WorkflowsServiceV2BetaStub stub) { + return new WorkflowsServiceV2BetaClient(stub); + } + + /** + * Constructs an instance of WorkflowsServiceV2BetaClient, 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 WorkflowsServiceV2BetaClient(WorkflowsServiceV2BetaSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((WorkflowsServiceV2BetaStubSettings) 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 WorkflowsServiceV2BetaClient(WorkflowsServiceV2BetaStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final WorkflowsServiceV2BetaSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public WorkflowsServiceV2BetaStub 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. + /** + * Runs a pipeline. The returned Operation's [metadata] [google.longrunning.Operation.metadata] + * field will contain a + * [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] object + * describing the status of the pipeline execution. The + * [response][google.longrunning.Operation.response] field will contain a + * [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] + * object if the pipeline completes successfully. + * + *

**Note:** Before you can use this method, the *Life Sciences Service + * Agent* must have access to your project. This is done automatically when the Cloud Life + * Sciences API is first enabled, but if you delete this permission you must disable and re-enable + * the API to grant the Life Sciences Service Agent the required permissions. Authorization + * requires the following [Google IAM](https://cloud.google.com/iam/) permission: + * + *

    + *
  • `lifesciences.workflows.run` + *
+ * + *

Sample code: + * + *

{@code
+   * try (WorkflowsServiceV2BetaClient workflowsServiceV2BetaClient =
+   *     WorkflowsServiceV2BetaClient.create()) {
+   *   RunPipelineRequest request =
+   *       RunPipelineRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPipeline(Pipeline.newBuilder().build())
+   *           .putAllLabels(new HashMap())
+   *           .setPubSubTopic("pubSubTopic320524524")
+   *           .build();
+   *   RunPipelineResponse response = workflowsServiceV2BetaClient.runPipelineAsync(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 runPipelineAsync( + RunPipelineRequest request) { + return runPipelineOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Runs a pipeline. The returned Operation's [metadata] [google.longrunning.Operation.metadata] + * field will contain a + * [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] object + * describing the status of the pipeline execution. The + * [response][google.longrunning.Operation.response] field will contain a + * [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] + * object if the pipeline completes successfully. + * + *

**Note:** Before you can use this method, the *Life Sciences Service + * Agent* must have access to your project. This is done automatically when the Cloud Life + * Sciences API is first enabled, but if you delete this permission you must disable and re-enable + * the API to grant the Life Sciences Service Agent the required permissions. Authorization + * requires the following [Google IAM](https://cloud.google.com/iam/) permission: + * + *

    + *
  • `lifesciences.workflows.run` + *
+ * + *

Sample code: + * + *

{@code
+   * try (WorkflowsServiceV2BetaClient workflowsServiceV2BetaClient =
+   *     WorkflowsServiceV2BetaClient.create()) {
+   *   RunPipelineRequest request =
+   *       RunPipelineRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPipeline(Pipeline.newBuilder().build())
+   *           .putAllLabels(new HashMap())
+   *           .setPubSubTopic("pubSubTopic320524524")
+   *           .build();
+   *   OperationFuture future =
+   *       workflowsServiceV2BetaClient.runPipelineOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RunPipelineResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + runPipelineOperationCallable() { + return stub.runPipelineOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Runs a pipeline. The returned Operation's [metadata] [google.longrunning.Operation.metadata] + * field will contain a + * [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] object + * describing the status of the pipeline execution. The + * [response][google.longrunning.Operation.response] field will contain a + * [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] + * object if the pipeline completes successfully. + * + *

**Note:** Before you can use this method, the *Life Sciences Service + * Agent* must have access to your project. This is done automatically when the Cloud Life + * Sciences API is first enabled, but if you delete this permission you must disable and re-enable + * the API to grant the Life Sciences Service Agent the required permissions. Authorization + * requires the following [Google IAM](https://cloud.google.com/iam/) permission: + * + *

    + *
  • `lifesciences.workflows.run` + *
+ * + *

Sample code: + * + *

{@code
+   * try (WorkflowsServiceV2BetaClient workflowsServiceV2BetaClient =
+   *     WorkflowsServiceV2BetaClient.create()) {
+   *   RunPipelineRequest request =
+   *       RunPipelineRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPipeline(Pipeline.newBuilder().build())
+   *           .putAllLabels(new HashMap())
+   *           .setPubSubTopic("pubSubTopic320524524")
+   *           .build();
+   *   ApiFuture future =
+   *       workflowsServiceV2BetaClient.runPipelineCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable runPipelineCallable() { + return stub.runPipelineCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaSettings.java b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaSettings.java new file mode 100644 index 00000000..223b0186 --- /dev/null +++ b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaSettings.java @@ -0,0 +1,199 @@ +/* + * 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.lifesciences.v2beta; + +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.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.lifesciences.v2beta.stub.WorkflowsServiceV2BetaStubSettings; +import com.google.longrunning.Operation; +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 WorkflowsServiceV2BetaClient}. + * + *

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

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

{@code
+ * WorkflowsServiceV2BetaSettings.Builder workflowsServiceV2BetaSettingsBuilder =
+ *     WorkflowsServiceV2BetaSettings.newBuilder();
+ * workflowsServiceV2BetaSettingsBuilder
+ *     .runPipelineSettings()
+ *     .setRetrySettings(
+ *         workflowsServiceV2BetaSettingsBuilder
+ *             .runPipelineSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * WorkflowsServiceV2BetaSettings workflowsServiceV2BetaSettings =
+ *     workflowsServiceV2BetaSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class WorkflowsServiceV2BetaSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to runPipeline. */ + public UnaryCallSettings runPipelineSettings() { + return ((WorkflowsServiceV2BetaStubSettings) getStubSettings()).runPipelineSettings(); + } + + /** Returns the object with the settings used for calls to runPipeline. */ + public OperationCallSettings + runPipelineOperationSettings() { + return ((WorkflowsServiceV2BetaStubSettings) getStubSettings()).runPipelineOperationSettings(); + } + + public static final WorkflowsServiceV2BetaSettings create(WorkflowsServiceV2BetaStubSettings stub) + throws IOException { + return new WorkflowsServiceV2BetaSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return WorkflowsServiceV2BetaStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return WorkflowsServiceV2BetaStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return WorkflowsServiceV2BetaStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return WorkflowsServiceV2BetaStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return WorkflowsServiceV2BetaStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return WorkflowsServiceV2BetaStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return WorkflowsServiceV2BetaStubSettings.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 WorkflowsServiceV2BetaSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for WorkflowsServiceV2BetaSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(WorkflowsServiceV2BetaStubSettings.newBuilder(clientContext)); + } + + protected Builder(WorkflowsServiceV2BetaSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(WorkflowsServiceV2BetaStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(WorkflowsServiceV2BetaStubSettings.newBuilder()); + } + + public WorkflowsServiceV2BetaStubSettings.Builder getStubSettingsBuilder() { + return ((WorkflowsServiceV2BetaStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to runPipeline. */ + public UnaryCallSettings.Builder runPipelineSettings() { + return getStubSettingsBuilder().runPipelineSettings(); + } + + /** Returns the builder for the settings used for calls to runPipeline. */ + public OperationCallSettings.Builder + runPipelineOperationSettings() { + return getStubSettingsBuilder().runPipelineOperationSettings(); + } + + @Override + public WorkflowsServiceV2BetaSettings build() throws IOException { + return new WorkflowsServiceV2BetaSettings(this); + } + } +} diff --git a/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/gapic_metadata.json b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/gapic_metadata.json new file mode 100644 index 00000000..7d44c4d1 --- /dev/null +++ b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/gapic_metadata.json @@ -0,0 +1,21 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.lifesciences.v2beta", + "libraryPackage": "com.google.cloud.lifesciences.v2beta", + "services": { + "WorkflowsServiceV2Beta": { + "clients": { + "grpc": { + "libraryClient": "WorkflowsServiceV2BetaClient", + "rpcs": { + "RunPipeline": { + "methods": ["runPipelineAsync", "runPipelineOperationCallable", "runPipelineCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/package-info.java b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/package-info.java new file mode 100644 index 00000000..d5b8d353 --- /dev/null +++ b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/package-info.java @@ -0,0 +1,44 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= WorkflowsServiceV2BetaClient ======================= + * + *

Service Description: A service for running workflows, such as pipelines consisting of Docker + * containers. + * + *

Sample for WorkflowsServiceV2BetaClient: + * + *

{@code
+ * try (WorkflowsServiceV2BetaClient workflowsServiceV2BetaClient =
+ *     WorkflowsServiceV2BetaClient.create()) {
+ *   RunPipelineRequest request =
+ *       RunPipelineRequest.newBuilder()
+ *           .setParent("parent-995424086")
+ *           .setPipeline(Pipeline.newBuilder().build())
+ *           .putAllLabels(new HashMap())
+ *           .setPubSubTopic("pubSubTopic320524524")
+ *           .build();
+ *   RunPipelineResponse response = workflowsServiceV2BetaClient.runPipelineAsync(request).get();
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.lifesciences.v2beta; + +import javax.annotation.Generated; diff --git a/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaCallableFactory.java b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaCallableFactory.java new file mode 100644 index 00000000..cc7ba293 --- /dev/null +++ b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.lifesciences.v2beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the WorkflowsServiceV2Beta service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcWorkflowsServiceV2BetaCallableFactory 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-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaStub.java b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaStub.java new file mode 100644 index 00000000..61dad2df --- /dev/null +++ b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/GrpcWorkflowsServiceV2BetaStub.java @@ -0,0 +1,178 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.lifesciences.v2beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.lifesciences.v2beta.Metadata; +import com.google.cloud.lifesciences.v2beta.RunPipelineRequest; +import com.google.cloud.lifesciences.v2beta.RunPipelineResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the WorkflowsServiceV2Beta service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcWorkflowsServiceV2BetaStub extends WorkflowsServiceV2BetaStub { + private static final MethodDescriptor runPipelineMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.lifesciences.v2beta.WorkflowsServiceV2Beta/RunPipeline") + .setRequestMarshaller(ProtoUtils.marshaller(RunPipelineRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable runPipelineCallable; + private final OperationCallable + runPipelineOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcWorkflowsServiceV2BetaStub create( + WorkflowsServiceV2BetaStubSettings settings) throws IOException { + return new GrpcWorkflowsServiceV2BetaStub(settings, ClientContext.create(settings)); + } + + public static final GrpcWorkflowsServiceV2BetaStub create(ClientContext clientContext) + throws IOException { + return new GrpcWorkflowsServiceV2BetaStub( + WorkflowsServiceV2BetaStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcWorkflowsServiceV2BetaStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcWorkflowsServiceV2BetaStub( + WorkflowsServiceV2BetaStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcWorkflowsServiceV2BetaStub, 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 GrpcWorkflowsServiceV2BetaStub( + WorkflowsServiceV2BetaStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcWorkflowsServiceV2BetaCallableFactory()); + } + + /** + * Constructs an instance of GrpcWorkflowsServiceV2BetaStub, 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 GrpcWorkflowsServiceV2BetaStub( + WorkflowsServiceV2BetaStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings runPipelineTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(runPipelineMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RunPipelineRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.runPipelineCallable = + callableFactory.createUnaryCallable( + runPipelineTransportSettings, settings.runPipelineSettings(), clientContext); + this.runPipelineOperationCallable = + callableFactory.createOperationCallable( + runPipelineTransportSettings, + settings.runPipelineOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable runPipelineCallable() { + return runPipelineCallable; + } + + @Override + public OperationCallable + runPipelineOperationCallable() { + return runPipelineOperationCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStub.java b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStub.java new file mode 100644 index 00000000..d5aee417 --- /dev/null +++ b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStub.java @@ -0,0 +1,55 @@ +/* + * 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.lifesciences.v2beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.lifesciences.v2beta.Metadata; +import com.google.cloud.lifesciences.v2beta.RunPipelineRequest; +import com.google.cloud.lifesciences.v2beta.RunPipelineResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the WorkflowsServiceV2Beta service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class WorkflowsServiceV2BetaStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable + runPipelineOperationCallable() { + throw new UnsupportedOperationException("Not implemented: runPipelineOperationCallable()"); + } + + public UnaryCallable runPipelineCallable() { + throw new UnsupportedOperationException("Not implemented: runPipelineCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStubSettings.java b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStubSettings.java new file mode 100644 index 00000000..de719254 --- /dev/null +++ b/google-cloud-life-sciences/src/main/java/com/google/cloud/lifesciences/v2beta/stub/WorkflowsServiceV2BetaStubSettings.java @@ -0,0 +1,316 @@ +/* + * 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.lifesciences.v2beta.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.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.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.lifesciences.v2beta.Metadata; +import com.google.cloud.lifesciences.v2beta.RunPipelineRequest; +import com.google.cloud.lifesciences.v2beta.RunPipelineResponse; +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 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 WorkflowsServiceV2BetaStub}. + * + *

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

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

{@code
+ * WorkflowsServiceV2BetaStubSettings.Builder workflowsServiceV2BetaSettingsBuilder =
+ *     WorkflowsServiceV2BetaStubSettings.newBuilder();
+ * workflowsServiceV2BetaSettingsBuilder
+ *     .runPipelineSettings()
+ *     .setRetrySettings(
+ *         workflowsServiceV2BetaSettingsBuilder
+ *             .runPipelineSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * WorkflowsServiceV2BetaStubSettings workflowsServiceV2BetaSettings =
+ *     workflowsServiceV2BetaSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class WorkflowsServiceV2BetaStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings runPipelineSettings; + private final OperationCallSettings + runPipelineOperationSettings; + + /** Returns the object with the settings used for calls to runPipeline. */ + public UnaryCallSettings runPipelineSettings() { + return runPipelineSettings; + } + + /** Returns the object with the settings used for calls to runPipeline. */ + public OperationCallSettings + runPipelineOperationSettings() { + return runPipelineOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public WorkflowsServiceV2BetaStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcWorkflowsServiceV2BetaStub.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 "lifesciences.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(WorkflowsServiceV2BetaStubSettings.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 WorkflowsServiceV2BetaStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + runPipelineSettings = settingsBuilder.runPipelineSettings().build(); + runPipelineOperationSettings = settingsBuilder.runPipelineOperationSettings().build(); + } + + /** Builder for WorkflowsServiceV2BetaStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder runPipelineSettings; + private final OperationCallSettings.Builder + runPipelineOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_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() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + runPipelineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + runPipelineOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(runPipelineSettings); + initDefaults(this); + } + + protected Builder(WorkflowsServiceV2BetaStubSettings settings) { + super(settings); + + runPipelineSettings = settings.runPipelineSettings.toBuilder(); + runPipelineOperationSettings = settings.runPipelineOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(runPipelineSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .runPipelineSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .runPipelineOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(RunPipelineResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(Metadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to runPipeline. */ + public UnaryCallSettings.Builder runPipelineSettings() { + return runPipelineSettings; + } + + /** Returns the builder for the settings used for calls to runPipeline. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + runPipelineOperationSettings() { + return runPipelineOperationSettings; + } + + @Override + public WorkflowsServiceV2BetaStubSettings build() throws IOException { + return new WorkflowsServiceV2BetaStubSettings(this); + } + } +} diff --git a/google-cloud-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/MockWorkflowsServiceV2Beta.java b/google-cloud-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/MockWorkflowsServiceV2Beta.java new file mode 100644 index 00000000..45039141 --- /dev/null +++ b/google-cloud-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/MockWorkflowsServiceV2Beta.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.lifesciences.v2beta; + +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 MockWorkflowsServiceV2Beta implements MockGrpcService { + private final MockWorkflowsServiceV2BetaImpl serviceImpl; + + public MockWorkflowsServiceV2Beta() { + serviceImpl = new MockWorkflowsServiceV2BetaImpl(); + } + + @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-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/MockWorkflowsServiceV2BetaImpl.java b/google-cloud-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/MockWorkflowsServiceV2BetaImpl.java new file mode 100644 index 00000000..1322c4ec --- /dev/null +++ b/google-cloud-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/MockWorkflowsServiceV2BetaImpl.java @@ -0,0 +1,81 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.lifesciences.v2beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.lifesciences.v2beta.WorkflowsServiceV2BetaGrpc.WorkflowsServiceV2BetaImplBase; +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 MockWorkflowsServiceV2BetaImpl extends WorkflowsServiceV2BetaImplBase { + private List requests; + private Queue responses; + + public MockWorkflowsServiceV2BetaImpl() { + 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 runPipeline(RunPipelineRequest 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 RunPipeline, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaClientTest.java b/google-cloud-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaClientTest.java new file mode 100644 index 00000000..7a2569f6 --- /dev/null +++ b/google-cloud-life-sciences/src/test/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaClientTest.java @@ -0,0 +1,141 @@ +/* + * 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.lifesciences.v2beta; + +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.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +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 WorkflowsServiceV2BetaClientTest { + private static MockWorkflowsServiceV2Beta mockWorkflowsServiceV2Beta; + private static MockServiceHelper mockServiceHelper; + private WorkflowsServiceV2BetaClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockWorkflowsServiceV2Beta = new MockWorkflowsServiceV2Beta(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockWorkflowsServiceV2Beta)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + WorkflowsServiceV2BetaSettings settings = + WorkflowsServiceV2BetaSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = WorkflowsServiceV2BetaClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void runPipelineTest() throws Exception { + RunPipelineResponse expectedResponse = RunPipelineResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("runPipelineTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWorkflowsServiceV2Beta.addResponse(resultOperation); + + RunPipelineRequest request = + RunPipelineRequest.newBuilder() + .setParent("parent-995424086") + .setPipeline(Pipeline.newBuilder().build()) + .putAllLabels(new HashMap()) + .setPubSubTopic("pubSubTopic320524524") + .build(); + + RunPipelineResponse actualResponse = client.runPipelineAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWorkflowsServiceV2Beta.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RunPipelineRequest actualRequest = ((RunPipelineRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPipeline(), actualRequest.getPipeline()); + Assert.assertEquals(request.getLabelsMap(), actualRequest.getLabelsMap()); + Assert.assertEquals(request.getPubSubTopic(), actualRequest.getPubSubTopic()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void runPipelineExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWorkflowsServiceV2Beta.addException(exception); + + try { + RunPipelineRequest request = + RunPipelineRequest.newBuilder() + .setParent("parent-995424086") + .setPipeline(Pipeline.newBuilder().build()) + .putAllLabels(new HashMap()) + .setPubSubTopic("pubSubTopic320524524") + .build(); + client.runPipelineAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/grpc-google-cloud-life-sciences-v2beta/pom.xml b/grpc-google-cloud-life-sciences-v2beta/pom.xml new file mode 100644 index 00000000..a6d49b88 --- /dev/null +++ b/grpc-google-cloud-life-sciences-v2beta/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-life-sciences-v2beta + 0.0.1-SNAPSHOT + grpc-google-cloud-life-sciences-v2beta + GRPC library for google-cloud-life-sciences + + com.google.cloud + google-cloud-life-sciences-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-life-sciences-v2beta + + + 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-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaGrpc.java b/grpc-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaGrpc.java new file mode 100644 index 00000000..55bf35c8 --- /dev/null +++ b/grpc-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsServiceV2BetaGrpc.java @@ -0,0 +1,419 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS 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.lifesciences.v2beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * A service for running workflows, such as pipelines consisting of Docker
+ * containers.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/lifesciences/v2beta/workflows.proto") +public final class WorkflowsServiceV2BetaGrpc { + + private WorkflowsServiceV2BetaGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.lifesciences.v2beta.WorkflowsServiceV2Beta"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.lifesciences.v2beta.RunPipelineRequest, com.google.longrunning.Operation> + getRunPipelineMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RunPipeline", + requestType = com.google.cloud.lifesciences.v2beta.RunPipelineRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.lifesciences.v2beta.RunPipelineRequest, com.google.longrunning.Operation> + getRunPipelineMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.lifesciences.v2beta.RunPipelineRequest, + com.google.longrunning.Operation> + getRunPipelineMethod; + if ((getRunPipelineMethod = WorkflowsServiceV2BetaGrpc.getRunPipelineMethod) == null) { + synchronized (WorkflowsServiceV2BetaGrpc.class) { + if ((getRunPipelineMethod = WorkflowsServiceV2BetaGrpc.getRunPipelineMethod) == null) { + WorkflowsServiceV2BetaGrpc.getRunPipelineMethod = + getRunPipelineMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunPipeline")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.lifesciences.v2beta.RunPipelineRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new WorkflowsServiceV2BetaMethodDescriptorSupplier("RunPipeline")) + .build(); + } + } + } + return getRunPipelineMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static WorkflowsServiceV2BetaStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WorkflowsServiceV2BetaStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WorkflowsServiceV2BetaStub(channel, callOptions); + } + }; + return WorkflowsServiceV2BetaStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static WorkflowsServiceV2BetaBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WorkflowsServiceV2BetaBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WorkflowsServiceV2BetaBlockingStub(channel, callOptions); + } + }; + return WorkflowsServiceV2BetaBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static WorkflowsServiceV2BetaFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WorkflowsServiceV2BetaFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WorkflowsServiceV2BetaFutureStub(channel, callOptions); + } + }; + return WorkflowsServiceV2BetaFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for running workflows, such as pipelines consisting of Docker
+   * containers.
+   * 
+ */ + public abstract static class WorkflowsServiceV2BetaImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Runs a pipeline.  The returned Operation's [metadata]
+     * [google.longrunning.Operation.metadata] field will contain a
+     * [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] object describing the status
+     * of the pipeline execution. The
+     * [response][google.longrunning.Operation.response] field will contain a
+     * [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] object if the
+     * pipeline completes successfully.
+     * **Note:** Before you can use this method, the *Life Sciences Service Agent*
+     * must have access to your project. This is done automatically when the
+     * Cloud Life Sciences API is first enabled, but if you delete this permission
+     * you must disable and re-enable the API to grant the Life Sciences
+     * Service Agent the required permissions.
+     * Authorization requires the following [Google
+     * IAM](https://cloud.google.com/iam/) permission:
+     * * `lifesciences.workflows.run`
+     * 
+ */ + public void runPipeline( + com.google.cloud.lifesciences.v2beta.RunPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRunPipelineMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getRunPipelineMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.lifesciences.v2beta.RunPipelineRequest, + com.google.longrunning.Operation>(this, METHODID_RUN_PIPELINE))) + .build(); + } + } + + /** + * + * + *
+   * A service for running workflows, such as pipelines consisting of Docker
+   * containers.
+   * 
+ */ + public static final class WorkflowsServiceV2BetaStub + extends io.grpc.stub.AbstractAsyncStub { + private WorkflowsServiceV2BetaStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WorkflowsServiceV2BetaStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WorkflowsServiceV2BetaStub(channel, callOptions); + } + + /** + * + * + *
+     * Runs a pipeline.  The returned Operation's [metadata]
+     * [google.longrunning.Operation.metadata] field will contain a
+     * [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] object describing the status
+     * of the pipeline execution. The
+     * [response][google.longrunning.Operation.response] field will contain a
+     * [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] object if the
+     * pipeline completes successfully.
+     * **Note:** Before you can use this method, the *Life Sciences Service Agent*
+     * must have access to your project. This is done automatically when the
+     * Cloud Life Sciences API is first enabled, but if you delete this permission
+     * you must disable and re-enable the API to grant the Life Sciences
+     * Service Agent the required permissions.
+     * Authorization requires the following [Google
+     * IAM](https://cloud.google.com/iam/) permission:
+     * * `lifesciences.workflows.run`
+     * 
+ */ + public void runPipeline( + com.google.cloud.lifesciences.v2beta.RunPipelineRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRunPipelineMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * A service for running workflows, such as pipelines consisting of Docker
+   * containers.
+   * 
+ */ + public static final class WorkflowsServiceV2BetaBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private WorkflowsServiceV2BetaBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WorkflowsServiceV2BetaBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WorkflowsServiceV2BetaBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Runs a pipeline.  The returned Operation's [metadata]
+     * [google.longrunning.Operation.metadata] field will contain a
+     * [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] object describing the status
+     * of the pipeline execution. The
+     * [response][google.longrunning.Operation.response] field will contain a
+     * [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] object if the
+     * pipeline completes successfully.
+     * **Note:** Before you can use this method, the *Life Sciences Service Agent*
+     * must have access to your project. This is done automatically when the
+     * Cloud Life Sciences API is first enabled, but if you delete this permission
+     * you must disable and re-enable the API to grant the Life Sciences
+     * Service Agent the required permissions.
+     * Authorization requires the following [Google
+     * IAM](https://cloud.google.com/iam/) permission:
+     * * `lifesciences.workflows.run`
+     * 
+ */ + public com.google.longrunning.Operation runPipeline( + com.google.cloud.lifesciences.v2beta.RunPipelineRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRunPipelineMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service for running workflows, such as pipelines consisting of Docker
+   * containers.
+   * 
+ */ + public static final class WorkflowsServiceV2BetaFutureStub + extends io.grpc.stub.AbstractFutureStub { + private WorkflowsServiceV2BetaFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WorkflowsServiceV2BetaFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WorkflowsServiceV2BetaFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Runs a pipeline.  The returned Operation's [metadata]
+     * [google.longrunning.Operation.metadata] field will contain a
+     * [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] object describing the status
+     * of the pipeline execution. The
+     * [response][google.longrunning.Operation.response] field will contain a
+     * [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] object if the
+     * pipeline completes successfully.
+     * **Note:** Before you can use this method, the *Life Sciences Service Agent*
+     * must have access to your project. This is done automatically when the
+     * Cloud Life Sciences API is first enabled, but if you delete this permission
+     * you must disable and re-enable the API to grant the Life Sciences
+     * Service Agent the required permissions.
+     * Authorization requires the following [Google
+     * IAM](https://cloud.google.com/iam/) permission:
+     * * `lifesciences.workflows.run`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + runPipeline(com.google.cloud.lifesciences.v2beta.RunPipelineRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRunPipelineMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_RUN_PIPELINE = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final WorkflowsServiceV2BetaImplBase serviceImpl; + private final int methodId; + + MethodHandlers(WorkflowsServiceV2BetaImplBase 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_RUN_PIPELINE: + serviceImpl.runPipeline( + (com.google.cloud.lifesciences.v2beta.RunPipelineRequest) 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 WorkflowsServiceV2BetaBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + WorkflowsServiceV2BetaBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("WorkflowsServiceV2Beta"); + } + } + + private static final class WorkflowsServiceV2BetaFileDescriptorSupplier + extends WorkflowsServiceV2BetaBaseDescriptorSupplier { + WorkflowsServiceV2BetaFileDescriptorSupplier() {} + } + + private static final class WorkflowsServiceV2BetaMethodDescriptorSupplier + extends WorkflowsServiceV2BetaBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + WorkflowsServiceV2BetaMethodDescriptorSupplier(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 (WorkflowsServiceV2BetaGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new WorkflowsServiceV2BetaFileDescriptorSupplier()) + .addMethod(getRunPipelineMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java.header b/java.header new file mode 100644 index 00000000..3a9b503a --- /dev/null +++ b/java.header @@ -0,0 +1,15 @@ +^/\*$ +^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)( All [rR]ights [rR]eserved\.)?$ +^ \*$ +^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ +^ \* you may not use this file except in compliance with the License\.$ +^ \* You may obtain a copy of the License at$ +^ \*$ +^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ +^ \*$ +^ \* Unless required by applicable law or agreed to in writing, software$ +^ \* distributed under the License is distributed on an "AS IS" BASIS,$ +^ \* WITHOUT 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 00000000..6597fced --- /dev/null +++ b/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 00000000..77243461 --- /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 00000000..b43b441f --- /dev/null +++ b/pom.xml @@ -0,0 +1,179 @@ + + + 4.0.0 + com.google.cloud + google-cloud-life-sciences-parent + pom + 0.0.1-SNAPSHOT + Google Cloud Life Sciences Parent + https://github.com/googleapis/java-life-sciences + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 0.11.0 + + + + + chingor + Jeff Ching + chingor@google.com + Google + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-life-sciences.git + scm:git:git@github.com:googleapis/java-life-sciences.git + https://github.com/googleapis/java-life-sciences + HEAD + + + https://github.com/googleapis/java-life-sciences/issues + GitHub Issues + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-life-sciences-parent + + + + + + com.google.cloud + google-cloud-life-sciences + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-life-sciences-v2beta + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-life-sciences-v2beta + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 0.20.1 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-life-sciences + grpc-google-cloud-life-sciences-v2beta + proto-google-cloud-life-sciences-v2beta + google-cloud-life-sciences-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/ + + + + + + \ No newline at end of file diff --git a/proto-google-cloud-life-sciences-v2beta/clirr-ignored-differences.xml b/proto-google-cloud-life-sciences-v2beta/clirr-ignored-differences.xml new file mode 100644 index 00000000..18bb82ca --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/lifesciences/v2beta/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/lifesciences/v2beta/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/lifesciences/v2beta/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-life-sciences-v2beta/pom.xml b/proto-google-cloud-life-sciences-v2beta/pom.xml new file mode 100644 index 00000000..80cf9985 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-life-sciences-v2beta + 0.0.1-SNAPSHOT + proto-google-cloud-life-sciences-v2beta + Proto library for google-cloud-life-sciences + + com.google.cloud + google-cloud-life-sciences-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-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Accelerator.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Accelerator.java new file mode 100644 index 00000000..35c6985c --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Accelerator.java @@ -0,0 +1,767 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Carries information about an accelerator that can be attached to a VM.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Accelerator} + */ +public final class Accelerator extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.Accelerator) + AcceleratorOrBuilder { + private static final long serialVersionUID = 0L; + // Use Accelerator.newBuilder() to construct. + private Accelerator(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Accelerator() { + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Accelerator(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Accelerator( + 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(); + + type_ = s; + break; + } + case 16: + { + count_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Accelerator_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Accelerator_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Accelerator.class, + com.google.cloud.lifesciences.v2beta.Accelerator.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object type_; + /** + * + * + *
+   * The accelerator type string (for example, "nvidia-tesla-k80").
+   * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is
+   * attached, the required runtime libraries will be made available to all
+   * containers under `/usr/local/nvidia`. The driver version to install must
+   * be specified using the NVIDIA driver version parameter on the virtual
+   * machine specification. Note that attaching a GPU increases the worker VM
+   * startup time by a few minutes.
+   * 
+ * + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * The accelerator type string (for example, "nvidia-tesla-k80").
+   * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is
+   * attached, the required runtime libraries will be made available to all
+   * containers under `/usr/local/nvidia`. The driver version to install must
+   * be specified using the NVIDIA driver version parameter on the virtual
+   * machine specification. Note that attaching a GPU increases the worker VM
+   * startup time by a few minutes.
+   * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_; + /** + * + * + *
+   * How many accelerators of this type to attach.
+   * 
+ * + * int64 count = 2; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (count_ != 0L) { + output.writeInt64(2, count_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_); + } + 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.lifesciences.v2beta.Accelerator)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.Accelerator other = + (com.google.cloud.lifesciences.v2beta.Accelerator) obj; + + if (!getType().equals(other.getType())) return false; + if (getCount() != other.getCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.Accelerator parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Accelerator 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.lifesciences.v2beta.Accelerator parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Accelerator parseFrom( + 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.lifesciences.v2beta.Accelerator parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Accelerator parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.Accelerator parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Accelerator parseFrom( + java.io.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.lifesciences.v2beta.Accelerator parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Accelerator parseDelimitedFrom( + java.io.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.lifesciences.v2beta.Accelerator parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Accelerator parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.Accelerator prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Carries information about an accelerator that can be attached to a VM.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Accelerator} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.Accelerator) + com.google.cloud.lifesciences.v2beta.AcceleratorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Accelerator_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Accelerator_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Accelerator.class, + com.google.cloud.lifesciences.v2beta.Accelerator.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.Accelerator.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = ""; + + count_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Accelerator_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Accelerator getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.Accelerator.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Accelerator build() { + com.google.cloud.lifesciences.v2beta.Accelerator result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Accelerator buildPartial() { + com.google.cloud.lifesciences.v2beta.Accelerator result = + new com.google.cloud.lifesciences.v2beta.Accelerator(this); + result.type_ = type_; + result.count_ = count_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.Accelerator) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.Accelerator) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.Accelerator other) { + if (other == com.google.cloud.lifesciences.v2beta.Accelerator.getDefaultInstance()) + return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + 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.lifesciences.v2beta.Accelerator parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.Accelerator) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * The accelerator type string (for example, "nvidia-tesla-k80").
+     * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is
+     * attached, the required runtime libraries will be made available to all
+     * containers under `/usr/local/nvidia`. The driver version to install must
+     * be specified using the NVIDIA driver version parameter on the virtual
+     * machine specification. Note that attaching a GPU increases the worker VM
+     * startup time by a few minutes.
+     * 
+ * + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The accelerator type string (for example, "nvidia-tesla-k80").
+     * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is
+     * attached, the required runtime libraries will be made available to all
+     * containers under `/usr/local/nvidia`. The driver version to install must
+     * be specified using the NVIDIA driver version parameter on the virtual
+     * machine specification. Note that attaching a GPU increases the worker VM
+     * startup time by a few minutes.
+     * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The accelerator type string (for example, "nvidia-tesla-k80").
+     * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is
+     * attached, the required runtime libraries will be made available to all
+     * containers under `/usr/local/nvidia`. The driver version to install must
+     * be specified using the NVIDIA driver version parameter on the virtual
+     * machine specification. Note that attaching a GPU increases the worker VM
+     * startup time by a few minutes.
+     * 
+ * + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The accelerator type string (for example, "nvidia-tesla-k80").
+     * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is
+     * attached, the required runtime libraries will be made available to all
+     * containers under `/usr/local/nvidia`. The driver version to install must
+     * be specified using the NVIDIA driver version parameter on the virtual
+     * machine specification. Note that attaching a GPU increases the worker VM
+     * startup time by a few minutes.
+     * 
+ * + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The accelerator type string (for example, "nvidia-tesla-k80").
+     * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is
+     * attached, the required runtime libraries will be made available to all
+     * containers under `/usr/local/nvidia`. The driver version to install must
+     * be specified using the NVIDIA driver version parameter on the virtual
+     * machine specification. Note that attaching a GPU increases the worker VM
+     * startup time by a few minutes.
+     * 
+ * + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private long count_; + /** + * + * + *
+     * How many accelerators of this type to attach.
+     * 
+ * + * int64 count = 2; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * + * + *
+     * How many accelerators of this type to attach.
+     * 
+ * + * int64 count = 2; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * How many accelerators of this type to attach.
+     * 
+ * + * int64 count = 2; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + + count_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.lifesciences.v2beta.Accelerator) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.Accelerator) + private static final com.google.cloud.lifesciences.v2beta.Accelerator DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.Accelerator(); + } + + public static com.google.cloud.lifesciences.v2beta.Accelerator getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Accelerator parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Accelerator(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.lifesciences.v2beta.Accelerator getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/AcceleratorOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/AcceleratorOrBuilder.java new file mode 100644 index 00000000..915af6ca --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/AcceleratorOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface AcceleratorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.Accelerator) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The accelerator type string (for example, "nvidia-tesla-k80").
+   * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is
+   * attached, the required runtime libraries will be made available to all
+   * containers under `/usr/local/nvidia`. The driver version to install must
+   * be specified using the NVIDIA driver version parameter on the virtual
+   * machine specification. Note that attaching a GPU increases the worker VM
+   * startup time by a few minutes.
+   * 
+ * + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * The accelerator type string (for example, "nvidia-tesla-k80").
+   * Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is
+   * attached, the required runtime libraries will be made available to all
+   * containers under `/usr/local/nvidia`. The driver version to install must
+   * be specified using the NVIDIA driver version parameter on the virtual
+   * machine specification. Note that attaching a GPU increases the worker VM
+   * startup time by a few minutes.
+   * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * How many accelerators of this type to attach.
+   * 
+ * + * int64 count = 2; + * + * @return The count. + */ + long getCount(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Action.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Action.java new file mode 100644 index 00000000..6f7cf872 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Action.java @@ -0,0 +1,4967 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Specifies a single action that runs a Docker container.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Action} + */ +public final class Action extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.Action) + ActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Action.newBuilder() to construct. + private Action(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Action() { + containerName_ = ""; + imageUri_ = ""; + commands_ = com.google.protobuf.LazyStringArrayList.EMPTY; + entrypoint_ = ""; + pidNamespace_ = ""; + mounts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Action(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Action( + 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(); + + containerName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + imageUri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + commands_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + commands_.add(s); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + entrypoint_ = s; + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + environment_ = + com.google.protobuf.MapField.newMapField( + EnvironmentDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry environment__ = + input.readMessage( + EnvironmentDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + environment_.getMutableMap().put(environment__.getKey(), environment__.getValue()); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + pidNamespace_ = s; + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + portMappings_ = + com.google.protobuf.MapField.newMapField( + PortMappingsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry portMappings__ = + input.readMessage( + PortMappingsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + portMappings_.getMutableMap().put(portMappings__.getKey(), portMappings__.getValue()); + break; + } + case 74: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + mounts_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + mounts_.add( + input.readMessage( + com.google.cloud.lifesciences.v2beta.Mount.parser(), extensionRegistry)); + break; + } + case 82: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000010; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 90: + { + com.google.cloud.lifesciences.v2beta.Secret.Builder subBuilder = null; + if (credentials_ != null) { + subBuilder = credentials_.toBuilder(); + } + credentials_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.Secret.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(credentials_); + credentials_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeout_ != null) { + subBuilder = timeout_.toBuilder(); + } + timeout_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeout_); + timeout_ = subBuilder.buildPartial(); + } + + break; + } + case 104: + { + ignoreExitStatus_ = input.readBool(); + break; + } + case 112: + { + runInBackground_ = input.readBool(); + break; + } + case 120: + { + alwaysRun_ = input.readBool(); + break; + } + case 128: + { + enableFuse_ = input.readBool(); + break; + } + case 136: + { + publishExposedPorts_ = input.readBool(); + break; + } + case 144: + { + disableImagePrefetch_ = input.readBool(); + break; + } + case 152: + { + disableStandardErrorCapture_ = input.readBool(); + break; + } + case 160: + { + blockExternalNetwork_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + commands_ = commands_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + mounts_ = java.util.Collections.unmodifiableList(mounts_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Action_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetEnvironment(); + case 8: + return internalGetPortMappings(); + case 10: + 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Action.class, + com.google.cloud.lifesciences.v2beta.Action.Builder.class); + } + + public static final int CONTAINER_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object containerName_; + /** + * + * + *
+   * An optional name for the container. The container hostname will be set to
+   * this name, making it useful for inter-container communication. The name
+   * must contain only upper and lowercase alphanumeric characters and hyphens
+   * and cannot start with a hyphen.
+   * 
+ * + * string container_name = 1; + * + * @return The containerName. + */ + @java.lang.Override + public java.lang.String getContainerName() { + java.lang.Object ref = containerName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerName_ = s; + return s; + } + } + /** + * + * + *
+   * An optional name for the container. The container hostname will be set to
+   * this name, making it useful for inter-container communication. The name
+   * must contain only upper and lowercase alphanumeric characters and hyphens
+   * and cannot start with a hyphen.
+   * 
+ * + * string container_name = 1; + * + * @return The bytes for containerName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContainerNameBytes() { + java.lang.Object ref = containerName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + containerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object imageUri_; + /** + * + * + *
+   * Required. The URI to pull the container image from. Note that all images referenced
+   * by actions in the pipeline are pulled before the first action runs. If
+   * multiple actions reference the same image, it is only pulled once,
+   * ensuring that the same image is used for all actions in a single pipeline.
+   * The image URI can be either a complete host and image specification (e.g.,
+   * quay.io/biocontainers/samtools), a library and image name (e.g.,
+   * google/cloud-sdk) or a bare image name ('bash') to pull from the default
+   * library.  No schema is required in any of these cases.
+   * If the specified image is not public, the service account specified for
+   * the Virtual Machine must have access to pull the images from GCR, or
+   * appropriate credentials must be specified in the
+   * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] field.
+   * 
+ * + * string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The URI to pull the container image from. Note that all images referenced
+   * by actions in the pipeline are pulled before the first action runs. If
+   * multiple actions reference the same image, it is only pulled once,
+   * ensuring that the same image is used for all actions in a single pipeline.
+   * The image URI can be either a complete host and image specification (e.g.,
+   * quay.io/biocontainers/samtools), a library and image name (e.g.,
+   * google/cloud-sdk) or a bare image name ('bash') to pull from the default
+   * library.  No schema is required in any of these cases.
+   * If the specified image is not public, the service account specified for
+   * the Virtual Machine must have access to pull the images from GCR, or
+   * appropriate credentials must be specified in the
+   * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] field.
+   * 
+ * + * string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMANDS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList commands_; + /** + * + * + *
+   * If specified, overrides the `CMD` specified in the container. If the
+   * container also has an `ENTRYPOINT` the values are used as entrypoint
+   * arguments. Otherwise, they are used as a command and arguments to run
+   * inside the container.
+   * 
+ * + * repeated string commands = 3; + * + * @return A list containing the commands. + */ + public com.google.protobuf.ProtocolStringList getCommandsList() { + return commands_; + } + /** + * + * + *
+   * If specified, overrides the `CMD` specified in the container. If the
+   * container also has an `ENTRYPOINT` the values are used as entrypoint
+   * arguments. Otherwise, they are used as a command and arguments to run
+   * inside the container.
+   * 
+ * + * repeated string commands = 3; + * + * @return The count of commands. + */ + public int getCommandsCount() { + return commands_.size(); + } + /** + * + * + *
+   * If specified, overrides the `CMD` specified in the container. If the
+   * container also has an `ENTRYPOINT` the values are used as entrypoint
+   * arguments. Otherwise, they are used as a command and arguments to run
+   * inside the container.
+   * 
+ * + * repeated string commands = 3; + * + * @param index The index of the element to return. + * @return The commands at the given index. + */ + public java.lang.String getCommands(int index) { + return commands_.get(index); + } + /** + * + * + *
+   * If specified, overrides the `CMD` specified in the container. If the
+   * container also has an `ENTRYPOINT` the values are used as entrypoint
+   * arguments. Otherwise, they are used as a command and arguments to run
+   * inside the container.
+   * 
+ * + * repeated string commands = 3; + * + * @param index The index of the value to return. + * @return The bytes of the commands at the given index. + */ + public com.google.protobuf.ByteString getCommandsBytes(int index) { + return commands_.getByteString(index); + } + + public static final int ENTRYPOINT_FIELD_NUMBER = 4; + private volatile java.lang.Object entrypoint_; + /** + * + * + *
+   * If specified, overrides the `ENTRYPOINT` specified in the container.
+   * 
+ * + * string entrypoint = 4; + * + * @return The entrypoint. + */ + @java.lang.Override + public java.lang.String getEntrypoint() { + java.lang.Object ref = entrypoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entrypoint_ = s; + return s; + } + } + /** + * + * + *
+   * If specified, overrides the `ENTRYPOINT` specified in the container.
+   * 
+ * + * string entrypoint = 4; + * + * @return The bytes for entrypoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntrypointBytes() { + java.lang.Object ref = entrypoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entrypoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 5; + + private static final class EnvironmentDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Action_EnvironmentEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField environment_; + + private com.google.protobuf.MapField + internalGetEnvironment() { + if (environment_ == null) { + return com.google.protobuf.MapField.emptyMapField(EnvironmentDefaultEntryHolder.defaultEntry); + } + return environment_; + } + + public int getEnvironmentCount() { + return internalGetEnvironment().getMap().size(); + } + /** + * + * + *
+   * The environment to pass into the container. This environment is merged
+   * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+   * message, overwriting any duplicate values.
+   * In addition to the values passed here, a few other values are
+   * automatically injected into the environment. These cannot be hidden or
+   * overwritten.
+   * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+   * because an action has exited with a non-zero status (and did not have the
+   * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+   * debug or logging actions should execute.
+   * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+   * non-background action that executed. This can be used by workflow engine
+   * authors to determine whether an individual action has succeeded or failed.
+   * 
+ * + * map<string, string> environment = 5; + */ + @java.lang.Override + public boolean containsEnvironment(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetEnvironment().getMap().containsKey(key); + } + /** Use {@link #getEnvironmentMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvironment() { + return getEnvironmentMap(); + } + /** + * + * + *
+   * The environment to pass into the container. This environment is merged
+   * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+   * message, overwriting any duplicate values.
+   * In addition to the values passed here, a few other values are
+   * automatically injected into the environment. These cannot be hidden or
+   * overwritten.
+   * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+   * because an action has exited with a non-zero status (and did not have the
+   * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+   * debug or logging actions should execute.
+   * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+   * non-background action that executed. This can be used by workflow engine
+   * authors to determine whether an individual action has succeeded or failed.
+   * 
+ * + * map<string, string> environment = 5; + */ + @java.lang.Override + public java.util.Map getEnvironmentMap() { + return internalGetEnvironment().getMap(); + } + /** + * + * + *
+   * The environment to pass into the container. This environment is merged
+   * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+   * message, overwriting any duplicate values.
+   * In addition to the values passed here, a few other values are
+   * automatically injected into the environment. These cannot be hidden or
+   * overwritten.
+   * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+   * because an action has exited with a non-zero status (and did not have the
+   * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+   * debug or logging actions should execute.
+   * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+   * non-background action that executed. This can be used by workflow engine
+   * authors to determine whether an individual action has succeeded or failed.
+   * 
+ * + * map<string, string> environment = 5; + */ + @java.lang.Override + public java.lang.String getEnvironmentOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvironment().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The environment to pass into the container. This environment is merged
+   * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+   * message, overwriting any duplicate values.
+   * In addition to the values passed here, a few other values are
+   * automatically injected into the environment. These cannot be hidden or
+   * overwritten.
+   * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+   * because an action has exited with a non-zero status (and did not have the
+   * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+   * debug or logging actions should execute.
+   * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+   * non-background action that executed. This can be used by workflow engine
+   * authors to determine whether an individual action has succeeded or failed.
+   * 
+ * + * map<string, string> environment = 5; + */ + @java.lang.Override + public java.lang.String getEnvironmentOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvironment().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PID_NAMESPACE_FIELD_NUMBER = 6; + private volatile java.lang.Object pidNamespace_; + /** + * + * + *
+   * An optional identifier for a PID namespace to run the action inside.
+   * Multiple actions should use the same string to share a namespace.  If
+   * unspecified, a separate isolated namespace is used.
+   * 
+ * + * string pid_namespace = 6; + * + * @return The pidNamespace. + */ + @java.lang.Override + public java.lang.String getPidNamespace() { + java.lang.Object ref = pidNamespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pidNamespace_ = s; + return s; + } + } + /** + * + * + *
+   * An optional identifier for a PID namespace to run the action inside.
+   * Multiple actions should use the same string to share a namespace.  If
+   * unspecified, a separate isolated namespace is used.
+   * 
+ * + * string pid_namespace = 6; + * + * @return The bytes for pidNamespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPidNamespaceBytes() { + java.lang.Object ref = pidNamespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pidNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_MAPPINGS_FIELD_NUMBER = 8; + + private static final class PortMappingsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Action_PortMappingsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.INT32, + 0); + } + + private com.google.protobuf.MapField portMappings_; + + private com.google.protobuf.MapField + internalGetPortMappings() { + if (portMappings_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PortMappingsDefaultEntryHolder.defaultEntry); + } + return portMappings_; + } + + public int getPortMappingsCount() { + return internalGetPortMappings().getMap().size(); + } + /** + * + * + *
+   * A map of containers to host port mappings for this container. If the
+   * container already specifies exposed ports, use the
+   * `PUBLISH_EXPOSED_PORTS` flag instead.
+   * The host port number must be less than 65536. If it is zero, an unused
+   * random port is assigned. To determine the resulting port number, consult
+   * the `ContainerStartedEvent` in the operation metadata.
+   * 
+ * + * map<int32, int32> port_mappings = 8; + */ + @java.lang.Override + public boolean containsPortMappings(int key) { + + return internalGetPortMappings().getMap().containsKey(key); + } + /** Use {@link #getPortMappingsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPortMappings() { + return getPortMappingsMap(); + } + /** + * + * + *
+   * A map of containers to host port mappings for this container. If the
+   * container already specifies exposed ports, use the
+   * `PUBLISH_EXPOSED_PORTS` flag instead.
+   * The host port number must be less than 65536. If it is zero, an unused
+   * random port is assigned. To determine the resulting port number, consult
+   * the `ContainerStartedEvent` in the operation metadata.
+   * 
+ * + * map<int32, int32> port_mappings = 8; + */ + @java.lang.Override + public java.util.Map getPortMappingsMap() { + return internalGetPortMappings().getMap(); + } + /** + * + * + *
+   * A map of containers to host port mappings for this container. If the
+   * container already specifies exposed ports, use the
+   * `PUBLISH_EXPOSED_PORTS` flag instead.
+   * The host port number must be less than 65536. If it is zero, an unused
+   * random port is assigned. To determine the resulting port number, consult
+   * the `ContainerStartedEvent` in the operation metadata.
+   * 
+ * + * map<int32, int32> port_mappings = 8; + */ + @java.lang.Override + public int getPortMappingsOrDefault(int key, int defaultValue) { + + java.util.Map map = internalGetPortMappings().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * A map of containers to host port mappings for this container. If the
+   * container already specifies exposed ports, use the
+   * `PUBLISH_EXPOSED_PORTS` flag instead.
+   * The host port number must be less than 65536. If it is zero, an unused
+   * random port is assigned. To determine the resulting port number, consult
+   * the `ContainerStartedEvent` in the operation metadata.
+   * 
+ * + * map<int32, int32> port_mappings = 8; + */ + @java.lang.Override + public int getPortMappingsOrThrow(int key) { + + java.util.Map map = internalGetPortMappings().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MOUNTS_FIELD_NUMBER = 9; + private java.util.List mounts_; + /** + * + * + *
+   * A list of mounts to make available to the action.
+   * In addition to the values specified here, every action has a special
+   * virtual disk mounted under `/google` that contains log files and other
+   * operational components.
+   * <ul>
+   *   <li><code>/google/logs</code> All logs written during the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/output</code> The combined standard output and
+   *   standard error of all actions run as part of the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+   *   each individual action's standard output.</li>
+   *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+   *   each individual action's standard error output.</li>
+   * </ul>
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + @java.lang.Override + public java.util.List getMountsList() { + return mounts_; + } + /** + * + * + *
+   * A list of mounts to make available to the action.
+   * In addition to the values specified here, every action has a special
+   * virtual disk mounted under `/google` that contains log files and other
+   * operational components.
+   * <ul>
+   *   <li><code>/google/logs</code> All logs written during the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/output</code> The combined standard output and
+   *   standard error of all actions run as part of the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+   *   each individual action's standard output.</li>
+   *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+   *   each individual action's standard error output.</li>
+   * </ul>
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + @java.lang.Override + public java.util.List + getMountsOrBuilderList() { + return mounts_; + } + /** + * + * + *
+   * A list of mounts to make available to the action.
+   * In addition to the values specified here, every action has a special
+   * virtual disk mounted under `/google` that contains log files and other
+   * operational components.
+   * <ul>
+   *   <li><code>/google/logs</code> All logs written during the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/output</code> The combined standard output and
+   *   standard error of all actions run as part of the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+   *   each individual action's standard output.</li>
+   *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+   *   each individual action's standard error output.</li>
+   * </ul>
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + @java.lang.Override + public int getMountsCount() { + return mounts_.size(); + } + /** + * + * + *
+   * A list of mounts to make available to the action.
+   * In addition to the values specified here, every action has a special
+   * virtual disk mounted under `/google` that contains log files and other
+   * operational components.
+   * <ul>
+   *   <li><code>/google/logs</code> All logs written during the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/output</code> The combined standard output and
+   *   standard error of all actions run as part of the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+   *   each individual action's standard output.</li>
+   *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+   *   each individual action's standard error output.</li>
+   * </ul>
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Mount getMounts(int index) { + return mounts_.get(index); + } + /** + * + * + *
+   * A list of mounts to make available to the action.
+   * In addition to the values specified here, every action has a special
+   * virtual disk mounted under `/google` that contains log files and other
+   * operational components.
+   * <ul>
+   *   <li><code>/google/logs</code> All logs written during the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/output</code> The combined standard output and
+   *   standard error of all actions run as part of the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+   *   each individual action's standard output.</li>
+   *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+   *   each individual action's standard error output.</li>
+   * </ul>
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.MountOrBuilder getMountsOrBuilder(int index) { + return mounts_.get(index); + } + + public static final int LABELS_FIELD_NUMBER = 10; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Action_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 to associate with the action. This field is provided to assist
+   * workflow engine authors in identifying actions (for example, to indicate
+   * what sort of action they perform, such as localization or debugging).
+   * They are returned in the operation metadata, but are otherwise ignored.
+   * 
+ * + * map<string, string> labels = 10; + */ + @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 to associate with the action. This field is provided to assist
+   * workflow engine authors in identifying actions (for example, to indicate
+   * what sort of action they perform, such as localization or debugging).
+   * They are returned in the operation metadata, but are otherwise ignored.
+   * 
+ * + * map<string, string> labels = 10; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels to associate with the action. This field is provided to assist
+   * workflow engine authors in identifying actions (for example, to indicate
+   * what sort of action they perform, such as localization or debugging).
+   * They are returned in the operation metadata, but are otherwise ignored.
+   * 
+ * + * map<string, string> labels = 10; + */ + @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 to associate with the action. This field is provided to assist
+   * workflow engine authors in identifying actions (for example, to indicate
+   * what sort of action they perform, such as localization or debugging).
+   * They are returned in the operation metadata, but are otherwise ignored.
+   * 
+ * + * map<string, string> labels = 10; + */ + @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 CREDENTIALS_FIELD_NUMBER = 11; + private com.google.cloud.lifesciences.v2beta.Secret credentials_; + /** + * + * + *
+   * If the specified image is hosted on a private registry other than Google
+   * Container Registry, the credentials required to pull the image must be
+   * specified here as an encrypted secret.
+   * The secret must decrypt to a JSON-encoded dictionary containing both
+   * `username` and `password` keys.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + * + * @return Whether the credentials field is set. + */ + @java.lang.Override + public boolean hasCredentials() { + return credentials_ != null; + } + /** + * + * + *
+   * If the specified image is hosted on a private registry other than Google
+   * Container Registry, the credentials required to pull the image must be
+   * specified here as an encrypted secret.
+   * The secret must decrypt to a JSON-encoded dictionary containing both
+   * `username` and `password` keys.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + * + * @return The credentials. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Secret getCredentials() { + return credentials_ == null + ? com.google.cloud.lifesciences.v2beta.Secret.getDefaultInstance() + : credentials_; + } + /** + * + * + *
+   * If the specified image is hosted on a private registry other than Google
+   * Container Registry, the credentials required to pull the image must be
+   * specified here as an encrypted secret.
+   * The secret must decrypt to a JSON-encoded dictionary containing both
+   * `username` and `password` keys.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.SecretOrBuilder getCredentialsOrBuilder() { + return getCredentials(); + } + + public static final int TIMEOUT_FIELD_NUMBER = 12; + private com.google.protobuf.Duration timeout_; + /** + * + * + *
+   * The maximum amount of time to give the action to complete. If the action
+   * fails to complete before the timeout, it will be terminated and the exit
+   * status will be non-zero. The pipeline will continue or terminate based
+   * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+   * 
+ * + * .google.protobuf.Duration timeout = 12; + * + * @return Whether the timeout field is set. + */ + @java.lang.Override + public boolean hasTimeout() { + return timeout_ != null; + } + /** + * + * + *
+   * The maximum amount of time to give the action to complete. If the action
+   * fails to complete before the timeout, it will be terminated and the exit
+   * status will be non-zero. The pipeline will continue or terminate based
+   * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+   * 
+ * + * .google.protobuf.Duration timeout = 12; + * + * @return The timeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeout() { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + /** + * + * + *
+   * The maximum amount of time to give the action to complete. If the action
+   * fails to complete before the timeout, it will be terminated and the exit
+   * status will be non-zero. The pipeline will continue or terminate based
+   * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+   * 
+ * + * .google.protobuf.Duration timeout = 12; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + return getTimeout(); + } + + public static final int IGNORE_EXIT_STATUS_FIELD_NUMBER = 13; + private boolean ignoreExitStatus_; + /** + * + * + *
+   * Normally, a non-zero exit status causes the pipeline to fail. This flag
+   * allows execution of other actions to continue instead.
+   * 
+ * + * bool ignore_exit_status = 13; + * + * @return The ignoreExitStatus. + */ + @java.lang.Override + public boolean getIgnoreExitStatus() { + return ignoreExitStatus_; + } + + public static final int RUN_IN_BACKGROUND_FIELD_NUMBER = 14; + private boolean runInBackground_; + /** + * + * + *
+   * This flag allows an action to continue running in the background while
+   * executing subsequent actions. This is useful to provide services to
+   * other actions (or to provide debugging support tools like SSH servers).
+   * 
+ * + * bool run_in_background = 14; + * + * @return The runInBackground. + */ + @java.lang.Override + public boolean getRunInBackground() { + return runInBackground_; + } + + public static final int ALWAYS_RUN_FIELD_NUMBER = 15; + private boolean alwaysRun_; + /** + * + * + *
+   * By default, after an action fails, no further actions are run. This flag
+   * indicates that this action must be run even if the pipeline has already
+   * failed. This is useful for actions that copy output files off of the VM
+   * or for debugging. Note that no actions will be run if image prefetching
+   * fails.
+   * 
+ * + * bool always_run = 15; + * + * @return The alwaysRun. + */ + @java.lang.Override + public boolean getAlwaysRun() { + return alwaysRun_; + } + + public static final int ENABLE_FUSE_FIELD_NUMBER = 16; + private boolean enableFuse_; + /** + * + * + *
+   * Enable access to the FUSE device for this action. Filesystems can then
+   * be mounted into disks shared with other actions. The other actions do
+   * not need the `enable_fuse` flag to access the mounted filesystem.
+   * This has the effect of causing the container to be executed with
+   * `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it only
+   * for containers you trust.
+   * 
+ * + * bool enable_fuse = 16; + * + * @return The enableFuse. + */ + @java.lang.Override + public boolean getEnableFuse() { + return enableFuse_; + } + + public static final int PUBLISH_EXPOSED_PORTS_FIELD_NUMBER = 17; + private boolean publishExposedPorts_; + /** + * + * + *
+   * Exposes all ports specified by `EXPOSE` statements in the container. To
+   * discover the host side port numbers, consult the `ACTION_STARTED` event
+   * in the operation metadata.
+   * 
+ * + * bool publish_exposed_ports = 17; + * + * @return The publishExposedPorts. + */ + @java.lang.Override + public boolean getPublishExposedPorts() { + return publishExposedPorts_; + } + + public static final int DISABLE_IMAGE_PREFETCH_FIELD_NUMBER = 18; + private boolean disableImagePrefetch_; + /** + * + * + *
+   * All container images are typically downloaded before any actions are
+   * executed. This helps prevent typos in URIs or issues like lack of disk
+   * space from wasting large amounts of compute resources.
+   * If set, this flag prevents the worker from downloading the image until
+   * just before the action is executed.
+   * 
+ * + * bool disable_image_prefetch = 18; + * + * @return The disableImagePrefetch. + */ + @java.lang.Override + public boolean getDisableImagePrefetch() { + return disableImagePrefetch_; + } + + public static final int DISABLE_STANDARD_ERROR_CAPTURE_FIELD_NUMBER = 19; + private boolean disableStandardErrorCapture_; + /** + * + * + *
+   * A small portion of the container's standard error stream is typically
+   * captured and returned inside the `ContainerStoppedEvent`. Setting this
+   * flag disables this functionality.
+   * 
+ * + * bool disable_standard_error_capture = 19; + * + * @return The disableStandardErrorCapture. + */ + @java.lang.Override + public boolean getDisableStandardErrorCapture() { + return disableStandardErrorCapture_; + } + + public static final int BLOCK_EXTERNAL_NETWORK_FIELD_NUMBER = 20; + private boolean blockExternalNetwork_; + /** + * + * + *
+   * Prevents the container from accessing the external network.
+   * 
+ * + * bool block_external_network = 20; + * + * @return The blockExternalNetwork. + */ + @java.lang.Override + public boolean getBlockExternalNetwork() { + return blockExternalNetwork_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getContainerNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, containerName_); + } + if (!getImageUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageUri_); + } + for (int i = 0; i < commands_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, commands_.getRaw(i)); + } + if (!getEntrypointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, entrypoint_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetEnvironment(), EnvironmentDefaultEntryHolder.defaultEntry, 5); + if (!getPidNamespaceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pidNamespace_); + } + com.google.protobuf.GeneratedMessageV3.serializeIntegerMapTo( + output, internalGetPortMappings(), PortMappingsDefaultEntryHolder.defaultEntry, 8); + for (int i = 0; i < mounts_.size(); i++) { + output.writeMessage(9, mounts_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 10); + if (credentials_ != null) { + output.writeMessage(11, getCredentials()); + } + if (timeout_ != null) { + output.writeMessage(12, getTimeout()); + } + if (ignoreExitStatus_ != false) { + output.writeBool(13, ignoreExitStatus_); + } + if (runInBackground_ != false) { + output.writeBool(14, runInBackground_); + } + if (alwaysRun_ != false) { + output.writeBool(15, alwaysRun_); + } + if (enableFuse_ != false) { + output.writeBool(16, enableFuse_); + } + if (publishExposedPorts_ != false) { + output.writeBool(17, publishExposedPorts_); + } + if (disableImagePrefetch_ != false) { + output.writeBool(18, disableImagePrefetch_); + } + if (disableStandardErrorCapture_ != false) { + output.writeBool(19, disableStandardErrorCapture_); + } + if (blockExternalNetwork_ != false) { + output.writeBool(20, blockExternalNetwork_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getContainerNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, containerName_); + } + if (!getImageUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageUri_); + } + { + int dataSize = 0; + for (int i = 0; i < commands_.size(); i++) { + dataSize += computeStringSizeNoTag(commands_.getRaw(i)); + } + size += dataSize; + size += 1 * getCommandsList().size(); + } + if (!getEntrypointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, entrypoint_); + } + for (java.util.Map.Entry entry : + internalGetEnvironment().getMap().entrySet()) { + com.google.protobuf.MapEntry environment__ = + EnvironmentDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, environment__); + } + if (!getPidNamespaceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pidNamespace_); + } + for (java.util.Map.Entry entry : + internalGetPortMappings().getMap().entrySet()) { + com.google.protobuf.MapEntry portMappings__ = + PortMappingsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, portMappings__); + } + for (int i = 0; i < mounts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, mounts_.get(i)); + } + 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(10, labels__); + } + if (credentials_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCredentials()); + } + if (timeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getTimeout()); + } + if (ignoreExitStatus_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, ignoreExitStatus_); + } + if (runInBackground_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(14, runInBackground_); + } + if (alwaysRun_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, alwaysRun_); + } + if (enableFuse_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, enableFuse_); + } + if (publishExposedPorts_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(17, publishExposedPorts_); + } + if (disableImagePrefetch_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, disableImagePrefetch_); + } + if (disableStandardErrorCapture_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(19, disableStandardErrorCapture_); + } + if (blockExternalNetwork_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(20, blockExternalNetwork_); + } + 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.lifesciences.v2beta.Action)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.Action other = + (com.google.cloud.lifesciences.v2beta.Action) obj; + + if (!getContainerName().equals(other.getContainerName())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!getCommandsList().equals(other.getCommandsList())) return false; + if (!getEntrypoint().equals(other.getEntrypoint())) return false; + if (!internalGetEnvironment().equals(other.internalGetEnvironment())) return false; + if (!getPidNamespace().equals(other.getPidNamespace())) return false; + if (!internalGetPortMappings().equals(other.internalGetPortMappings())) return false; + if (!getMountsList().equals(other.getMountsList())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasCredentials() != other.hasCredentials()) return false; + if (hasCredentials()) { + if (!getCredentials().equals(other.getCredentials())) return false; + } + if (hasTimeout() != other.hasTimeout()) return false; + if (hasTimeout()) { + if (!getTimeout().equals(other.getTimeout())) return false; + } + if (getIgnoreExitStatus() != other.getIgnoreExitStatus()) return false; + if (getRunInBackground() != other.getRunInBackground()) return false; + if (getAlwaysRun() != other.getAlwaysRun()) return false; + if (getEnableFuse() != other.getEnableFuse()) return false; + if (getPublishExposedPorts() != other.getPublishExposedPorts()) return false; + if (getDisableImagePrefetch() != other.getDisableImagePrefetch()) return false; + if (getDisableStandardErrorCapture() != other.getDisableStandardErrorCapture()) return false; + if (getBlockExternalNetwork() != other.getBlockExternalNetwork()) 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) + CONTAINER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getContainerName().hashCode(); + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + if (getCommandsCount() > 0) { + hash = (37 * hash) + COMMANDS_FIELD_NUMBER; + hash = (53 * hash) + getCommandsList().hashCode(); + } + hash = (37 * hash) + ENTRYPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEntrypoint().hashCode(); + if (!internalGetEnvironment().getMap().isEmpty()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + internalGetEnvironment().hashCode(); + } + hash = (37 * hash) + PID_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getPidNamespace().hashCode(); + if (!internalGetPortMappings().getMap().isEmpty()) { + hash = (37 * hash) + PORT_MAPPINGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetPortMappings().hashCode(); + } + if (getMountsCount() > 0) { + hash = (37 * hash) + MOUNTS_FIELD_NUMBER; + hash = (53 * hash) + getMountsList().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasCredentials()) { + hash = (37 * hash) + CREDENTIALS_FIELD_NUMBER; + hash = (53 * hash) + getCredentials().hashCode(); + } + if (hasTimeout()) { + hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getTimeout().hashCode(); + } + hash = (37 * hash) + IGNORE_EXIT_STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreExitStatus()); + hash = (37 * hash) + RUN_IN_BACKGROUND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRunInBackground()); + hash = (37 * hash) + ALWAYS_RUN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAlwaysRun()); + hash = (37 * hash) + ENABLE_FUSE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableFuse()); + hash = (37 * hash) + PUBLISH_EXPOSED_PORTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPublishExposedPorts()); + hash = (37 * hash) + DISABLE_IMAGE_PREFETCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableImagePrefetch()); + hash = (37 * hash) + DISABLE_STANDARD_ERROR_CAPTURE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableStandardErrorCapture()); + hash = (37 * hash) + BLOCK_EXTERNAL_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBlockExternalNetwork()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.Action parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Action 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.lifesciences.v2beta.Action parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Action parseFrom( + 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.lifesciences.v2beta.Action parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Action parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.Action parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Action parseFrom( + java.io.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.lifesciences.v2beta.Action parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Action parseDelimitedFrom( + java.io.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.lifesciences.v2beta.Action parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Action parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.Action prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Specifies a single action that runs a Docker container.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Action} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.Action) + com.google.cloud.lifesciences.v2beta.ActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Action_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetEnvironment(); + case 8: + return internalGetPortMappings(); + case 10: + 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 internalGetMutableEnvironment(); + case 8: + return internalGetMutablePortMappings(); + case 10: + 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Action.class, + com.google.cloud.lifesciences.v2beta.Action.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.Action.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMountsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + containerName_ = ""; + + imageUri_ = ""; + + commands_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + entrypoint_ = ""; + + internalGetMutableEnvironment().clear(); + pidNamespace_ = ""; + + internalGetMutablePortMappings().clear(); + if (mountsBuilder_ == null) { + mounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + mountsBuilder_.clear(); + } + internalGetMutableLabels().clear(); + if (credentialsBuilder_ == null) { + credentials_ = null; + } else { + credentials_ = null; + credentialsBuilder_ = null; + } + if (timeoutBuilder_ == null) { + timeout_ = null; + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + ignoreExitStatus_ = false; + + runInBackground_ = false; + + alwaysRun_ = false; + + enableFuse_ = false; + + publishExposedPorts_ = false; + + disableImagePrefetch_ = false; + + disableStandardErrorCapture_ = false; + + blockExternalNetwork_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Action_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Action getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.Action.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Action build() { + com.google.cloud.lifesciences.v2beta.Action result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Action buildPartial() { + com.google.cloud.lifesciences.v2beta.Action result = + new com.google.cloud.lifesciences.v2beta.Action(this); + int from_bitField0_ = bitField0_; + result.containerName_ = containerName_; + result.imageUri_ = imageUri_; + if (((bitField0_ & 0x00000001) != 0)) { + commands_ = commands_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.commands_ = commands_; + result.entrypoint_ = entrypoint_; + result.environment_ = internalGetEnvironment(); + result.environment_.makeImmutable(); + result.pidNamespace_ = pidNamespace_; + result.portMappings_ = internalGetPortMappings(); + result.portMappings_.makeImmutable(); + if (mountsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + mounts_ = java.util.Collections.unmodifiableList(mounts_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.mounts_ = mounts_; + } else { + result.mounts_ = mountsBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (credentialsBuilder_ == null) { + result.credentials_ = credentials_; + } else { + result.credentials_ = credentialsBuilder_.build(); + } + if (timeoutBuilder_ == null) { + result.timeout_ = timeout_; + } else { + result.timeout_ = timeoutBuilder_.build(); + } + result.ignoreExitStatus_ = ignoreExitStatus_; + result.runInBackground_ = runInBackground_; + result.alwaysRun_ = alwaysRun_; + result.enableFuse_ = enableFuse_; + result.publishExposedPorts_ = publishExposedPorts_; + result.disableImagePrefetch_ = disableImagePrefetch_; + result.disableStandardErrorCapture_ = disableStandardErrorCapture_; + result.blockExternalNetwork_ = blockExternalNetwork_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.Action) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.Action) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.Action other) { + if (other == com.google.cloud.lifesciences.v2beta.Action.getDefaultInstance()) return this; + if (!other.getContainerName().isEmpty()) { + containerName_ = other.containerName_; + onChanged(); + } + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + onChanged(); + } + if (!other.commands_.isEmpty()) { + if (commands_.isEmpty()) { + commands_ = other.commands_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCommandsIsMutable(); + commands_.addAll(other.commands_); + } + onChanged(); + } + if (!other.getEntrypoint().isEmpty()) { + entrypoint_ = other.entrypoint_; + onChanged(); + } + internalGetMutableEnvironment().mergeFrom(other.internalGetEnvironment()); + if (!other.getPidNamespace().isEmpty()) { + pidNamespace_ = other.pidNamespace_; + onChanged(); + } + internalGetMutablePortMappings().mergeFrom(other.internalGetPortMappings()); + if (mountsBuilder_ == null) { + if (!other.mounts_.isEmpty()) { + if (mounts_.isEmpty()) { + mounts_ = other.mounts_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureMountsIsMutable(); + mounts_.addAll(other.mounts_); + } + onChanged(); + } + } else { + if (!other.mounts_.isEmpty()) { + if (mountsBuilder_.isEmpty()) { + mountsBuilder_.dispose(); + mountsBuilder_ = null; + mounts_ = other.mounts_; + bitField0_ = (bitField0_ & ~0x00000008); + mountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMountsFieldBuilder() + : null; + } else { + mountsBuilder_.addAllMessages(other.mounts_); + } + } + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasCredentials()) { + mergeCredentials(other.getCredentials()); + } + if (other.hasTimeout()) { + mergeTimeout(other.getTimeout()); + } + if (other.getIgnoreExitStatus() != false) { + setIgnoreExitStatus(other.getIgnoreExitStatus()); + } + if (other.getRunInBackground() != false) { + setRunInBackground(other.getRunInBackground()); + } + if (other.getAlwaysRun() != false) { + setAlwaysRun(other.getAlwaysRun()); + } + if (other.getEnableFuse() != false) { + setEnableFuse(other.getEnableFuse()); + } + if (other.getPublishExposedPorts() != false) { + setPublishExposedPorts(other.getPublishExposedPorts()); + } + if (other.getDisableImagePrefetch() != false) { + setDisableImagePrefetch(other.getDisableImagePrefetch()); + } + if (other.getDisableStandardErrorCapture() != false) { + setDisableStandardErrorCapture(other.getDisableStandardErrorCapture()); + } + if (other.getBlockExternalNetwork() != false) { + setBlockExternalNetwork(other.getBlockExternalNetwork()); + } + 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.lifesciences.v2beta.Action parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.Action) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object containerName_ = ""; + /** + * + * + *
+     * An optional name for the container. The container hostname will be set to
+     * this name, making it useful for inter-container communication. The name
+     * must contain only upper and lowercase alphanumeric characters and hyphens
+     * and cannot start with a hyphen.
+     * 
+ * + * string container_name = 1; + * + * @return The containerName. + */ + public java.lang.String getContainerName() { + java.lang.Object ref = containerName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An optional name for the container. The container hostname will be set to
+     * this name, making it useful for inter-container communication. The name
+     * must contain only upper and lowercase alphanumeric characters and hyphens
+     * and cannot start with a hyphen.
+     * 
+ * + * string container_name = 1; + * + * @return The bytes for containerName. + */ + public com.google.protobuf.ByteString getContainerNameBytes() { + java.lang.Object ref = containerName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + containerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An optional name for the container. The container hostname will be set to
+     * this name, making it useful for inter-container communication. The name
+     * must contain only upper and lowercase alphanumeric characters and hyphens
+     * and cannot start with a hyphen.
+     * 
+ * + * string container_name = 1; + * + * @param value The containerName to set. + * @return This builder for chaining. + */ + public Builder setContainerName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An optional name for the container. The container hostname will be set to
+     * this name, making it useful for inter-container communication. The name
+     * must contain only upper and lowercase alphanumeric characters and hyphens
+     * and cannot start with a hyphen.
+     * 
+ * + * string container_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearContainerName() { + + containerName_ = getDefaultInstance().getContainerName(); + onChanged(); + return this; + } + /** + * + * + *
+     * An optional name for the container. The container hostname will be set to
+     * this name, making it useful for inter-container communication. The name
+     * must contain only upper and lowercase alphanumeric characters and hyphens
+     * and cannot start with a hyphen.
+     * 
+ * + * string container_name = 1; + * + * @param value The bytes for containerName to set. + * @return This builder for chaining. + */ + public Builder setContainerNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerName_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageUri_ = ""; + /** + * + * + *
+     * Required. The URI to pull the container image from. Note that all images referenced
+     * by actions in the pipeline are pulled before the first action runs. If
+     * multiple actions reference the same image, it is only pulled once,
+     * ensuring that the same image is used for all actions in a single pipeline.
+     * The image URI can be either a complete host and image specification (e.g.,
+     * quay.io/biocontainers/samtools), a library and image name (e.g.,
+     * google/cloud-sdk) or a bare image name ('bash') to pull from the default
+     * library.  No schema is required in any of these cases.
+     * If the specified image is not public, the service account specified for
+     * the Virtual Machine must have access to pull the images from GCR, or
+     * appropriate credentials must be specified in the
+     * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] field.
+     * 
+ * + * string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The URI to pull the container image from. Note that all images referenced
+     * by actions in the pipeline are pulled before the first action runs. If
+     * multiple actions reference the same image, it is only pulled once,
+     * ensuring that the same image is used for all actions in a single pipeline.
+     * The image URI can be either a complete host and image specification (e.g.,
+     * quay.io/biocontainers/samtools), a library and image name (e.g.,
+     * google/cloud-sdk) or a bare image name ('bash') to pull from the default
+     * library.  No schema is required in any of these cases.
+     * If the specified image is not public, the service account specified for
+     * the Virtual Machine must have access to pull the images from GCR, or
+     * appropriate credentials must be specified in the
+     * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] field.
+     * 
+ * + * string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The URI to pull the container image from. Note that all images referenced
+     * by actions in the pipeline are pulled before the first action runs. If
+     * multiple actions reference the same image, it is only pulled once,
+     * ensuring that the same image is used for all actions in a single pipeline.
+     * The image URI can be either a complete host and image specification (e.g.,
+     * quay.io/biocontainers/samtools), a library and image name (e.g.,
+     * google/cloud-sdk) or a bare image name ('bash') to pull from the default
+     * library.  No schema is required in any of these cases.
+     * If the specified image is not public, the service account specified for
+     * the Virtual Machine must have access to pull the images from GCR, or
+     * appropriate credentials must be specified in the
+     * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] field.
+     * 
+ * + * string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI to pull the container image from. Note that all images referenced
+     * by actions in the pipeline are pulled before the first action runs. If
+     * multiple actions reference the same image, it is only pulled once,
+     * ensuring that the same image is used for all actions in a single pipeline.
+     * The image URI can be either a complete host and image specification (e.g.,
+     * quay.io/biocontainers/samtools), a library and image name (e.g.,
+     * google/cloud-sdk) or a bare image name ('bash') to pull from the default
+     * library.  No schema is required in any of these cases.
+     * If the specified image is not public, the service account specified for
+     * the Virtual Machine must have access to pull the images from GCR, or
+     * appropriate credentials must be specified in the
+     * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] field.
+     * 
+ * + * string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI to pull the container image from. Note that all images referenced
+     * by actions in the pipeline are pulled before the first action runs. If
+     * multiple actions reference the same image, it is only pulled once,
+     * ensuring that the same image is used for all actions in a single pipeline.
+     * The image URI can be either a complete host and image specification (e.g.,
+     * quay.io/biocontainers/samtools), a library and image name (e.g.,
+     * google/cloud-sdk) or a bare image name ('bash') to pull from the default
+     * library.  No schema is required in any of these cases.
+     * If the specified image is not public, the service account specified for
+     * the Virtual Machine must have access to pull the images from GCR, or
+     * appropriate credentials must be specified in the
+     * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] field.
+     * 
+ * + * string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList commands_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCommandsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + commands_ = new com.google.protobuf.LazyStringArrayList(commands_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * If specified, overrides the `CMD` specified in the container. If the
+     * container also has an `ENTRYPOINT` the values are used as entrypoint
+     * arguments. Otherwise, they are used as a command and arguments to run
+     * inside the container.
+     * 
+ * + * repeated string commands = 3; + * + * @return A list containing the commands. + */ + public com.google.protobuf.ProtocolStringList getCommandsList() { + return commands_.getUnmodifiableView(); + } + /** + * + * + *
+     * If specified, overrides the `CMD` specified in the container. If the
+     * container also has an `ENTRYPOINT` the values are used as entrypoint
+     * arguments. Otherwise, they are used as a command and arguments to run
+     * inside the container.
+     * 
+ * + * repeated string commands = 3; + * + * @return The count of commands. + */ + public int getCommandsCount() { + return commands_.size(); + } + /** + * + * + *
+     * If specified, overrides the `CMD` specified in the container. If the
+     * container also has an `ENTRYPOINT` the values are used as entrypoint
+     * arguments. Otherwise, they are used as a command and arguments to run
+     * inside the container.
+     * 
+ * + * repeated string commands = 3; + * + * @param index The index of the element to return. + * @return The commands at the given index. + */ + public java.lang.String getCommands(int index) { + return commands_.get(index); + } + /** + * + * + *
+     * If specified, overrides the `CMD` specified in the container. If the
+     * container also has an `ENTRYPOINT` the values are used as entrypoint
+     * arguments. Otherwise, they are used as a command and arguments to run
+     * inside the container.
+     * 
+ * + * repeated string commands = 3; + * + * @param index The index of the value to return. + * @return The bytes of the commands at the given index. + */ + public com.google.protobuf.ByteString getCommandsBytes(int index) { + return commands_.getByteString(index); + } + /** + * + * + *
+     * If specified, overrides the `CMD` specified in the container. If the
+     * container also has an `ENTRYPOINT` the values are used as entrypoint
+     * arguments. Otherwise, they are used as a command and arguments to run
+     * inside the container.
+     * 
+ * + * repeated string commands = 3; + * + * @param index The index to set the value at. + * @param value The commands to set. + * @return This builder for chaining. + */ + public Builder setCommands(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandsIsMutable(); + commands_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, overrides the `CMD` specified in the container. If the
+     * container also has an `ENTRYPOINT` the values are used as entrypoint
+     * arguments. Otherwise, they are used as a command and arguments to run
+     * inside the container.
+     * 
+ * + * repeated string commands = 3; + * + * @param value The commands to add. + * @return This builder for chaining. + */ + public Builder addCommands(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommandsIsMutable(); + commands_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, overrides the `CMD` specified in the container. If the
+     * container also has an `ENTRYPOINT` the values are used as entrypoint
+     * arguments. Otherwise, they are used as a command and arguments to run
+     * inside the container.
+     * 
+ * + * repeated string commands = 3; + * + * @param values The commands to add. + * @return This builder for chaining. + */ + public Builder addAllCommands(java.lang.Iterable values) { + ensureCommandsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, commands_); + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, overrides the `CMD` specified in the container. If the
+     * container also has an `ENTRYPOINT` the values are used as entrypoint
+     * arguments. Otherwise, they are used as a command and arguments to run
+     * inside the container.
+     * 
+ * + * repeated string commands = 3; + * + * @return This builder for chaining. + */ + public Builder clearCommands() { + commands_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, overrides the `CMD` specified in the container. If the
+     * container also has an `ENTRYPOINT` the values are used as entrypoint
+     * arguments. Otherwise, they are used as a command and arguments to run
+     * inside the container.
+     * 
+ * + * repeated string commands = 3; + * + * @param value The bytes of the commands to add. + * @return This builder for chaining. + */ + public Builder addCommandsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCommandsIsMutable(); + commands_.add(value); + onChanged(); + return this; + } + + private java.lang.Object entrypoint_ = ""; + /** + * + * + *
+     * If specified, overrides the `ENTRYPOINT` specified in the container.
+     * 
+ * + * string entrypoint = 4; + * + * @return The entrypoint. + */ + public java.lang.String getEntrypoint() { + java.lang.Object ref = entrypoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entrypoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If specified, overrides the `ENTRYPOINT` specified in the container.
+     * 
+ * + * string entrypoint = 4; + * + * @return The bytes for entrypoint. + */ + public com.google.protobuf.ByteString getEntrypointBytes() { + java.lang.Object ref = entrypoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entrypoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If specified, overrides the `ENTRYPOINT` specified in the container.
+     * 
+ * + * string entrypoint = 4; + * + * @param value The entrypoint to set. + * @return This builder for chaining. + */ + public Builder setEntrypoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + entrypoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, overrides the `ENTRYPOINT` specified in the container.
+     * 
+ * + * string entrypoint = 4; + * + * @return This builder for chaining. + */ + public Builder clearEntrypoint() { + + entrypoint_ = getDefaultInstance().getEntrypoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, overrides the `ENTRYPOINT` specified in the container.
+     * 
+ * + * string entrypoint = 4; + * + * @param value The bytes for entrypoint to set. + * @return This builder for chaining. + */ + public Builder setEntrypointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + entrypoint_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField environment_; + + private com.google.protobuf.MapField + internalGetEnvironment() { + if (environment_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvironmentDefaultEntryHolder.defaultEntry); + } + return environment_; + } + + private com.google.protobuf.MapField + internalGetMutableEnvironment() { + onChanged(); + ; + if (environment_ == null) { + environment_ = + com.google.protobuf.MapField.newMapField(EnvironmentDefaultEntryHolder.defaultEntry); + } + if (!environment_.isMutable()) { + environment_ = environment_.copy(); + } + return environment_; + } + + public int getEnvironmentCount() { + return internalGetEnvironment().getMap().size(); + } + /** + * + * + *
+     * The environment to pass into the container. This environment is merged
+     * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+     * message, overwriting any duplicate values.
+     * In addition to the values passed here, a few other values are
+     * automatically injected into the environment. These cannot be hidden or
+     * overwritten.
+     * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+     * because an action has exited with a non-zero status (and did not have the
+     * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+     * debug or logging actions should execute.
+     * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+     * non-background action that executed. This can be used by workflow engine
+     * authors to determine whether an individual action has succeeded or failed.
+     * 
+ * + * map<string, string> environment = 5; + */ + @java.lang.Override + public boolean containsEnvironment(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetEnvironment().getMap().containsKey(key); + } + /** Use {@link #getEnvironmentMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvironment() { + return getEnvironmentMap(); + } + /** + * + * + *
+     * The environment to pass into the container. This environment is merged
+     * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+     * message, overwriting any duplicate values.
+     * In addition to the values passed here, a few other values are
+     * automatically injected into the environment. These cannot be hidden or
+     * overwritten.
+     * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+     * because an action has exited with a non-zero status (and did not have the
+     * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+     * debug or logging actions should execute.
+     * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+     * non-background action that executed. This can be used by workflow engine
+     * authors to determine whether an individual action has succeeded or failed.
+     * 
+ * + * map<string, string> environment = 5; + */ + @java.lang.Override + public java.util.Map getEnvironmentMap() { + return internalGetEnvironment().getMap(); + } + /** + * + * + *
+     * The environment to pass into the container. This environment is merged
+     * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+     * message, overwriting any duplicate values.
+     * In addition to the values passed here, a few other values are
+     * automatically injected into the environment. These cannot be hidden or
+     * overwritten.
+     * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+     * because an action has exited with a non-zero status (and did not have the
+     * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+     * debug or logging actions should execute.
+     * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+     * non-background action that executed. This can be used by workflow engine
+     * authors to determine whether an individual action has succeeded or failed.
+     * 
+ * + * map<string, string> environment = 5; + */ + @java.lang.Override + public java.lang.String getEnvironmentOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvironment().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The environment to pass into the container. This environment is merged
+     * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+     * message, overwriting any duplicate values.
+     * In addition to the values passed here, a few other values are
+     * automatically injected into the environment. These cannot be hidden or
+     * overwritten.
+     * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+     * because an action has exited with a non-zero status (and did not have the
+     * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+     * debug or logging actions should execute.
+     * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+     * non-background action that executed. This can be used by workflow engine
+     * authors to determine whether an individual action has succeeded or failed.
+     * 
+ * + * map<string, string> environment = 5; + */ + @java.lang.Override + public java.lang.String getEnvironmentOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvironment().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearEnvironment() { + internalGetMutableEnvironment().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The environment to pass into the container. This environment is merged
+     * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+     * message, overwriting any duplicate values.
+     * In addition to the values passed here, a few other values are
+     * automatically injected into the environment. These cannot be hidden or
+     * overwritten.
+     * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+     * because an action has exited with a non-zero status (and did not have the
+     * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+     * debug or logging actions should execute.
+     * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+     * non-background action that executed. This can be used by workflow engine
+     * authors to determine whether an individual action has succeeded or failed.
+     * 
+ * + * map<string, string> environment = 5; + */ + public Builder removeEnvironment(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableEnvironment().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableEnvironment() { + return internalGetMutableEnvironment().getMutableMap(); + } + /** + * + * + *
+     * The environment to pass into the container. This environment is merged
+     * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+     * message, overwriting any duplicate values.
+     * In addition to the values passed here, a few other values are
+     * automatically injected into the environment. These cannot be hidden or
+     * overwritten.
+     * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+     * because an action has exited with a non-zero status (and did not have the
+     * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+     * debug or logging actions should execute.
+     * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+     * non-background action that executed. This can be used by workflow engine
+     * authors to determine whether an individual action has succeeded or failed.
+     * 
+ * + * map<string, string> environment = 5; + */ + public Builder putEnvironment(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableEnvironment().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The environment to pass into the container. This environment is merged
+     * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+     * message, overwriting any duplicate values.
+     * In addition to the values passed here, a few other values are
+     * automatically injected into the environment. These cannot be hidden or
+     * overwritten.
+     * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+     * because an action has exited with a non-zero status (and did not have the
+     * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+     * debug or logging actions should execute.
+     * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+     * non-background action that executed. This can be used by workflow engine
+     * authors to determine whether an individual action has succeeded or failed.
+     * 
+ * + * map<string, string> environment = 5; + */ + public Builder putAllEnvironment(java.util.Map values) { + internalGetMutableEnvironment().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object pidNamespace_ = ""; + /** + * + * + *
+     * An optional identifier for a PID namespace to run the action inside.
+     * Multiple actions should use the same string to share a namespace.  If
+     * unspecified, a separate isolated namespace is used.
+     * 
+ * + * string pid_namespace = 6; + * + * @return The pidNamespace. + */ + public java.lang.String getPidNamespace() { + java.lang.Object ref = pidNamespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pidNamespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An optional identifier for a PID namespace to run the action inside.
+     * Multiple actions should use the same string to share a namespace.  If
+     * unspecified, a separate isolated namespace is used.
+     * 
+ * + * string pid_namespace = 6; + * + * @return The bytes for pidNamespace. + */ + public com.google.protobuf.ByteString getPidNamespaceBytes() { + java.lang.Object ref = pidNamespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pidNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An optional identifier for a PID namespace to run the action inside.
+     * Multiple actions should use the same string to share a namespace.  If
+     * unspecified, a separate isolated namespace is used.
+     * 
+ * + * string pid_namespace = 6; + * + * @param value The pidNamespace to set. + * @return This builder for chaining. + */ + public Builder setPidNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pidNamespace_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An optional identifier for a PID namespace to run the action inside.
+     * Multiple actions should use the same string to share a namespace.  If
+     * unspecified, a separate isolated namespace is used.
+     * 
+ * + * string pid_namespace = 6; + * + * @return This builder for chaining. + */ + public Builder clearPidNamespace() { + + pidNamespace_ = getDefaultInstance().getPidNamespace(); + onChanged(); + return this; + } + /** + * + * + *
+     * An optional identifier for a PID namespace to run the action inside.
+     * Multiple actions should use the same string to share a namespace.  If
+     * unspecified, a separate isolated namespace is used.
+     * 
+ * + * string pid_namespace = 6; + * + * @param value The bytes for pidNamespace to set. + * @return This builder for chaining. + */ + public Builder setPidNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pidNamespace_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField portMappings_; + + private com.google.protobuf.MapField + internalGetPortMappings() { + if (portMappings_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PortMappingsDefaultEntryHolder.defaultEntry); + } + return portMappings_; + } + + private com.google.protobuf.MapField + internalGetMutablePortMappings() { + onChanged(); + ; + if (portMappings_ == null) { + portMappings_ = + com.google.protobuf.MapField.newMapField(PortMappingsDefaultEntryHolder.defaultEntry); + } + if (!portMappings_.isMutable()) { + portMappings_ = portMappings_.copy(); + } + return portMappings_; + } + + public int getPortMappingsCount() { + return internalGetPortMappings().getMap().size(); + } + /** + * + * + *
+     * A map of containers to host port mappings for this container. If the
+     * container already specifies exposed ports, use the
+     * `PUBLISH_EXPOSED_PORTS` flag instead.
+     * The host port number must be less than 65536. If it is zero, an unused
+     * random port is assigned. To determine the resulting port number, consult
+     * the `ContainerStartedEvent` in the operation metadata.
+     * 
+ * + * map<int32, int32> port_mappings = 8; + */ + @java.lang.Override + public boolean containsPortMappings(int key) { + + return internalGetPortMappings().getMap().containsKey(key); + } + /** Use {@link #getPortMappingsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPortMappings() { + return getPortMappingsMap(); + } + /** + * + * + *
+     * A map of containers to host port mappings for this container. If the
+     * container already specifies exposed ports, use the
+     * `PUBLISH_EXPOSED_PORTS` flag instead.
+     * The host port number must be less than 65536. If it is zero, an unused
+     * random port is assigned. To determine the resulting port number, consult
+     * the `ContainerStartedEvent` in the operation metadata.
+     * 
+ * + * map<int32, int32> port_mappings = 8; + */ + @java.lang.Override + public java.util.Map getPortMappingsMap() { + return internalGetPortMappings().getMap(); + } + /** + * + * + *
+     * A map of containers to host port mappings for this container. If the
+     * container already specifies exposed ports, use the
+     * `PUBLISH_EXPOSED_PORTS` flag instead.
+     * The host port number must be less than 65536. If it is zero, an unused
+     * random port is assigned. To determine the resulting port number, consult
+     * the `ContainerStartedEvent` in the operation metadata.
+     * 
+ * + * map<int32, int32> port_mappings = 8; + */ + @java.lang.Override + public int getPortMappingsOrDefault(int key, int defaultValue) { + + java.util.Map map = internalGetPortMappings().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * A map of containers to host port mappings for this container. If the
+     * container already specifies exposed ports, use the
+     * `PUBLISH_EXPOSED_PORTS` flag instead.
+     * The host port number must be less than 65536. If it is zero, an unused
+     * random port is assigned. To determine the resulting port number, consult
+     * the `ContainerStartedEvent` in the operation metadata.
+     * 
+ * + * map<int32, int32> port_mappings = 8; + */ + @java.lang.Override + public int getPortMappingsOrThrow(int key) { + + java.util.Map map = internalGetPortMappings().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearPortMappings() { + internalGetMutablePortMappings().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * A map of containers to host port mappings for this container. If the
+     * container already specifies exposed ports, use the
+     * `PUBLISH_EXPOSED_PORTS` flag instead.
+     * The host port number must be less than 65536. If it is zero, an unused
+     * random port is assigned. To determine the resulting port number, consult
+     * the `ContainerStartedEvent` in the operation metadata.
+     * 
+ * + * map<int32, int32> port_mappings = 8; + */ + public Builder removePortMappings(int key) { + + internalGetMutablePortMappings().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutablePortMappings() { + return internalGetMutablePortMappings().getMutableMap(); + } + /** + * + * + *
+     * A map of containers to host port mappings for this container. If the
+     * container already specifies exposed ports, use the
+     * `PUBLISH_EXPOSED_PORTS` flag instead.
+     * The host port number must be less than 65536. If it is zero, an unused
+     * random port is assigned. To determine the resulting port number, consult
+     * the `ContainerStartedEvent` in the operation metadata.
+     * 
+ * + * map<int32, int32> port_mappings = 8; + */ + public Builder putPortMappings(int key, int value) { + + internalGetMutablePortMappings().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * A map of containers to host port mappings for this container. If the
+     * container already specifies exposed ports, use the
+     * `PUBLISH_EXPOSED_PORTS` flag instead.
+     * The host port number must be less than 65536. If it is zero, an unused
+     * random port is assigned. To determine the resulting port number, consult
+     * the `ContainerStartedEvent` in the operation metadata.
+     * 
+ * + * map<int32, int32> port_mappings = 8; + */ + public Builder putAllPortMappings(java.util.Map values) { + internalGetMutablePortMappings().getMutableMap().putAll(values); + return this; + } + + private java.util.List mounts_ = + java.util.Collections.emptyList(); + + private void ensureMountsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + mounts_ = new java.util.ArrayList(mounts_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Mount, + com.google.cloud.lifesciences.v2beta.Mount.Builder, + com.google.cloud.lifesciences.v2beta.MountOrBuilder> + mountsBuilder_; + + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public java.util.List getMountsList() { + if (mountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(mounts_); + } else { + return mountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public int getMountsCount() { + if (mountsBuilder_ == null) { + return mounts_.size(); + } else { + return mountsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public com.google.cloud.lifesciences.v2beta.Mount getMounts(int index) { + if (mountsBuilder_ == null) { + return mounts_.get(index); + } else { + return mountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public Builder setMounts(int index, com.google.cloud.lifesciences.v2beta.Mount value) { + if (mountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMountsIsMutable(); + mounts_.set(index, value); + onChanged(); + } else { + mountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public Builder setMounts( + int index, com.google.cloud.lifesciences.v2beta.Mount.Builder builderForValue) { + if (mountsBuilder_ == null) { + ensureMountsIsMutable(); + mounts_.set(index, builderForValue.build()); + onChanged(); + } else { + mountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public Builder addMounts(com.google.cloud.lifesciences.v2beta.Mount value) { + if (mountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMountsIsMutable(); + mounts_.add(value); + onChanged(); + } else { + mountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public Builder addMounts(int index, com.google.cloud.lifesciences.v2beta.Mount value) { + if (mountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMountsIsMutable(); + mounts_.add(index, value); + onChanged(); + } else { + mountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public Builder addMounts(com.google.cloud.lifesciences.v2beta.Mount.Builder builderForValue) { + if (mountsBuilder_ == null) { + ensureMountsIsMutable(); + mounts_.add(builderForValue.build()); + onChanged(); + } else { + mountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public Builder addMounts( + int index, com.google.cloud.lifesciences.v2beta.Mount.Builder builderForValue) { + if (mountsBuilder_ == null) { + ensureMountsIsMutable(); + mounts_.add(index, builderForValue.build()); + onChanged(); + } else { + mountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public Builder addAllMounts( + java.lang.Iterable values) { + if (mountsBuilder_ == null) { + ensureMountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mounts_); + onChanged(); + } else { + mountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public Builder clearMounts() { + if (mountsBuilder_ == null) { + mounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + mountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public Builder removeMounts(int index) { + if (mountsBuilder_ == null) { + ensureMountsIsMutable(); + mounts_.remove(index); + onChanged(); + } else { + mountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public com.google.cloud.lifesciences.v2beta.Mount.Builder getMountsBuilder(int index) { + return getMountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public com.google.cloud.lifesciences.v2beta.MountOrBuilder getMountsOrBuilder(int index) { + if (mountsBuilder_ == null) { + return mounts_.get(index); + } else { + return mountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public java.util.List + getMountsOrBuilderList() { + if (mountsBuilder_ != null) { + return mountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mounts_); + } + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public com.google.cloud.lifesciences.v2beta.Mount.Builder addMountsBuilder() { + return getMountsFieldBuilder() + .addBuilder(com.google.cloud.lifesciences.v2beta.Mount.getDefaultInstance()); + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public com.google.cloud.lifesciences.v2beta.Mount.Builder addMountsBuilder(int index) { + return getMountsFieldBuilder() + .addBuilder(index, com.google.cloud.lifesciences.v2beta.Mount.getDefaultInstance()); + } + /** + * + * + *
+     * A list of mounts to make available to the action.
+     * In addition to the values specified here, every action has a special
+     * virtual disk mounted under `/google` that contains log files and other
+     * operational components.
+     * <ul>
+     *   <li><code>/google/logs</code> All logs written during the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/output</code> The combined standard output and
+     *   standard error of all actions run as part of the pipeline
+     *   execution.</li>
+     *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+     *   each individual action's standard output.</li>
+     *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+     *   each individual action's standard error output.</li>
+     * </ul>
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + public java.util.List + getMountsBuilderList() { + return getMountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Mount, + com.google.cloud.lifesciences.v2beta.Mount.Builder, + com.google.cloud.lifesciences.v2beta.MountOrBuilder> + getMountsFieldBuilder() { + if (mountsBuilder_ == null) { + mountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Mount, + com.google.cloud.lifesciences.v2beta.Mount.Builder, + com.google.cloud.lifesciences.v2beta.MountOrBuilder>( + mounts_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + mounts_ = null; + } + return mountsBuilder_; + } + + 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 to associate with the action. This field is provided to assist
+     * workflow engine authors in identifying actions (for example, to indicate
+     * what sort of action they perform, such as localization or debugging).
+     * They are returned in the operation metadata, but are otherwise ignored.
+     * 
+ * + * map<string, string> labels = 10; + */ + @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 to associate with the action. This field is provided to assist
+     * workflow engine authors in identifying actions (for example, to indicate
+     * what sort of action they perform, such as localization or debugging).
+     * They are returned in the operation metadata, but are otherwise ignored.
+     * 
+ * + * map<string, string> labels = 10; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels to associate with the action. This field is provided to assist
+     * workflow engine authors in identifying actions (for example, to indicate
+     * what sort of action they perform, such as localization or debugging).
+     * They are returned in the operation metadata, but are otherwise ignored.
+     * 
+ * + * map<string, string> labels = 10; + */ + @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 to associate with the action. This field is provided to assist
+     * workflow engine authors in identifying actions (for example, to indicate
+     * what sort of action they perform, such as localization or debugging).
+     * They are returned in the operation metadata, but are otherwise ignored.
+     * 
+ * + * map<string, string> labels = 10; + */ + @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 to associate with the action. This field is provided to assist
+     * workflow engine authors in identifying actions (for example, to indicate
+     * what sort of action they perform, such as localization or debugging).
+     * They are returned in the operation metadata, but are otherwise ignored.
+     * 
+ * + * map<string, string> labels = 10; + */ + 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 to associate with the action. This field is provided to assist
+     * workflow engine authors in identifying actions (for example, to indicate
+     * what sort of action they perform, such as localization or debugging).
+     * They are returned in the operation metadata, but are otherwise ignored.
+     * 
+ * + * map<string, string> labels = 10; + */ + 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 to associate with the action. This field is provided to assist
+     * workflow engine authors in identifying actions (for example, to indicate
+     * what sort of action they perform, such as localization or debugging).
+     * They are returned in the operation metadata, but are otherwise ignored.
+     * 
+ * + * map<string, string> labels = 10; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.cloud.lifesciences.v2beta.Secret credentials_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Secret, + com.google.cloud.lifesciences.v2beta.Secret.Builder, + com.google.cloud.lifesciences.v2beta.SecretOrBuilder> + credentialsBuilder_; + /** + * + * + *
+     * If the specified image is hosted on a private registry other than Google
+     * Container Registry, the credentials required to pull the image must be
+     * specified here as an encrypted secret.
+     * The secret must decrypt to a JSON-encoded dictionary containing both
+     * `username` and `password` keys.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + * + * @return Whether the credentials field is set. + */ + public boolean hasCredentials() { + return credentialsBuilder_ != null || credentials_ != null; + } + /** + * + * + *
+     * If the specified image is hosted on a private registry other than Google
+     * Container Registry, the credentials required to pull the image must be
+     * specified here as an encrypted secret.
+     * The secret must decrypt to a JSON-encoded dictionary containing both
+     * `username` and `password` keys.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + * + * @return The credentials. + */ + public com.google.cloud.lifesciences.v2beta.Secret getCredentials() { + if (credentialsBuilder_ == null) { + return credentials_ == null + ? com.google.cloud.lifesciences.v2beta.Secret.getDefaultInstance() + : credentials_; + } else { + return credentialsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * If the specified image is hosted on a private registry other than Google
+     * Container Registry, the credentials required to pull the image must be
+     * specified here as an encrypted secret.
+     * The secret must decrypt to a JSON-encoded dictionary containing both
+     * `username` and `password` keys.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + */ + public Builder setCredentials(com.google.cloud.lifesciences.v2beta.Secret value) { + if (credentialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + credentials_ = value; + onChanged(); + } else { + credentialsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * If the specified image is hosted on a private registry other than Google
+     * Container Registry, the credentials required to pull the image must be
+     * specified here as an encrypted secret.
+     * The secret must decrypt to a JSON-encoded dictionary containing both
+     * `username` and `password` keys.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + */ + public Builder setCredentials( + com.google.cloud.lifesciences.v2beta.Secret.Builder builderForValue) { + if (credentialsBuilder_ == null) { + credentials_ = builderForValue.build(); + onChanged(); + } else { + credentialsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * If the specified image is hosted on a private registry other than Google
+     * Container Registry, the credentials required to pull the image must be
+     * specified here as an encrypted secret.
+     * The secret must decrypt to a JSON-encoded dictionary containing both
+     * `username` and `password` keys.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + */ + public Builder mergeCredentials(com.google.cloud.lifesciences.v2beta.Secret value) { + if (credentialsBuilder_ == null) { + if (credentials_ != null) { + credentials_ = + com.google.cloud.lifesciences.v2beta.Secret.newBuilder(credentials_) + .mergeFrom(value) + .buildPartial(); + } else { + credentials_ = value; + } + onChanged(); + } else { + credentialsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * If the specified image is hosted on a private registry other than Google
+     * Container Registry, the credentials required to pull the image must be
+     * specified here as an encrypted secret.
+     * The secret must decrypt to a JSON-encoded dictionary containing both
+     * `username` and `password` keys.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + */ + public Builder clearCredentials() { + if (credentialsBuilder_ == null) { + credentials_ = null; + onChanged(); + } else { + credentials_ = null; + credentialsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * If the specified image is hosted on a private registry other than Google
+     * Container Registry, the credentials required to pull the image must be
+     * specified here as an encrypted secret.
+     * The secret must decrypt to a JSON-encoded dictionary containing both
+     * `username` and `password` keys.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + */ + public com.google.cloud.lifesciences.v2beta.Secret.Builder getCredentialsBuilder() { + + onChanged(); + return getCredentialsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If the specified image is hosted on a private registry other than Google
+     * Container Registry, the credentials required to pull the image must be
+     * specified here as an encrypted secret.
+     * The secret must decrypt to a JSON-encoded dictionary containing both
+     * `username` and `password` keys.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + */ + public com.google.cloud.lifesciences.v2beta.SecretOrBuilder getCredentialsOrBuilder() { + if (credentialsBuilder_ != null) { + return credentialsBuilder_.getMessageOrBuilder(); + } else { + return credentials_ == null + ? com.google.cloud.lifesciences.v2beta.Secret.getDefaultInstance() + : credentials_; + } + } + /** + * + * + *
+     * If the specified image is hosted on a private registry other than Google
+     * Container Registry, the credentials required to pull the image must be
+     * specified here as an encrypted secret.
+     * The secret must decrypt to a JSON-encoded dictionary containing both
+     * `username` and `password` keys.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Secret, + com.google.cloud.lifesciences.v2beta.Secret.Builder, + com.google.cloud.lifesciences.v2beta.SecretOrBuilder> + getCredentialsFieldBuilder() { + if (credentialsBuilder_ == null) { + credentialsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Secret, + com.google.cloud.lifesciences.v2beta.Secret.Builder, + com.google.cloud.lifesciences.v2beta.SecretOrBuilder>( + getCredentials(), getParentForChildren(), isClean()); + credentials_ = null; + } + return credentialsBuilder_; + } + + private com.google.protobuf.Duration timeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeoutBuilder_; + /** + * + * + *
+     * The maximum amount of time to give the action to complete. If the action
+     * fails to complete before the timeout, it will be terminated and the exit
+     * status will be non-zero. The pipeline will continue or terminate based
+     * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+     * 
+ * + * .google.protobuf.Duration timeout = 12; + * + * @return Whether the timeout field is set. + */ + public boolean hasTimeout() { + return timeoutBuilder_ != null || timeout_ != null; + } + /** + * + * + *
+     * The maximum amount of time to give the action to complete. If the action
+     * fails to complete before the timeout, it will be terminated and the exit
+     * status will be non-zero. The pipeline will continue or terminate based
+     * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+     * 
+ * + * .google.protobuf.Duration timeout = 12; + * + * @return The timeout. + */ + public com.google.protobuf.Duration getTimeout() { + if (timeoutBuilder_ == null) { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } else { + return timeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The maximum amount of time to give the action to complete. If the action
+     * fails to complete before the timeout, it will be terminated and the exit
+     * status will be non-zero. The pipeline will continue or terminate based
+     * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+     * 
+ * + * .google.protobuf.Duration timeout = 12; + */ + public Builder setTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeout_ = value; + onChanged(); + } else { + timeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time to give the action to complete. If the action
+     * fails to complete before the timeout, it will be terminated and the exit
+     * status will be non-zero. The pipeline will continue or terminate based
+     * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+     * 
+ * + * .google.protobuf.Duration timeout = 12; + */ + public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (timeoutBuilder_ == null) { + timeout_ = builderForValue.build(); + onChanged(); + } else { + timeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time to give the action to complete. If the action
+     * fails to complete before the timeout, it will be terminated and the exit
+     * status will be non-zero. The pipeline will continue or terminate based
+     * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+     * 
+ * + * .google.protobuf.Duration timeout = 12; + */ + public Builder mergeTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (timeout_ != null) { + timeout_ = + com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial(); + } else { + timeout_ = value; + } + onChanged(); + } else { + timeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time to give the action to complete. If the action
+     * fails to complete before the timeout, it will be terminated and the exit
+     * status will be non-zero. The pipeline will continue or terminate based
+     * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+     * 
+ * + * .google.protobuf.Duration timeout = 12; + */ + public Builder clearTimeout() { + if (timeoutBuilder_ == null) { + timeout_ = null; + onChanged(); + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time to give the action to complete. If the action
+     * fails to complete before the timeout, it will be terminated and the exit
+     * status will be non-zero. The pipeline will continue or terminate based
+     * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+     * 
+ * + * .google.protobuf.Duration timeout = 12; + */ + public com.google.protobuf.Duration.Builder getTimeoutBuilder() { + + onChanged(); + return getTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The maximum amount of time to give the action to complete. If the action
+     * fails to complete before the timeout, it will be terminated and the exit
+     * status will be non-zero. The pipeline will continue or terminate based
+     * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+     * 
+ * + * .google.protobuf.Duration timeout = 12; + */ + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + if (timeoutBuilder_ != null) { + return timeoutBuilder_.getMessageOrBuilder(); + } else { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + } + /** + * + * + *
+     * The maximum amount of time to give the action to complete. If the action
+     * fails to complete before the timeout, it will be terminated and the exit
+     * status will be non-zero. The pipeline will continue or terminate based
+     * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+     * 
+ * + * .google.protobuf.Duration timeout = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeoutFieldBuilder() { + if (timeoutBuilder_ == null) { + timeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeout(), getParentForChildren(), isClean()); + timeout_ = null; + } + return timeoutBuilder_; + } + + private boolean ignoreExitStatus_; + /** + * + * + *
+     * Normally, a non-zero exit status causes the pipeline to fail. This flag
+     * allows execution of other actions to continue instead.
+     * 
+ * + * bool ignore_exit_status = 13; + * + * @return The ignoreExitStatus. + */ + @java.lang.Override + public boolean getIgnoreExitStatus() { + return ignoreExitStatus_; + } + /** + * + * + *
+     * Normally, a non-zero exit status causes the pipeline to fail. This flag
+     * allows execution of other actions to continue instead.
+     * 
+ * + * bool ignore_exit_status = 13; + * + * @param value The ignoreExitStatus to set. + * @return This builder for chaining. + */ + public Builder setIgnoreExitStatus(boolean value) { + + ignoreExitStatus_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Normally, a non-zero exit status causes the pipeline to fail. This flag
+     * allows execution of other actions to continue instead.
+     * 
+ * + * bool ignore_exit_status = 13; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreExitStatus() { + + ignoreExitStatus_ = false; + onChanged(); + return this; + } + + private boolean runInBackground_; + /** + * + * + *
+     * This flag allows an action to continue running in the background while
+     * executing subsequent actions. This is useful to provide services to
+     * other actions (or to provide debugging support tools like SSH servers).
+     * 
+ * + * bool run_in_background = 14; + * + * @return The runInBackground. + */ + @java.lang.Override + public boolean getRunInBackground() { + return runInBackground_; + } + /** + * + * + *
+     * This flag allows an action to continue running in the background while
+     * executing subsequent actions. This is useful to provide services to
+     * other actions (or to provide debugging support tools like SSH servers).
+     * 
+ * + * bool run_in_background = 14; + * + * @param value The runInBackground to set. + * @return This builder for chaining. + */ + public Builder setRunInBackground(boolean value) { + + runInBackground_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This flag allows an action to continue running in the background while
+     * executing subsequent actions. This is useful to provide services to
+     * other actions (or to provide debugging support tools like SSH servers).
+     * 
+ * + * bool run_in_background = 14; + * + * @return This builder for chaining. + */ + public Builder clearRunInBackground() { + + runInBackground_ = false; + onChanged(); + return this; + } + + private boolean alwaysRun_; + /** + * + * + *
+     * By default, after an action fails, no further actions are run. This flag
+     * indicates that this action must be run even if the pipeline has already
+     * failed. This is useful for actions that copy output files off of the VM
+     * or for debugging. Note that no actions will be run if image prefetching
+     * fails.
+     * 
+ * + * bool always_run = 15; + * + * @return The alwaysRun. + */ + @java.lang.Override + public boolean getAlwaysRun() { + return alwaysRun_; + } + /** + * + * + *
+     * By default, after an action fails, no further actions are run. This flag
+     * indicates that this action must be run even if the pipeline has already
+     * failed. This is useful for actions that copy output files off of the VM
+     * or for debugging. Note that no actions will be run if image prefetching
+     * fails.
+     * 
+ * + * bool always_run = 15; + * + * @param value The alwaysRun to set. + * @return This builder for chaining. + */ + public Builder setAlwaysRun(boolean value) { + + alwaysRun_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * By default, after an action fails, no further actions are run. This flag
+     * indicates that this action must be run even if the pipeline has already
+     * failed. This is useful for actions that copy output files off of the VM
+     * or for debugging. Note that no actions will be run if image prefetching
+     * fails.
+     * 
+ * + * bool always_run = 15; + * + * @return This builder for chaining. + */ + public Builder clearAlwaysRun() { + + alwaysRun_ = false; + onChanged(); + return this; + } + + private boolean enableFuse_; + /** + * + * + *
+     * Enable access to the FUSE device for this action. Filesystems can then
+     * be mounted into disks shared with other actions. The other actions do
+     * not need the `enable_fuse` flag to access the mounted filesystem.
+     * This has the effect of causing the container to be executed with
+     * `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it only
+     * for containers you trust.
+     * 
+ * + * bool enable_fuse = 16; + * + * @return The enableFuse. + */ + @java.lang.Override + public boolean getEnableFuse() { + return enableFuse_; + } + /** + * + * + *
+     * Enable access to the FUSE device for this action. Filesystems can then
+     * be mounted into disks shared with other actions. The other actions do
+     * not need the `enable_fuse` flag to access the mounted filesystem.
+     * This has the effect of causing the container to be executed with
+     * `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it only
+     * for containers you trust.
+     * 
+ * + * bool enable_fuse = 16; + * + * @param value The enableFuse to set. + * @return This builder for chaining. + */ + public Builder setEnableFuse(boolean value) { + + enableFuse_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Enable access to the FUSE device for this action. Filesystems can then
+     * be mounted into disks shared with other actions. The other actions do
+     * not need the `enable_fuse` flag to access the mounted filesystem.
+     * This has the effect of causing the container to be executed with
+     * `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it only
+     * for containers you trust.
+     * 
+ * + * bool enable_fuse = 16; + * + * @return This builder for chaining. + */ + public Builder clearEnableFuse() { + + enableFuse_ = false; + onChanged(); + return this; + } + + private boolean publishExposedPorts_; + /** + * + * + *
+     * Exposes all ports specified by `EXPOSE` statements in the container. To
+     * discover the host side port numbers, consult the `ACTION_STARTED` event
+     * in the operation metadata.
+     * 
+ * + * bool publish_exposed_ports = 17; + * + * @return The publishExposedPorts. + */ + @java.lang.Override + public boolean getPublishExposedPorts() { + return publishExposedPorts_; + } + /** + * + * + *
+     * Exposes all ports specified by `EXPOSE` statements in the container. To
+     * discover the host side port numbers, consult the `ACTION_STARTED` event
+     * in the operation metadata.
+     * 
+ * + * bool publish_exposed_ports = 17; + * + * @param value The publishExposedPorts to set. + * @return This builder for chaining. + */ + public Builder setPublishExposedPorts(boolean value) { + + publishExposedPorts_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Exposes all ports specified by `EXPOSE` statements in the container. To
+     * discover the host side port numbers, consult the `ACTION_STARTED` event
+     * in the operation metadata.
+     * 
+ * + * bool publish_exposed_ports = 17; + * + * @return This builder for chaining. + */ + public Builder clearPublishExposedPorts() { + + publishExposedPorts_ = false; + onChanged(); + return this; + } + + private boolean disableImagePrefetch_; + /** + * + * + *
+     * All container images are typically downloaded before any actions are
+     * executed. This helps prevent typos in URIs or issues like lack of disk
+     * space from wasting large amounts of compute resources.
+     * If set, this flag prevents the worker from downloading the image until
+     * just before the action is executed.
+     * 
+ * + * bool disable_image_prefetch = 18; + * + * @return The disableImagePrefetch. + */ + @java.lang.Override + public boolean getDisableImagePrefetch() { + return disableImagePrefetch_; + } + /** + * + * + *
+     * All container images are typically downloaded before any actions are
+     * executed. This helps prevent typos in URIs or issues like lack of disk
+     * space from wasting large amounts of compute resources.
+     * If set, this flag prevents the worker from downloading the image until
+     * just before the action is executed.
+     * 
+ * + * bool disable_image_prefetch = 18; + * + * @param value The disableImagePrefetch to set. + * @return This builder for chaining. + */ + public Builder setDisableImagePrefetch(boolean value) { + + disableImagePrefetch_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * All container images are typically downloaded before any actions are
+     * executed. This helps prevent typos in URIs or issues like lack of disk
+     * space from wasting large amounts of compute resources.
+     * If set, this flag prevents the worker from downloading the image until
+     * just before the action is executed.
+     * 
+ * + * bool disable_image_prefetch = 18; + * + * @return This builder for chaining. + */ + public Builder clearDisableImagePrefetch() { + + disableImagePrefetch_ = false; + onChanged(); + return this; + } + + private boolean disableStandardErrorCapture_; + /** + * + * + *
+     * A small portion of the container's standard error stream is typically
+     * captured and returned inside the `ContainerStoppedEvent`. Setting this
+     * flag disables this functionality.
+     * 
+ * + * bool disable_standard_error_capture = 19; + * + * @return The disableStandardErrorCapture. + */ + @java.lang.Override + public boolean getDisableStandardErrorCapture() { + return disableStandardErrorCapture_; + } + /** + * + * + *
+     * A small portion of the container's standard error stream is typically
+     * captured and returned inside the `ContainerStoppedEvent`. Setting this
+     * flag disables this functionality.
+     * 
+ * + * bool disable_standard_error_capture = 19; + * + * @param value The disableStandardErrorCapture to set. + * @return This builder for chaining. + */ + public Builder setDisableStandardErrorCapture(boolean value) { + + disableStandardErrorCapture_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A small portion of the container's standard error stream is typically
+     * captured and returned inside the `ContainerStoppedEvent`. Setting this
+     * flag disables this functionality.
+     * 
+ * + * bool disable_standard_error_capture = 19; + * + * @return This builder for chaining. + */ + public Builder clearDisableStandardErrorCapture() { + + disableStandardErrorCapture_ = false; + onChanged(); + return this; + } + + private boolean blockExternalNetwork_; + /** + * + * + *
+     * Prevents the container from accessing the external network.
+     * 
+ * + * bool block_external_network = 20; + * + * @return The blockExternalNetwork. + */ + @java.lang.Override + public boolean getBlockExternalNetwork() { + return blockExternalNetwork_; + } + /** + * + * + *
+     * Prevents the container from accessing the external network.
+     * 
+ * + * bool block_external_network = 20; + * + * @param value The blockExternalNetwork to set. + * @return This builder for chaining. + */ + public Builder setBlockExternalNetwork(boolean value) { + + blockExternalNetwork_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Prevents the container from accessing the external network.
+     * 
+ * + * bool block_external_network = 20; + * + * @return This builder for chaining. + */ + public Builder clearBlockExternalNetwork() { + + blockExternalNetwork_ = 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.lifesciences.v2beta.Action) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.Action) + private static final com.google.cloud.lifesciences.v2beta.Action DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.Action(); + } + + public static com.google.cloud.lifesciences.v2beta.Action getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Action parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Action(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.lifesciences.v2beta.Action getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ActionOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ActionOrBuilder.java new file mode 100644 index 00000000..7c8df4be --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ActionOrBuilder.java @@ -0,0 +1,819 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface ActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.Action) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An optional name for the container. The container hostname will be set to
+   * this name, making it useful for inter-container communication. The name
+   * must contain only upper and lowercase alphanumeric characters and hyphens
+   * and cannot start with a hyphen.
+   * 
+ * + * string container_name = 1; + * + * @return The containerName. + */ + java.lang.String getContainerName(); + /** + * + * + *
+   * An optional name for the container. The container hostname will be set to
+   * this name, making it useful for inter-container communication. The name
+   * must contain only upper and lowercase alphanumeric characters and hyphens
+   * and cannot start with a hyphen.
+   * 
+ * + * string container_name = 1; + * + * @return The bytes for containerName. + */ + com.google.protobuf.ByteString getContainerNameBytes(); + + /** + * + * + *
+   * Required. The URI to pull the container image from. Note that all images referenced
+   * by actions in the pipeline are pulled before the first action runs. If
+   * multiple actions reference the same image, it is only pulled once,
+   * ensuring that the same image is used for all actions in a single pipeline.
+   * The image URI can be either a complete host and image specification (e.g.,
+   * quay.io/biocontainers/samtools), a library and image name (e.g.,
+   * google/cloud-sdk) or a bare image name ('bash') to pull from the default
+   * library.  No schema is required in any of these cases.
+   * If the specified image is not public, the service account specified for
+   * the Virtual Machine must have access to pull the images from GCR, or
+   * appropriate credentials must be specified in the
+   * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] field.
+   * 
+ * + * string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + * + * + *
+   * Required. The URI to pull the container image from. Note that all images referenced
+   * by actions in the pipeline are pulled before the first action runs. If
+   * multiple actions reference the same image, it is only pulled once,
+   * ensuring that the same image is used for all actions in a single pipeline.
+   * The image URI can be either a complete host and image specification (e.g.,
+   * quay.io/biocontainers/samtools), a library and image name (e.g.,
+   * google/cloud-sdk) or a bare image name ('bash') to pull from the default
+   * library.  No schema is required in any of these cases.
+   * If the specified image is not public, the service account specified for
+   * the Virtual Machine must have access to pull the images from GCR, or
+   * appropriate credentials must be specified in the
+   * [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] field.
+   * 
+ * + * string image_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString getImageUriBytes(); + + /** + * + * + *
+   * If specified, overrides the `CMD` specified in the container. If the
+   * container also has an `ENTRYPOINT` the values are used as entrypoint
+   * arguments. Otherwise, they are used as a command and arguments to run
+   * inside the container.
+   * 
+ * + * repeated string commands = 3; + * + * @return A list containing the commands. + */ + java.util.List getCommandsList(); + /** + * + * + *
+   * If specified, overrides the `CMD` specified in the container. If the
+   * container also has an `ENTRYPOINT` the values are used as entrypoint
+   * arguments. Otherwise, they are used as a command and arguments to run
+   * inside the container.
+   * 
+ * + * repeated string commands = 3; + * + * @return The count of commands. + */ + int getCommandsCount(); + /** + * + * + *
+   * If specified, overrides the `CMD` specified in the container. If the
+   * container also has an `ENTRYPOINT` the values are used as entrypoint
+   * arguments. Otherwise, they are used as a command and arguments to run
+   * inside the container.
+   * 
+ * + * repeated string commands = 3; + * + * @param index The index of the element to return. + * @return The commands at the given index. + */ + java.lang.String getCommands(int index); + /** + * + * + *
+   * If specified, overrides the `CMD` specified in the container. If the
+   * container also has an `ENTRYPOINT` the values are used as entrypoint
+   * arguments. Otherwise, they are used as a command and arguments to run
+   * inside the container.
+   * 
+ * + * repeated string commands = 3; + * + * @param index The index of the value to return. + * @return The bytes of the commands at the given index. + */ + com.google.protobuf.ByteString getCommandsBytes(int index); + + /** + * + * + *
+   * If specified, overrides the `ENTRYPOINT` specified in the container.
+   * 
+ * + * string entrypoint = 4; + * + * @return The entrypoint. + */ + java.lang.String getEntrypoint(); + /** + * + * + *
+   * If specified, overrides the `ENTRYPOINT` specified in the container.
+   * 
+ * + * string entrypoint = 4; + * + * @return The bytes for entrypoint. + */ + com.google.protobuf.ByteString getEntrypointBytes(); + + /** + * + * + *
+   * The environment to pass into the container. This environment is merged
+   * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+   * message, overwriting any duplicate values.
+   * In addition to the values passed here, a few other values are
+   * automatically injected into the environment. These cannot be hidden or
+   * overwritten.
+   * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+   * because an action has exited with a non-zero status (and did not have the
+   * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+   * debug or logging actions should execute.
+   * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+   * non-background action that executed. This can be used by workflow engine
+   * authors to determine whether an individual action has succeeded or failed.
+   * 
+ * + * map<string, string> environment = 5; + */ + int getEnvironmentCount(); + /** + * + * + *
+   * The environment to pass into the container. This environment is merged
+   * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+   * message, overwriting any duplicate values.
+   * In addition to the values passed here, a few other values are
+   * automatically injected into the environment. These cannot be hidden or
+   * overwritten.
+   * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+   * because an action has exited with a non-zero status (and did not have the
+   * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+   * debug or logging actions should execute.
+   * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+   * non-background action that executed. This can be used by workflow engine
+   * authors to determine whether an individual action has succeeded or failed.
+   * 
+ * + * map<string, string> environment = 5; + */ + boolean containsEnvironment(java.lang.String key); + /** Use {@link #getEnvironmentMap()} instead. */ + @java.lang.Deprecated + java.util.Map getEnvironment(); + /** + * + * + *
+   * The environment to pass into the container. This environment is merged
+   * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+   * message, overwriting any duplicate values.
+   * In addition to the values passed here, a few other values are
+   * automatically injected into the environment. These cannot be hidden or
+   * overwritten.
+   * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+   * because an action has exited with a non-zero status (and did not have the
+   * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+   * debug or logging actions should execute.
+   * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+   * non-background action that executed. This can be used by workflow engine
+   * authors to determine whether an individual action has succeeded or failed.
+   * 
+ * + * map<string, string> environment = 5; + */ + java.util.Map getEnvironmentMap(); + /** + * + * + *
+   * The environment to pass into the container. This environment is merged
+   * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+   * message, overwriting any duplicate values.
+   * In addition to the values passed here, a few other values are
+   * automatically injected into the environment. These cannot be hidden or
+   * overwritten.
+   * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+   * because an action has exited with a non-zero status (and did not have the
+   * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+   * debug or logging actions should execute.
+   * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+   * non-background action that executed. This can be used by workflow engine
+   * authors to determine whether an individual action has succeeded or failed.
+   * 
+ * + * map<string, string> environment = 5; + */ + java.lang.String getEnvironmentOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The environment to pass into the container. This environment is merged
+   * with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline]
+   * message, overwriting any duplicate values.
+   * In addition to the values passed here, a few other values are
+   * automatically injected into the environment. These cannot be hidden or
+   * overwritten.
+   * `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed
+   * because an action has exited with a non-zero status (and did not have the
+   * `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional
+   * debug or logging actions should execute.
+   * `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last
+   * non-background action that executed. This can be used by workflow engine
+   * authors to determine whether an individual action has succeeded or failed.
+   * 
+ * + * map<string, string> environment = 5; + */ + java.lang.String getEnvironmentOrThrow(java.lang.String key); + + /** + * + * + *
+   * An optional identifier for a PID namespace to run the action inside.
+   * Multiple actions should use the same string to share a namespace.  If
+   * unspecified, a separate isolated namespace is used.
+   * 
+ * + * string pid_namespace = 6; + * + * @return The pidNamespace. + */ + java.lang.String getPidNamespace(); + /** + * + * + *
+   * An optional identifier for a PID namespace to run the action inside.
+   * Multiple actions should use the same string to share a namespace.  If
+   * unspecified, a separate isolated namespace is used.
+   * 
+ * + * string pid_namespace = 6; + * + * @return The bytes for pidNamespace. + */ + com.google.protobuf.ByteString getPidNamespaceBytes(); + + /** + * + * + *
+   * A map of containers to host port mappings for this container. If the
+   * container already specifies exposed ports, use the
+   * `PUBLISH_EXPOSED_PORTS` flag instead.
+   * The host port number must be less than 65536. If it is zero, an unused
+   * random port is assigned. To determine the resulting port number, consult
+   * the `ContainerStartedEvent` in the operation metadata.
+   * 
+ * + * map<int32, int32> port_mappings = 8; + */ + int getPortMappingsCount(); + /** + * + * + *
+   * A map of containers to host port mappings for this container. If the
+   * container already specifies exposed ports, use the
+   * `PUBLISH_EXPOSED_PORTS` flag instead.
+   * The host port number must be less than 65536. If it is zero, an unused
+   * random port is assigned. To determine the resulting port number, consult
+   * the `ContainerStartedEvent` in the operation metadata.
+   * 
+ * + * map<int32, int32> port_mappings = 8; + */ + boolean containsPortMappings(int key); + /** Use {@link #getPortMappingsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getPortMappings(); + /** + * + * + *
+   * A map of containers to host port mappings for this container. If the
+   * container already specifies exposed ports, use the
+   * `PUBLISH_EXPOSED_PORTS` flag instead.
+   * The host port number must be less than 65536. If it is zero, an unused
+   * random port is assigned. To determine the resulting port number, consult
+   * the `ContainerStartedEvent` in the operation metadata.
+   * 
+ * + * map<int32, int32> port_mappings = 8; + */ + java.util.Map getPortMappingsMap(); + /** + * + * + *
+   * A map of containers to host port mappings for this container. If the
+   * container already specifies exposed ports, use the
+   * `PUBLISH_EXPOSED_PORTS` flag instead.
+   * The host port number must be less than 65536. If it is zero, an unused
+   * random port is assigned. To determine the resulting port number, consult
+   * the `ContainerStartedEvent` in the operation metadata.
+   * 
+ * + * map<int32, int32> port_mappings = 8; + */ + int getPortMappingsOrDefault(int key, int defaultValue); + /** + * + * + *
+   * A map of containers to host port mappings for this container. If the
+   * container already specifies exposed ports, use the
+   * `PUBLISH_EXPOSED_PORTS` flag instead.
+   * The host port number must be less than 65536. If it is zero, an unused
+   * random port is assigned. To determine the resulting port number, consult
+   * the `ContainerStartedEvent` in the operation metadata.
+   * 
+ * + * map<int32, int32> port_mappings = 8; + */ + int getPortMappingsOrThrow(int key); + + /** + * + * + *
+   * A list of mounts to make available to the action.
+   * In addition to the values specified here, every action has a special
+   * virtual disk mounted under `/google` that contains log files and other
+   * operational components.
+   * <ul>
+   *   <li><code>/google/logs</code> All logs written during the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/output</code> The combined standard output and
+   *   standard error of all actions run as part of the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+   *   each individual action's standard output.</li>
+   *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+   *   each individual action's standard error output.</li>
+   * </ul>
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + java.util.List getMountsList(); + /** + * + * + *
+   * A list of mounts to make available to the action.
+   * In addition to the values specified here, every action has a special
+   * virtual disk mounted under `/google` that contains log files and other
+   * operational components.
+   * <ul>
+   *   <li><code>/google/logs</code> All logs written during the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/output</code> The combined standard output and
+   *   standard error of all actions run as part of the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+   *   each individual action's standard output.</li>
+   *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+   *   each individual action's standard error output.</li>
+   * </ul>
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + com.google.cloud.lifesciences.v2beta.Mount getMounts(int index); + /** + * + * + *
+   * A list of mounts to make available to the action.
+   * In addition to the values specified here, every action has a special
+   * virtual disk mounted under `/google` that contains log files and other
+   * operational components.
+   * <ul>
+   *   <li><code>/google/logs</code> All logs written during the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/output</code> The combined standard output and
+   *   standard error of all actions run as part of the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+   *   each individual action's standard output.</li>
+   *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+   *   each individual action's standard error output.</li>
+   * </ul>
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + int getMountsCount(); + /** + * + * + *
+   * A list of mounts to make available to the action.
+   * In addition to the values specified here, every action has a special
+   * virtual disk mounted under `/google` that contains log files and other
+   * operational components.
+   * <ul>
+   *   <li><code>/google/logs</code> All logs written during the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/output</code> The combined standard output and
+   *   standard error of all actions run as part of the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+   *   each individual action's standard output.</li>
+   *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+   *   each individual action's standard error output.</li>
+   * </ul>
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + java.util.List + getMountsOrBuilderList(); + /** + * + * + *
+   * A list of mounts to make available to the action.
+   * In addition to the values specified here, every action has a special
+   * virtual disk mounted under `/google` that contains log files and other
+   * operational components.
+   * <ul>
+   *   <li><code>/google/logs</code> All logs written during the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/output</code> The combined standard output and
+   *   standard error of all actions run as part of the pipeline
+   *   execution.</li>
+   *   <li><code>/google/logs/action/*/stdout</code> The complete contents of
+   *   each individual action's standard output.</li>
+   *   <li><code>/google/logs/action/*/stderr</code> The complete contents of
+   *   each individual action's standard error output.</li>
+   * </ul>
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Mount mounts = 9; + */ + com.google.cloud.lifesciences.v2beta.MountOrBuilder getMountsOrBuilder(int index); + + /** + * + * + *
+   * Labels to associate with the action. This field is provided to assist
+   * workflow engine authors in identifying actions (for example, to indicate
+   * what sort of action they perform, such as localization or debugging).
+   * They are returned in the operation metadata, but are otherwise ignored.
+   * 
+ * + * map<string, string> labels = 10; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels to associate with the action. This field is provided to assist
+   * workflow engine authors in identifying actions (for example, to indicate
+   * what sort of action they perform, such as localization or debugging).
+   * They are returned in the operation metadata, but are otherwise ignored.
+   * 
+ * + * map<string, string> labels = 10; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels to associate with the action. This field is provided to assist
+   * workflow engine authors in identifying actions (for example, to indicate
+   * what sort of action they perform, such as localization or debugging).
+   * They are returned in the operation metadata, but are otherwise ignored.
+   * 
+ * + * map<string, string> labels = 10; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels to associate with the action. This field is provided to assist
+   * workflow engine authors in identifying actions (for example, to indicate
+   * what sort of action they perform, such as localization or debugging).
+   * They are returned in the operation metadata, but are otherwise ignored.
+   * 
+ * + * map<string, string> labels = 10; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Labels to associate with the action. This field is provided to assist
+   * workflow engine authors in identifying actions (for example, to indicate
+   * what sort of action they perform, such as localization or debugging).
+   * They are returned in the operation metadata, but are otherwise ignored.
+   * 
+ * + * map<string, string> labels = 10; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * If the specified image is hosted on a private registry other than Google
+   * Container Registry, the credentials required to pull the image must be
+   * specified here as an encrypted secret.
+   * The secret must decrypt to a JSON-encoded dictionary containing both
+   * `username` and `password` keys.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + * + * @return Whether the credentials field is set. + */ + boolean hasCredentials(); + /** + * + * + *
+   * If the specified image is hosted on a private registry other than Google
+   * Container Registry, the credentials required to pull the image must be
+   * specified here as an encrypted secret.
+   * The secret must decrypt to a JSON-encoded dictionary containing both
+   * `username` and `password` keys.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + * + * @return The credentials. + */ + com.google.cloud.lifesciences.v2beta.Secret getCredentials(); + /** + * + * + *
+   * If the specified image is hosted on a private registry other than Google
+   * Container Registry, the credentials required to pull the image must be
+   * specified here as an encrypted secret.
+   * The secret must decrypt to a JSON-encoded dictionary containing both
+   * `username` and `password` keys.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Secret credentials = 11; + */ + com.google.cloud.lifesciences.v2beta.SecretOrBuilder getCredentialsOrBuilder(); + + /** + * + * + *
+   * The maximum amount of time to give the action to complete. If the action
+   * fails to complete before the timeout, it will be terminated and the exit
+   * status will be non-zero. The pipeline will continue or terminate based
+   * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+   * 
+ * + * .google.protobuf.Duration timeout = 12; + * + * @return Whether the timeout field is set. + */ + boolean hasTimeout(); + /** + * + * + *
+   * The maximum amount of time to give the action to complete. If the action
+   * fails to complete before the timeout, it will be terminated and the exit
+   * status will be non-zero. The pipeline will continue or terminate based
+   * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+   * 
+ * + * .google.protobuf.Duration timeout = 12; + * + * @return The timeout. + */ + com.google.protobuf.Duration getTimeout(); + /** + * + * + *
+   * The maximum amount of time to give the action to complete. If the action
+   * fails to complete before the timeout, it will be terminated and the exit
+   * status will be non-zero. The pipeline will continue or terminate based
+   * on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags.
+   * 
+ * + * .google.protobuf.Duration timeout = 12; + */ + com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder(); + + /** + * + * + *
+   * Normally, a non-zero exit status causes the pipeline to fail. This flag
+   * allows execution of other actions to continue instead.
+   * 
+ * + * bool ignore_exit_status = 13; + * + * @return The ignoreExitStatus. + */ + boolean getIgnoreExitStatus(); + + /** + * + * + *
+   * This flag allows an action to continue running in the background while
+   * executing subsequent actions. This is useful to provide services to
+   * other actions (or to provide debugging support tools like SSH servers).
+   * 
+ * + * bool run_in_background = 14; + * + * @return The runInBackground. + */ + boolean getRunInBackground(); + + /** + * + * + *
+   * By default, after an action fails, no further actions are run. This flag
+   * indicates that this action must be run even if the pipeline has already
+   * failed. This is useful for actions that copy output files off of the VM
+   * or for debugging. Note that no actions will be run if image prefetching
+   * fails.
+   * 
+ * + * bool always_run = 15; + * + * @return The alwaysRun. + */ + boolean getAlwaysRun(); + + /** + * + * + *
+   * Enable access to the FUSE device for this action. Filesystems can then
+   * be mounted into disks shared with other actions. The other actions do
+   * not need the `enable_fuse` flag to access the mounted filesystem.
+   * This has the effect of causing the container to be executed with
+   * `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it only
+   * for containers you trust.
+   * 
+ * + * bool enable_fuse = 16; + * + * @return The enableFuse. + */ + boolean getEnableFuse(); + + /** + * + * + *
+   * Exposes all ports specified by `EXPOSE` statements in the container. To
+   * discover the host side port numbers, consult the `ACTION_STARTED` event
+   * in the operation metadata.
+   * 
+ * + * bool publish_exposed_ports = 17; + * + * @return The publishExposedPorts. + */ + boolean getPublishExposedPorts(); + + /** + * + * + *
+   * All container images are typically downloaded before any actions are
+   * executed. This helps prevent typos in URIs or issues like lack of disk
+   * space from wasting large amounts of compute resources.
+   * If set, this flag prevents the worker from downloading the image until
+   * just before the action is executed.
+   * 
+ * + * bool disable_image_prefetch = 18; + * + * @return The disableImagePrefetch. + */ + boolean getDisableImagePrefetch(); + + /** + * + * + *
+   * A small portion of the container's standard error stream is typically
+   * captured and returned inside the `ContainerStoppedEvent`. Setting this
+   * flag disables this functionality.
+   * 
+ * + * bool disable_standard_error_capture = 19; + * + * @return The disableStandardErrorCapture. + */ + boolean getDisableStandardErrorCapture(); + + /** + * + * + *
+   * Prevents the container from accessing the external network.
+   * 
+ * + * bool block_external_network = 20; + * + * @return The blockExternalNetwork. + */ + boolean getBlockExternalNetwork(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerKilledEvent.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerKilledEvent.java new file mode 100644 index 00000000..fc7b9b0e --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerKilledEvent.java @@ -0,0 +1,551 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * An event generated when a container is forcibly terminated by the
+ * worker. Currently, this only occurs when the container outlives the
+ * timeout specified by the user.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.ContainerKilledEvent} + */ +public final class ContainerKilledEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.ContainerKilledEvent) + ContainerKilledEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerKilledEvent.newBuilder() to construct. + private ContainerKilledEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContainerKilledEvent() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContainerKilledEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ContainerKilledEvent( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + actionId_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerKilledEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerKilledEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.class, + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.Builder.class); + } + + public static final int ACTION_ID_FIELD_NUMBER = 1; + private int actionId_; + /** + * + * + *
+   * The numeric ID of the action that started the container.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (actionId_ != 0) { + output.writeInt32(1, actionId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, actionId_); + } + 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.lifesciences.v2beta.ContainerKilledEvent)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent other = + (com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) obj; + + if (getActionId() != other.getActionId()) 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) + ACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getActionId(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.ContainerKilledEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerKilledEvent 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.lifesciences.v2beta.ContainerKilledEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerKilledEvent parseFrom( + 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.lifesciences.v2beta.ContainerKilledEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerKilledEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerKilledEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerKilledEvent parseFrom( + java.io.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.lifesciences.v2beta.ContainerKilledEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerKilledEvent parseDelimitedFrom( + java.io.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.lifesciences.v2beta.ContainerKilledEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerKilledEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.ContainerKilledEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event generated when a container is forcibly terminated by the
+   * worker. Currently, this only occurs when the container outlives the
+   * timeout specified by the user.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.ContainerKilledEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.ContainerKilledEvent) + com.google.cloud.lifesciences.v2beta.ContainerKilledEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerKilledEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerKilledEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.class, + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.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(); + actionId_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerKilledEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerKilledEvent getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerKilledEvent build() { + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerKilledEvent buildPartial() { + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent result = + new com.google.cloud.lifesciences.v2beta.ContainerKilledEvent(this); + result.actionId_ = actionId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.ContainerKilledEvent) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.ContainerKilledEvent other) { + if (other == com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.getDefaultInstance()) + return this; + if (other.getActionId() != 0) { + setActionId(other.getActionId()); + } + 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.lifesciences.v2beta.ContainerKilledEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int actionId_; + /** + * + * + *
+     * The numeric ID of the action that started the container.
+     * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + /** + * + * + *
+     * The numeric ID of the action that started the container.
+     * 
+ * + * int32 action_id = 1; + * + * @param value The actionId to set. + * @return This builder for chaining. + */ + public Builder setActionId(int value) { + + actionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The numeric ID of the action that started the container.
+     * 
+ * + * int32 action_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearActionId() { + + actionId_ = 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.lifesciences.v2beta.ContainerKilledEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.ContainerKilledEvent) + private static final com.google.cloud.lifesciences.v2beta.ContainerKilledEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.ContainerKilledEvent(); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerKilledEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerKilledEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContainerKilledEvent(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.lifesciences.v2beta.ContainerKilledEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerKilledEventOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerKilledEventOrBuilder.java new file mode 100644 index 00000000..7061bd83 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerKilledEventOrBuilder.java @@ -0,0 +1,38 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface ContainerKilledEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.ContainerKilledEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The numeric ID of the action that started the container.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + int getActionId(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStartedEvent.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStartedEvent.java new file mode 100644 index 00000000..d3e88947 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStartedEvent.java @@ -0,0 +1,1081 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * An event generated when a container starts.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.ContainerStartedEvent} + */ +public final class ContainerStartedEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.ContainerStartedEvent) + ContainerStartedEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerStartedEvent.newBuilder() to construct. + private ContainerStartedEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContainerStartedEvent() { + ipAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContainerStartedEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ContainerStartedEvent( + 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: + { + actionId_ = input.readInt32(); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + portMappings_ = + com.google.protobuf.MapField.newMapField( + PortMappingsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry portMappings__ = + input.readMessage( + PortMappingsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + portMappings_.getMutableMap().put(portMappings__.getKey(), portMappings__.getValue()); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + ipAddress_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetPortMappings(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.class, + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.Builder.class); + } + + public static final int ACTION_ID_FIELD_NUMBER = 1; + private int actionId_; + /** + * + * + *
+   * The numeric ID of the action that started this container.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + + public static final int PORT_MAPPINGS_FIELD_NUMBER = 2; + + private static final class PortMappingsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_PortMappingsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.INT32, + 0); + } + + private com.google.protobuf.MapField portMappings_; + + private com.google.protobuf.MapField + internalGetPortMappings() { + if (portMappings_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PortMappingsDefaultEntryHolder.defaultEntry); + } + return portMappings_; + } + + public int getPortMappingsCount() { + return internalGetPortMappings().getMap().size(); + } + /** + * + * + *
+   * The container-to-host port mappings installed for this container. This
+   * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+   * as well as any specified in the `Action` definition.
+   * 
+ * + * map<int32, int32> port_mappings = 2; + */ + @java.lang.Override + public boolean containsPortMappings(int key) { + + return internalGetPortMappings().getMap().containsKey(key); + } + /** Use {@link #getPortMappingsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPortMappings() { + return getPortMappingsMap(); + } + /** + * + * + *
+   * The container-to-host port mappings installed for this container. This
+   * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+   * as well as any specified in the `Action` definition.
+   * 
+ * + * map<int32, int32> port_mappings = 2; + */ + @java.lang.Override + public java.util.Map getPortMappingsMap() { + return internalGetPortMappings().getMap(); + } + /** + * + * + *
+   * The container-to-host port mappings installed for this container. This
+   * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+   * as well as any specified in the `Action` definition.
+   * 
+ * + * map<int32, int32> port_mappings = 2; + */ + @java.lang.Override + public int getPortMappingsOrDefault(int key, int defaultValue) { + + java.util.Map map = internalGetPortMappings().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The container-to-host port mappings installed for this container. This
+   * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+   * as well as any specified in the `Action` definition.
+   * 
+ * + * map<int32, int32> port_mappings = 2; + */ + @java.lang.Override + public int getPortMappingsOrThrow(int key) { + + java.util.Map map = internalGetPortMappings().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 3; + private volatile java.lang.Object ipAddress_; + /** + * + * + *
+   * The public IP address that can be used to connect to the container. This
+   * field is only populated when at least one port mapping is present. If the
+   * instance was created with a private address, this field will be empty even
+   * if port mappings exist.
+   * 
+ * + * string ip_address = 3; + * + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The public IP address that can be used to connect to the container. This
+   * field is only populated when at least one port mapping is present. If the
+   * instance was created with a private address, this field will be empty even
+   * if port mappings exist.
+   * 
+ * + * string ip_address = 3; + * + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (actionId_ != 0) { + output.writeInt32(1, actionId_); + } + com.google.protobuf.GeneratedMessageV3.serializeIntegerMapTo( + output, internalGetPortMappings(), PortMappingsDefaultEntryHolder.defaultEntry, 2); + if (!getIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ipAddress_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, actionId_); + } + for (java.util.Map.Entry entry : + internalGetPortMappings().getMap().entrySet()) { + com.google.protobuf.MapEntry portMappings__ = + PortMappingsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, portMappings__); + } + if (!getIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ipAddress_); + } + 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.lifesciences.v2beta.ContainerStartedEvent)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent other = + (com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) obj; + + if (getActionId() != other.getActionId()) return false; + if (!internalGetPortMappings().equals(other.internalGetPortMappings())) return false; + if (!getIpAddress().equals(other.getIpAddress())) 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) + ACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getActionId(); + if (!internalGetPortMappings().getMap().isEmpty()) { + hash = (37 * hash) + PORT_MAPPINGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetPortMappings().hashCode(); + } + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStartedEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStartedEvent 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.lifesciences.v2beta.ContainerStartedEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStartedEvent parseFrom( + 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.lifesciences.v2beta.ContainerStartedEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStartedEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStartedEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStartedEvent parseFrom( + java.io.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.lifesciences.v2beta.ContainerStartedEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStartedEvent parseDelimitedFrom( + java.io.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.lifesciences.v2beta.ContainerStartedEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStartedEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.ContainerStartedEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event generated when a container starts.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.ContainerStartedEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.ContainerStartedEvent) + com.google.cloud.lifesciences.v2beta.ContainerStartedEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetPortMappings(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutablePortMappings(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.class, + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.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(); + actionId_ = 0; + + internalGetMutablePortMappings().clear(); + ipAddress_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStartedEvent getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStartedEvent build() { + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStartedEvent buildPartial() { + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent result = + new com.google.cloud.lifesciences.v2beta.ContainerStartedEvent(this); + int from_bitField0_ = bitField0_; + result.actionId_ = actionId_; + result.portMappings_ = internalGetPortMappings(); + result.portMappings_.makeImmutable(); + result.ipAddress_ = ipAddress_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.ContainerStartedEvent) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.ContainerStartedEvent other) { + if (other == com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.getDefaultInstance()) + return this; + if (other.getActionId() != 0) { + setActionId(other.getActionId()); + } + internalGetMutablePortMappings().mergeFrom(other.internalGetPortMappings()); + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + 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.lifesciences.v2beta.ContainerStartedEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int actionId_; + /** + * + * + *
+     * The numeric ID of the action that started this container.
+     * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + /** + * + * + *
+     * The numeric ID of the action that started this container.
+     * 
+ * + * int32 action_id = 1; + * + * @param value The actionId to set. + * @return This builder for chaining. + */ + public Builder setActionId(int value) { + + actionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The numeric ID of the action that started this container.
+     * 
+ * + * int32 action_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearActionId() { + + actionId_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField portMappings_; + + private com.google.protobuf.MapField + internalGetPortMappings() { + if (portMappings_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PortMappingsDefaultEntryHolder.defaultEntry); + } + return portMappings_; + } + + private com.google.protobuf.MapField + internalGetMutablePortMappings() { + onChanged(); + ; + if (portMappings_ == null) { + portMappings_ = + com.google.protobuf.MapField.newMapField(PortMappingsDefaultEntryHolder.defaultEntry); + } + if (!portMappings_.isMutable()) { + portMappings_ = portMappings_.copy(); + } + return portMappings_; + } + + public int getPortMappingsCount() { + return internalGetPortMappings().getMap().size(); + } + /** + * + * + *
+     * The container-to-host port mappings installed for this container. This
+     * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+     * as well as any specified in the `Action` definition.
+     * 
+ * + * map<int32, int32> port_mappings = 2; + */ + @java.lang.Override + public boolean containsPortMappings(int key) { + + return internalGetPortMappings().getMap().containsKey(key); + } + /** Use {@link #getPortMappingsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPortMappings() { + return getPortMappingsMap(); + } + /** + * + * + *
+     * The container-to-host port mappings installed for this container. This
+     * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+     * as well as any specified in the `Action` definition.
+     * 
+ * + * map<int32, int32> port_mappings = 2; + */ + @java.lang.Override + public java.util.Map getPortMappingsMap() { + return internalGetPortMappings().getMap(); + } + /** + * + * + *
+     * The container-to-host port mappings installed for this container. This
+     * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+     * as well as any specified in the `Action` definition.
+     * 
+ * + * map<int32, int32> port_mappings = 2; + */ + @java.lang.Override + public int getPortMappingsOrDefault(int key, int defaultValue) { + + java.util.Map map = internalGetPortMappings().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The container-to-host port mappings installed for this container. This
+     * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+     * as well as any specified in the `Action` definition.
+     * 
+ * + * map<int32, int32> port_mappings = 2; + */ + @java.lang.Override + public int getPortMappingsOrThrow(int key) { + + java.util.Map map = internalGetPortMappings().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearPortMappings() { + internalGetMutablePortMappings().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The container-to-host port mappings installed for this container. This
+     * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+     * as well as any specified in the `Action` definition.
+     * 
+ * + * map<int32, int32> port_mappings = 2; + */ + public Builder removePortMappings(int key) { + + internalGetMutablePortMappings().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutablePortMappings() { + return internalGetMutablePortMappings().getMutableMap(); + } + /** + * + * + *
+     * The container-to-host port mappings installed for this container. This
+     * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+     * as well as any specified in the `Action` definition.
+     * 
+ * + * map<int32, int32> port_mappings = 2; + */ + public Builder putPortMappings(int key, int value) { + + internalGetMutablePortMappings().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The container-to-host port mappings installed for this container. This
+     * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+     * as well as any specified in the `Action` definition.
+     * 
+ * + * map<int32, int32> port_mappings = 2; + */ + public Builder putAllPortMappings(java.util.Map values) { + internalGetMutablePortMappings().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object ipAddress_ = ""; + /** + * + * + *
+     * The public IP address that can be used to connect to the container. This
+     * field is only populated when at least one port mapping is present. If the
+     * instance was created with a private address, this field will be empty even
+     * if port mappings exist.
+     * 
+ * + * string ip_address = 3; + * + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The public IP address that can be used to connect to the container. This
+     * field is only populated when at least one port mapping is present. If the
+     * instance was created with a private address, this field will be empty even
+     * if port mappings exist.
+     * 
+ * + * string ip_address = 3; + * + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The public IP address that can be used to connect to the container. This
+     * field is only populated when at least one port mapping is present. If the
+     * instance was created with a private address, this field will be empty even
+     * if port mappings exist.
+     * 
+ * + * string ip_address = 3; + * + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ipAddress_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The public IP address that can be used to connect to the container. This
+     * field is only populated when at least one port mapping is present. If the
+     * instance was created with a private address, this field will be empty even
+     * if port mappings exist.
+     * 
+ * + * string ip_address = 3; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + + ipAddress_ = getDefaultInstance().getIpAddress(); + onChanged(); + return this; + } + /** + * + * + *
+     * The public IP address that can be used to connect to the container. This
+     * field is only populated when at least one port mapping is present. If the
+     * instance was created with a private address, this field will be empty even
+     * if port mappings exist.
+     * 
+ * + * string ip_address = 3; + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ipAddress_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.lifesciences.v2beta.ContainerStartedEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.ContainerStartedEvent) + private static final com.google.cloud.lifesciences.v2beta.ContainerStartedEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.ContainerStartedEvent(); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStartedEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerStartedEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContainerStartedEvent(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.lifesciences.v2beta.ContainerStartedEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStartedEventOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStartedEventOrBuilder.java new file mode 100644 index 00000000..b4d9bbec --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStartedEventOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface ContainerStartedEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.ContainerStartedEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The numeric ID of the action that started this container.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + int getActionId(); + + /** + * + * + *
+   * The container-to-host port mappings installed for this container. This
+   * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+   * as well as any specified in the `Action` definition.
+   * 
+ * + * map<int32, int32> port_mappings = 2; + */ + int getPortMappingsCount(); + /** + * + * + *
+   * The container-to-host port mappings installed for this container. This
+   * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+   * as well as any specified in the `Action` definition.
+   * 
+ * + * map<int32, int32> port_mappings = 2; + */ + boolean containsPortMappings(int key); + /** Use {@link #getPortMappingsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getPortMappings(); + /** + * + * + *
+   * The container-to-host port mappings installed for this container. This
+   * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+   * as well as any specified in the `Action` definition.
+   * 
+ * + * map<int32, int32> port_mappings = 2; + */ + java.util.Map getPortMappingsMap(); + /** + * + * + *
+   * The container-to-host port mappings installed for this container. This
+   * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+   * as well as any specified in the `Action` definition.
+   * 
+ * + * map<int32, int32> port_mappings = 2; + */ + int getPortMappingsOrDefault(int key, int defaultValue); + /** + * + * + *
+   * The container-to-host port mappings installed for this container. This
+   * set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag
+   * as well as any specified in the `Action` definition.
+   * 
+ * + * map<int32, int32> port_mappings = 2; + */ + int getPortMappingsOrThrow(int key); + + /** + * + * + *
+   * The public IP address that can be used to connect to the container. This
+   * field is only populated when at least one port mapping is present. If the
+   * instance was created with a private address, this field will be empty even
+   * if port mappings exist.
+   * 
+ * + * string ip_address = 3; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+   * The public IP address that can be used to connect to the container. This
+   * field is only populated when at least one port mapping is present. If the
+   * instance was created with a private address, this field will be empty even
+   * if port mappings exist.
+   * 
+ * + * string ip_address = 3; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStoppedEvent.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStoppedEvent.java new file mode 100644 index 00000000..ea240b6b --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStoppedEvent.java @@ -0,0 +1,859 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * An event generated when a container exits.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.ContainerStoppedEvent} + */ +public final class ContainerStoppedEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.ContainerStoppedEvent) + ContainerStoppedEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerStoppedEvent.newBuilder() to construct. + private ContainerStoppedEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContainerStoppedEvent() { + stderr_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContainerStoppedEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ContainerStoppedEvent( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + actionId_ = input.readInt32(); + break; + } + case 16: + { + exitStatus_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + stderr_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerStoppedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerStoppedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.class, + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.Builder.class); + } + + public static final int ACTION_ID_FIELD_NUMBER = 1; + private int actionId_; + /** + * + * + *
+   * The numeric ID of the action that started this container.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + + public static final int EXIT_STATUS_FIELD_NUMBER = 2; + private int exitStatus_; + /** + * + * + *
+   * The exit status of the container.
+   * 
+ * + * int32 exit_status = 2; + * + * @return The exitStatus. + */ + @java.lang.Override + public int getExitStatus() { + return exitStatus_; + } + + public static final int STDERR_FIELD_NUMBER = 3; + private volatile java.lang.Object stderr_; + /** + * + * + *
+   * The tail end of any content written to standard error by the container.
+   * If the content emits large amounts of debugging noise or contains
+   * sensitive information, you can prevent the content from being printed by
+   * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag.
+   * Note that only a small amount of the end of the stream is captured here.
+   * The entire stream is stored in the `/google/logs` directory mounted into
+   * each action, and can be copied off the machine as described elsewhere.
+   * 
+ * + * string stderr = 3; + * + * @return The stderr. + */ + @java.lang.Override + public java.lang.String getStderr() { + java.lang.Object ref = stderr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stderr_ = s; + return s; + } + } + /** + * + * + *
+   * The tail end of any content written to standard error by the container.
+   * If the content emits large amounts of debugging noise or contains
+   * sensitive information, you can prevent the content from being printed by
+   * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag.
+   * Note that only a small amount of the end of the stream is captured here.
+   * The entire stream is stored in the `/google/logs` directory mounted into
+   * each action, and can be copied off the machine as described elsewhere.
+   * 
+ * + * string stderr = 3; + * + * @return The bytes for stderr. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStderrBytes() { + java.lang.Object ref = stderr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stderr_ = 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 (actionId_ != 0) { + output.writeInt32(1, actionId_); + } + if (exitStatus_ != 0) { + output.writeInt32(2, exitStatus_); + } + if (!getStderrBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, stderr_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, actionId_); + } + if (exitStatus_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, exitStatus_); + } + if (!getStderrBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, stderr_); + } + 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.lifesciences.v2beta.ContainerStoppedEvent)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent other = + (com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) obj; + + if (getActionId() != other.getActionId()) return false; + if (getExitStatus() != other.getExitStatus()) return false; + if (!getStderr().equals(other.getStderr())) 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) + ACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getActionId(); + hash = (37 * hash) + EXIT_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getExitStatus(); + hash = (37 * hash) + STDERR_FIELD_NUMBER; + hash = (53 * hash) + getStderr().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent 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.lifesciences.v2beta.ContainerStoppedEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent parseFrom( + 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.lifesciences.v2beta.ContainerStoppedEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent parseFrom( + java.io.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.lifesciences.v2beta.ContainerStoppedEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent parseDelimitedFrom( + java.io.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.lifesciences.v2beta.ContainerStoppedEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.ContainerStoppedEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event generated when a container exits.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.ContainerStoppedEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.ContainerStoppedEvent) + com.google.cloud.lifesciences.v2beta.ContainerStoppedEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerStoppedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerStoppedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.class, + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.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(); + actionId_ = 0; + + exitStatus_ = 0; + + stderr_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ContainerStoppedEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent build() { + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent buildPartial() { + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent result = + new com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent(this); + result.actionId_ = actionId_; + result.exitStatus_ = exitStatus_; + result.stderr_ = stderr_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.ContainerStoppedEvent) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent other) { + if (other == com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.getDefaultInstance()) + return this; + if (other.getActionId() != 0) { + setActionId(other.getActionId()); + } + if (other.getExitStatus() != 0) { + setExitStatus(other.getExitStatus()); + } + if (!other.getStderr().isEmpty()) { + stderr_ = other.stderr_; + 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.lifesciences.v2beta.ContainerStoppedEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int actionId_; + /** + * + * + *
+     * The numeric ID of the action that started this container.
+     * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + /** + * + * + *
+     * The numeric ID of the action that started this container.
+     * 
+ * + * int32 action_id = 1; + * + * @param value The actionId to set. + * @return This builder for chaining. + */ + public Builder setActionId(int value) { + + actionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The numeric ID of the action that started this container.
+     * 
+ * + * int32 action_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearActionId() { + + actionId_ = 0; + onChanged(); + return this; + } + + private int exitStatus_; + /** + * + * + *
+     * The exit status of the container.
+     * 
+ * + * int32 exit_status = 2; + * + * @return The exitStatus. + */ + @java.lang.Override + public int getExitStatus() { + return exitStatus_; + } + /** + * + * + *
+     * The exit status of the container.
+     * 
+ * + * int32 exit_status = 2; + * + * @param value The exitStatus to set. + * @return This builder for chaining. + */ + public Builder setExitStatus(int value) { + + exitStatus_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The exit status of the container.
+     * 
+ * + * int32 exit_status = 2; + * + * @return This builder for chaining. + */ + public Builder clearExitStatus() { + + exitStatus_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stderr_ = ""; + /** + * + * + *
+     * The tail end of any content written to standard error by the container.
+     * If the content emits large amounts of debugging noise or contains
+     * sensitive information, you can prevent the content from being printed by
+     * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag.
+     * Note that only a small amount of the end of the stream is captured here.
+     * The entire stream is stored in the `/google/logs` directory mounted into
+     * each action, and can be copied off the machine as described elsewhere.
+     * 
+ * + * string stderr = 3; + * + * @return The stderr. + */ + public java.lang.String getStderr() { + java.lang.Object ref = stderr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stderr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The tail end of any content written to standard error by the container.
+     * If the content emits large amounts of debugging noise or contains
+     * sensitive information, you can prevent the content from being printed by
+     * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag.
+     * Note that only a small amount of the end of the stream is captured here.
+     * The entire stream is stored in the `/google/logs` directory mounted into
+     * each action, and can be copied off the machine as described elsewhere.
+     * 
+ * + * string stderr = 3; + * + * @return The bytes for stderr. + */ + public com.google.protobuf.ByteString getStderrBytes() { + java.lang.Object ref = stderr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stderr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The tail end of any content written to standard error by the container.
+     * If the content emits large amounts of debugging noise or contains
+     * sensitive information, you can prevent the content from being printed by
+     * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag.
+     * Note that only a small amount of the end of the stream is captured here.
+     * The entire stream is stored in the `/google/logs` directory mounted into
+     * each action, and can be copied off the machine as described elsewhere.
+     * 
+ * + * string stderr = 3; + * + * @param value The stderr to set. + * @return This builder for chaining. + */ + public Builder setStderr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + stderr_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The tail end of any content written to standard error by the container.
+     * If the content emits large amounts of debugging noise or contains
+     * sensitive information, you can prevent the content from being printed by
+     * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag.
+     * Note that only a small amount of the end of the stream is captured here.
+     * The entire stream is stored in the `/google/logs` directory mounted into
+     * each action, and can be copied off the machine as described elsewhere.
+     * 
+ * + * string stderr = 3; + * + * @return This builder for chaining. + */ + public Builder clearStderr() { + + stderr_ = getDefaultInstance().getStderr(); + onChanged(); + return this; + } + /** + * + * + *
+     * The tail end of any content written to standard error by the container.
+     * If the content emits large amounts of debugging noise or contains
+     * sensitive information, you can prevent the content from being printed by
+     * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag.
+     * Note that only a small amount of the end of the stream is captured here.
+     * The entire stream is stored in the `/google/logs` directory mounted into
+     * each action, and can be copied off the machine as described elsewhere.
+     * 
+ * + * string stderr = 3; + * + * @param value The bytes for stderr to set. + * @return This builder for chaining. + */ + public Builder setStderrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + stderr_ = 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.lifesciences.v2beta.ContainerStoppedEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.ContainerStoppedEvent) + private static final com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent(); + } + + public static com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerStoppedEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContainerStoppedEvent(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.lifesciences.v2beta.ContainerStoppedEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStoppedEventOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStoppedEventOrBuilder.java new file mode 100644 index 00000000..a809895c --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ContainerStoppedEventOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface ContainerStoppedEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.ContainerStoppedEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The numeric ID of the action that started this container.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + int getActionId(); + + /** + * + * + *
+   * The exit status of the container.
+   * 
+ * + * int32 exit_status = 2; + * + * @return The exitStatus. + */ + int getExitStatus(); + + /** + * + * + *
+   * The tail end of any content written to standard error by the container.
+   * If the content emits large amounts of debugging noise or contains
+   * sensitive information, you can prevent the content from being printed by
+   * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag.
+   * Note that only a small amount of the end of the stream is captured here.
+   * The entire stream is stored in the `/google/logs` directory mounted into
+   * each action, and can be copied off the machine as described elsewhere.
+   * 
+ * + * string stderr = 3; + * + * @return The stderr. + */ + java.lang.String getStderr(); + /** + * + * + *
+   * The tail end of any content written to standard error by the container.
+   * If the content emits large amounts of debugging noise or contains
+   * sensitive information, you can prevent the content from being printed by
+   * setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag.
+   * Note that only a small amount of the end of the stream is captured here.
+   * The entire stream is stored in the `/google/logs` directory mounted into
+   * each action, and can be copied off the machine as described elsewhere.
+   * 
+ * + * string stderr = 3; + * + * @return The bytes for stderr. + */ + com.google.protobuf.ByteString getStderrBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DelayedEvent.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DelayedEvent.java new file mode 100644 index 00000000..7b1b46d4 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DelayedEvent.java @@ -0,0 +1,971 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * An event generated whenever a resource limitation or transient error
+ * delays execution of a pipeline that was otherwise ready to run.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.DelayedEvent} + */ +public final class DelayedEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.DelayedEvent) + DelayedEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use DelayedEvent.newBuilder() to construct. + private DelayedEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DelayedEvent() { + cause_ = ""; + metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DelayedEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DelayedEvent( + 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(); + + cause_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + metrics_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + metrics_.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)) { + metrics_ = metrics_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_DelayedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_DelayedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.DelayedEvent.class, + com.google.cloud.lifesciences.v2beta.DelayedEvent.Builder.class); + } + + public static final int CAUSE_FIELD_NUMBER = 1; + private volatile java.lang.Object cause_; + /** + * + * + *
+   * A textual description of the cause of the delay. The string can change
+   * without notice because it is often generated by another service (such as
+   * Compute Engine).
+   * 
+ * + * string cause = 1; + * + * @return The cause. + */ + @java.lang.Override + public java.lang.String getCause() { + java.lang.Object ref = cause_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cause_ = s; + return s; + } + } + /** + * + * + *
+   * A textual description of the cause of the delay. The string can change
+   * without notice because it is often generated by another service (such as
+   * Compute Engine).
+   * 
+ * + * string cause = 1; + * + * @return The bytes for cause. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCauseBytes() { + java.lang.Object ref = cause_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cause_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRICS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList metrics_; + /** + * + * + *
+   * If the delay was caused by a resource shortage, this field lists the
+   * Compute Engine metrics that are preventing this operation from running
+   * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+   * known, a single `UNKNOWN` metric will be present.
+   * 
+ * + * repeated string metrics = 2; + * + * @return A list containing the metrics. + */ + public com.google.protobuf.ProtocolStringList getMetricsList() { + return metrics_; + } + /** + * + * + *
+   * If the delay was caused by a resource shortage, this field lists the
+   * Compute Engine metrics that are preventing this operation from running
+   * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+   * known, a single `UNKNOWN` metric will be present.
+   * 
+ * + * repeated string metrics = 2; + * + * @return The count of metrics. + */ + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+   * If the delay was caused by a resource shortage, this field lists the
+   * Compute Engine metrics that are preventing this operation from running
+   * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+   * known, a single `UNKNOWN` metric will be present.
+   * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the element to return. + * @return The metrics at the given index. + */ + public java.lang.String getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+   * If the delay was caused by a resource shortage, this field lists the
+   * Compute Engine metrics that are preventing this operation from running
+   * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+   * known, a single `UNKNOWN` metric will be present.
+   * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the value to return. + * @return The bytes of the metrics at the given index. + */ + public com.google.protobuf.ByteString getMetricsBytes(int index) { + return metrics_.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 (!getCauseBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cause_); + } + for (int i = 0; i < metrics_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metrics_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCauseBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cause_); + } + { + int dataSize = 0; + for (int i = 0; i < metrics_.size(); i++) { + dataSize += computeStringSizeNoTag(metrics_.getRaw(i)); + } + size += dataSize; + size += 1 * getMetricsList().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.lifesciences.v2beta.DelayedEvent)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.DelayedEvent other = + (com.google.cloud.lifesciences.v2beta.DelayedEvent) obj; + + if (!getCause().equals(other.getCause())) return false; + if (!getMetricsList().equals(other.getMetricsList())) 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) + CAUSE_FIELD_NUMBER; + hash = (53 * hash) + getCause().hashCode(); + if (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.DelayedEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.DelayedEvent 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.lifesciences.v2beta.DelayedEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.DelayedEvent parseFrom( + 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.lifesciences.v2beta.DelayedEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.DelayedEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.DelayedEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.DelayedEvent parseFrom( + java.io.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.lifesciences.v2beta.DelayedEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.DelayedEvent parseDelimitedFrom( + java.io.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.lifesciences.v2beta.DelayedEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.DelayedEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.DelayedEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event generated whenever a resource limitation or transient error
+   * delays execution of a pipeline that was otherwise ready to run.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.DelayedEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.DelayedEvent) + com.google.cloud.lifesciences.v2beta.DelayedEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_DelayedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_DelayedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.DelayedEvent.class, + com.google.cloud.lifesciences.v2beta.DelayedEvent.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.DelayedEvent.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(); + cause_ = ""; + + metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_DelayedEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.DelayedEvent getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.DelayedEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.DelayedEvent build() { + com.google.cloud.lifesciences.v2beta.DelayedEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.DelayedEvent buildPartial() { + com.google.cloud.lifesciences.v2beta.DelayedEvent result = + new com.google.cloud.lifesciences.v2beta.DelayedEvent(this); + int from_bitField0_ = bitField0_; + result.cause_ = cause_; + if (((bitField0_ & 0x00000001) != 0)) { + metrics_ = metrics_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.metrics_ = metrics_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.DelayedEvent) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.DelayedEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.DelayedEvent other) { + if (other == com.google.cloud.lifesciences.v2beta.DelayedEvent.getDefaultInstance()) + return this; + if (!other.getCause().isEmpty()) { + cause_ = other.cause_; + onChanged(); + } + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + 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.lifesciences.v2beta.DelayedEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.DelayedEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object cause_ = ""; + /** + * + * + *
+     * A textual description of the cause of the delay. The string can change
+     * without notice because it is often generated by another service (such as
+     * Compute Engine).
+     * 
+ * + * string cause = 1; + * + * @return The cause. + */ + public java.lang.String getCause() { + java.lang.Object ref = cause_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cause_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A textual description of the cause of the delay. The string can change
+     * without notice because it is often generated by another service (such as
+     * Compute Engine).
+     * 
+ * + * string cause = 1; + * + * @return The bytes for cause. + */ + public com.google.protobuf.ByteString getCauseBytes() { + java.lang.Object ref = cause_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cause_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A textual description of the cause of the delay. The string can change
+     * without notice because it is often generated by another service (such as
+     * Compute Engine).
+     * 
+ * + * string cause = 1; + * + * @param value The cause to set. + * @return This builder for chaining. + */ + public Builder setCause(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cause_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A textual description of the cause of the delay. The string can change
+     * without notice because it is often generated by another service (such as
+     * Compute Engine).
+     * 
+ * + * string cause = 1; + * + * @return This builder for chaining. + */ + public Builder clearCause() { + + cause_ = getDefaultInstance().getCause(); + onChanged(); + return this; + } + /** + * + * + *
+     * A textual description of the cause of the delay. The string can change
+     * without notice because it is often generated by another service (such as
+     * Compute Engine).
+     * 
+ * + * string cause = 1; + * + * @param value The bytes for cause to set. + * @return This builder for chaining. + */ + public Builder setCauseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cause_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList metrics_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + metrics_ = new com.google.protobuf.LazyStringArrayList(metrics_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * If the delay was caused by a resource shortage, this field lists the
+     * Compute Engine metrics that are preventing this operation from running
+     * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+     * known, a single `UNKNOWN` metric will be present.
+     * 
+ * + * repeated string metrics = 2; + * + * @return A list containing the metrics. + */ + public com.google.protobuf.ProtocolStringList getMetricsList() { + return metrics_.getUnmodifiableView(); + } + /** + * + * + *
+     * If the delay was caused by a resource shortage, this field lists the
+     * Compute Engine metrics that are preventing this operation from running
+     * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+     * known, a single `UNKNOWN` metric will be present.
+     * 
+ * + * repeated string metrics = 2; + * + * @return The count of metrics. + */ + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+     * If the delay was caused by a resource shortage, this field lists the
+     * Compute Engine metrics that are preventing this operation from running
+     * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+     * known, a single `UNKNOWN` metric will be present.
+     * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the element to return. + * @return The metrics at the given index. + */ + public java.lang.String getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+     * If the delay was caused by a resource shortage, this field lists the
+     * Compute Engine metrics that are preventing this operation from running
+     * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+     * known, a single `UNKNOWN` metric will be present.
+     * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the value to return. + * @return The bytes of the metrics at the given index. + */ + public com.google.protobuf.ByteString getMetricsBytes(int index) { + return metrics_.getByteString(index); + } + /** + * + * + *
+     * If the delay was caused by a resource shortage, this field lists the
+     * Compute Engine metrics that are preventing this operation from running
+     * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+     * known, a single `UNKNOWN` metric will be present.
+     * 
+ * + * repeated string metrics = 2; + * + * @param index The index to set the value at. + * @param value The metrics to set. + * @return This builder for chaining. + */ + public Builder setMetrics(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * If the delay was caused by a resource shortage, this field lists the
+     * Compute Engine metrics that are preventing this operation from running
+     * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+     * known, a single `UNKNOWN` metric will be present.
+     * 
+ * + * repeated string metrics = 2; + * + * @param value The metrics to add. + * @return This builder for chaining. + */ + public Builder addMetrics(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * If the delay was caused by a resource shortage, this field lists the
+     * Compute Engine metrics that are preventing this operation from running
+     * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+     * known, a single `UNKNOWN` metric will be present.
+     * 
+ * + * repeated string metrics = 2; + * + * @param values The metrics to add. + * @return This builder for chaining. + */ + public Builder addAllMetrics(java.lang.Iterable values) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + onChanged(); + return this; + } + /** + * + * + *
+     * If the delay was caused by a resource shortage, this field lists the
+     * Compute Engine metrics that are preventing this operation from running
+     * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+     * known, a single `UNKNOWN` metric will be present.
+     * 
+ * + * repeated string metrics = 2; + * + * @return This builder for chaining. + */ + public Builder clearMetrics() { + metrics_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * If the delay was caused by a resource shortage, this field lists the
+     * Compute Engine metrics that are preventing this operation from running
+     * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+     * known, a single `UNKNOWN` metric will be present.
+     * 
+ * + * repeated string metrics = 2; + * + * @param value The bytes of the metrics to add. + * @return This builder for chaining. + */ + public Builder addMetricsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMetricsIsMutable(); + metrics_.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.lifesciences.v2beta.DelayedEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.DelayedEvent) + private static final com.google.cloud.lifesciences.v2beta.DelayedEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.DelayedEvent(); + } + + public static com.google.cloud.lifesciences.v2beta.DelayedEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DelayedEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DelayedEvent(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.lifesciences.v2beta.DelayedEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DelayedEventOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DelayedEventOrBuilder.java new file mode 100644 index 00000000..50dda2e4 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DelayedEventOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface DelayedEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.DelayedEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A textual description of the cause of the delay. The string can change
+   * without notice because it is often generated by another service (such as
+   * Compute Engine).
+   * 
+ * + * string cause = 1; + * + * @return The cause. + */ + java.lang.String getCause(); + /** + * + * + *
+   * A textual description of the cause of the delay. The string can change
+   * without notice because it is often generated by another service (such as
+   * Compute Engine).
+   * 
+ * + * string cause = 1; + * + * @return The bytes for cause. + */ + com.google.protobuf.ByteString getCauseBytes(); + + /** + * + * + *
+   * If the delay was caused by a resource shortage, this field lists the
+   * Compute Engine metrics that are preventing this operation from running
+   * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+   * known, a single `UNKNOWN` metric will be present.
+   * 
+ * + * repeated string metrics = 2; + * + * @return A list containing the metrics. + */ + java.util.List getMetricsList(); + /** + * + * + *
+   * If the delay was caused by a resource shortage, this field lists the
+   * Compute Engine metrics that are preventing this operation from running
+   * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+   * known, a single `UNKNOWN` metric will be present.
+   * 
+ * + * repeated string metrics = 2; + * + * @return The count of metrics. + */ + int getMetricsCount(); + /** + * + * + *
+   * If the delay was caused by a resource shortage, this field lists the
+   * Compute Engine metrics that are preventing this operation from running
+   * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+   * known, a single `UNKNOWN` metric will be present.
+   * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the element to return. + * @return The metrics at the given index. + */ + java.lang.String getMetrics(int index); + /** + * + * + *
+   * If the delay was caused by a resource shortage, this field lists the
+   * Compute Engine metrics that are preventing this operation from running
+   * (for example, `CPUS` or `INSTANCES`). If the particular metric is not
+   * known, a single `UNKNOWN` metric will be present.
+   * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the value to return. + * @return The bytes of the metrics at the given index. + */ + com.google.protobuf.ByteString getMetricsBytes(int index); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Disk.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Disk.java new file mode 100644 index 00000000..53a89c87 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Disk.java @@ -0,0 +1,1124 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Carries information about a disk that can be attached to a VM.
+ * See https://cloud.google.com/compute/docs/disks/performance for more
+ * information about disk type, size, and performance considerations.
+ * Specify either [`Volume`][google.cloud.lifesciences.v2beta.Volume] or
+ * [`Disk`][google.cloud.lifesciences.v2beta.Disk], but not both.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Disk} + */ +public final class Disk extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.Disk) + DiskOrBuilder { + private static final long serialVersionUID = 0L; + // Use Disk.newBuilder() to construct. + private Disk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Disk() { + name_ = ""; + type_ = ""; + sourceImage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Disk(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Disk( + 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: + { + sizeGb_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceImage_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Disk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Disk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Disk.class, + com.google.cloud.lifesciences.v2beta.Disk.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * A user-supplied name for the disk. Used when mounting the disk into
+   * actions. The name must contain only upper and lowercase alphanumeric
+   * characters and hyphens and cannot start with a hyphen.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * A user-supplied name for the disk. Used when mounting the disk into
+   * actions. The name must contain only upper and lowercase alphanumeric
+   * characters and hyphens and cannot start with a hyphen.
+   * 
+ * + * 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 SIZE_GB_FIELD_NUMBER = 2; + private int sizeGb_; + /** + * + * + *
+   * The size, in GB, of the disk to attach. If the size is not
+   * specified, a default is chosen to ensure reasonable I/O performance.
+   * If the disk type is specified as `local-ssd`, multiple local drives are
+   * automatically combined to provide the requested size. Note, however, that
+   * each physical SSD is 375GB in size, and no more than 8 drives can be
+   * attached to a single instance.
+   * 
+ * + * int32 size_gb = 2; + * + * @return The sizeGb. + */ + @java.lang.Override + public int getSizeGb() { + return sizeGb_; + } + + public static final int TYPE_FIELD_NUMBER = 3; + private volatile java.lang.Object type_; + /** + * + * + *
+   * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_IMAGE_FIELD_NUMBER = 4; + private volatile java.lang.Object sourceImage_; + /** + * + * + *
+   * An optional image to put on the disk before attaching it to the VM.
+   * 
+ * + * string source_image = 4; + * + * @return The sourceImage. + */ + @java.lang.Override + public java.lang.String getSourceImage() { + java.lang.Object ref = sourceImage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceImage_ = s; + return s; + } + } + /** + * + * + *
+   * An optional image to put on the disk before attaching it to the VM.
+   * 
+ * + * string source_image = 4; + * + * @return The bytes for sourceImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceImageBytes() { + java.lang.Object ref = sourceImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceImage_ = 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 (sizeGb_ != 0) { + output.writeInt32(2, sizeGb_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); + } + if (!getSourceImageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sourceImage_); + } + 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 (sizeGb_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, sizeGb_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); + } + if (!getSourceImageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sourceImage_); + } + 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.lifesciences.v2beta.Disk)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.Disk other = + (com.google.cloud.lifesciences.v2beta.Disk) obj; + + if (!getName().equals(other.getName())) return false; + if (getSizeGb() != other.getSizeGb()) return false; + if (!getType().equals(other.getType())) return false; + if (!getSourceImage().equals(other.getSourceImage())) 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) + SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + getSizeGb(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + SOURCE_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getSourceImage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.Disk parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Disk 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.lifesciences.v2beta.Disk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Disk parseFrom( + 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.lifesciences.v2beta.Disk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Disk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.Disk parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Disk parseFrom( + java.io.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.lifesciences.v2beta.Disk parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Disk parseDelimitedFrom( + java.io.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.lifesciences.v2beta.Disk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Disk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.Disk prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Carries information about a disk that can be attached to a VM.
+   * See https://cloud.google.com/compute/docs/disks/performance for more
+   * information about disk type, size, and performance considerations.
+   * Specify either [`Volume`][google.cloud.lifesciences.v2beta.Volume] or
+   * [`Disk`][google.cloud.lifesciences.v2beta.Disk], but not both.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Disk} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.Disk) + com.google.cloud.lifesciences.v2beta.DiskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Disk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Disk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Disk.class, + com.google.cloud.lifesciences.v2beta.Disk.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.Disk.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_ = ""; + + sizeGb_ = 0; + + type_ = ""; + + sourceImage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Disk_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Disk getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.Disk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Disk build() { + com.google.cloud.lifesciences.v2beta.Disk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Disk buildPartial() { + com.google.cloud.lifesciences.v2beta.Disk result = + new com.google.cloud.lifesciences.v2beta.Disk(this); + result.name_ = name_; + result.sizeGb_ = sizeGb_; + result.type_ = type_; + result.sourceImage_ = sourceImage_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.Disk) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.Disk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.Disk other) { + if (other == com.google.cloud.lifesciences.v2beta.Disk.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getSizeGb() != 0) { + setSizeGb(other.getSizeGb()); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getSourceImage().isEmpty()) { + sourceImage_ = other.sourceImage_; + 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.lifesciences.v2beta.Disk parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.Disk) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * A user-supplied name for the disk. Used when mounting the disk into
+     * actions. The name must contain only upper and lowercase alphanumeric
+     * characters and hyphens and cannot start with a hyphen.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A user-supplied name for the disk. Used when mounting the disk into
+     * actions. The name must contain only upper and lowercase alphanumeric
+     * characters and hyphens and cannot start with a hyphen.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A user-supplied name for the disk. Used when mounting the disk into
+     * actions. The name must contain only upper and lowercase alphanumeric
+     * characters and hyphens and cannot start with a hyphen.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A user-supplied name for the disk. Used when mounting the disk into
+     * actions. The name must contain only upper and lowercase alphanumeric
+     * characters and hyphens and cannot start with a hyphen.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A user-supplied name for the disk. Used when mounting the disk into
+     * actions. The name must contain only upper and lowercase alphanumeric
+     * characters and hyphens and cannot start with a hyphen.
+     * 
+ * + * 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 int sizeGb_; + /** + * + * + *
+     * The size, in GB, of the disk to attach. If the size is not
+     * specified, a default is chosen to ensure reasonable I/O performance.
+     * If the disk type is specified as `local-ssd`, multiple local drives are
+     * automatically combined to provide the requested size. Note, however, that
+     * each physical SSD is 375GB in size, and no more than 8 drives can be
+     * attached to a single instance.
+     * 
+ * + * int32 size_gb = 2; + * + * @return The sizeGb. + */ + @java.lang.Override + public int getSizeGb() { + return sizeGb_; + } + /** + * + * + *
+     * The size, in GB, of the disk to attach. If the size is not
+     * specified, a default is chosen to ensure reasonable I/O performance.
+     * If the disk type is specified as `local-ssd`, multiple local drives are
+     * automatically combined to provide the requested size. Note, however, that
+     * each physical SSD is 375GB in size, and no more than 8 drives can be
+     * attached to a single instance.
+     * 
+ * + * int32 size_gb = 2; + * + * @param value The sizeGb to set. + * @return This builder for chaining. + */ + public Builder setSizeGb(int value) { + + sizeGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The size, in GB, of the disk to attach. If the size is not
+     * specified, a default is chosen to ensure reasonable I/O performance.
+     * If the disk type is specified as `local-ssd`, multiple local drives are
+     * automatically combined to provide the requested size. Note, however, that
+     * each physical SSD is 375GB in size, and no more than 8 drives can be
+     * attached to a single instance.
+     * 
+ * + * int32 size_gb = 2; + * + * @return This builder for chaining. + */ + public Builder clearSizeGb() { + + sizeGb_ = 0; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+     * 
+ * + * string type = 3; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+     * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+     * 
+ * + * string type = 3; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+     * 
+ * + * string type = 3; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+     * 
+ * + * string type = 3; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceImage_ = ""; + /** + * + * + *
+     * An optional image to put on the disk before attaching it to the VM.
+     * 
+ * + * string source_image = 4; + * + * @return The sourceImage. + */ + public java.lang.String getSourceImage() { + java.lang.Object ref = sourceImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An optional image to put on the disk before attaching it to the VM.
+     * 
+ * + * string source_image = 4; + * + * @return The bytes for sourceImage. + */ + public com.google.protobuf.ByteString getSourceImageBytes() { + java.lang.Object ref = sourceImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An optional image to put on the disk before attaching it to the VM.
+     * 
+ * + * string source_image = 4; + * + * @param value The sourceImage to set. + * @return This builder for chaining. + */ + public Builder setSourceImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceImage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An optional image to put on the disk before attaching it to the VM.
+     * 
+ * + * string source_image = 4; + * + * @return This builder for chaining. + */ + public Builder clearSourceImage() { + + sourceImage_ = getDefaultInstance().getSourceImage(); + onChanged(); + return this; + } + /** + * + * + *
+     * An optional image to put on the disk before attaching it to the VM.
+     * 
+ * + * string source_image = 4; + * + * @param value The bytes for sourceImage to set. + * @return This builder for chaining. + */ + public Builder setSourceImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceImage_ = 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.lifesciences.v2beta.Disk) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.Disk) + private static final com.google.cloud.lifesciences.v2beta.Disk DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.Disk(); + } + + public static com.google.cloud.lifesciences.v2beta.Disk getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Disk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Disk(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.lifesciences.v2beta.Disk getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DiskOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DiskOrBuilder.java new file mode 100644 index 00000000..70461605 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/DiskOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface DiskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.Disk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A user-supplied name for the disk. Used when mounting the disk into
+   * actions. The name must contain only upper and lowercase alphanumeric
+   * characters and hyphens and cannot start with a hyphen.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * A user-supplied name for the disk. Used when mounting the disk into
+   * actions. The name must contain only upper and lowercase alphanumeric
+   * characters and hyphens and cannot start with a hyphen.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The size, in GB, of the disk to attach. If the size is not
+   * specified, a default is chosen to ensure reasonable I/O performance.
+   * If the disk type is specified as `local-ssd`, multiple local drives are
+   * automatically combined to provide the requested size. Note, however, that
+   * each physical SSD is 375GB in size, and no more than 8 drives can be
+   * attached to a single instance.
+   * 
+ * + * int32 size_gb = 2; + * + * @return The sizeGb. + */ + int getSizeGb(); + + /** + * + * + *
+   * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * An optional image to put on the disk before attaching it to the VM.
+   * 
+ * + * string source_image = 4; + * + * @return The sourceImage. + */ + java.lang.String getSourceImage(); + /** + * + * + *
+   * An optional image to put on the disk before attaching it to the VM.
+   * 
+ * + * string source_image = 4; + * + * @return The bytes for sourceImage. + */ + com.google.protobuf.ByteString getSourceImageBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Event.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Event.java new file mode 100644 index 00000000..d4a822c2 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Event.java @@ -0,0 +1,4154 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Carries information about events that occur during pipeline execution.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Event} + */ +public final class Event extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.Event) + EventOrBuilder { + private static final long serialVersionUID = 0L; + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Event() { + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Event(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Event( + 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 (timestamp_ != null) { + subBuilder = timestamp_.toBuilder(); + } + timestamp_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timestamp_); + timestamp_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 138: + { + com.google.cloud.lifesciences.v2beta.DelayedEvent.Builder subBuilder = null; + if (detailsCase_ == 17) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.DelayedEvent) details_).toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.DelayedEvent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.lifesciences.v2beta.DelayedEvent) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 17; + break; + } + case 146: + { + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.Builder subBuilder = null; + if (detailsCase_ == 18) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 18; + break; + } + case 154: + { + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.Builder subBuilder = null; + if (detailsCase_ == 19) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 19; + break; + } + case 162: + { + com.google.cloud.lifesciences.v2beta.PullStartedEvent.Builder subBuilder = null; + if (detailsCase_ == 20) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.PullStartedEvent) details_).toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.PullStartedEvent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.lifesciences.v2beta.PullStartedEvent) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 20; + break; + } + case 170: + { + com.google.cloud.lifesciences.v2beta.PullStoppedEvent.Builder subBuilder = null; + if (detailsCase_ == 21) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.PullStoppedEvent) details_).toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.PullStoppedEvent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.lifesciences.v2beta.PullStoppedEvent) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 21; + break; + } + case 178: + { + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.Builder subBuilder = null; + if (detailsCase_ == 22) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 22; + break; + } + case 186: + { + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.Builder subBuilder = null; + if (detailsCase_ == 23) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 23; + break; + } + case 194: + { + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.Builder subBuilder = null; + if (detailsCase_ == 24) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 24; + break; + } + case 202: + { + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.Builder subBuilder = + null; + if (detailsCase_ == 25) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 25; + break; + } + case 210: + { + com.google.cloud.lifesciences.v2beta.FailedEvent.Builder subBuilder = null; + if (detailsCase_ == 26) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.FailedEvent) details_).toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.FailedEvent.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.lifesciences.v2beta.FailedEvent) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 26; + 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Event_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Event.class, + com.google.cloud.lifesciences.v2beta.Event.Builder.class); + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + + public enum DetailsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DELAYED(17), + WORKER_ASSIGNED(18), + WORKER_RELEASED(19), + PULL_STARTED(20), + PULL_STOPPED(21), + CONTAINER_STARTED(22), + CONTAINER_STOPPED(23), + CONTAINER_KILLED(24), + UNEXPECTED_EXIT_STATUS(25), + FAILED(26), + DETAILS_NOT_SET(0); + private final int value; + + private DetailsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DetailsCase valueOf(int value) { + return forNumber(value); + } + + public static DetailsCase forNumber(int value) { + switch (value) { + case 17: + return DELAYED; + case 18: + return WORKER_ASSIGNED; + case 19: + return WORKER_RELEASED; + case 20: + return PULL_STARTED; + case 21: + return PULL_STOPPED; + case 22: + return CONTAINER_STARTED; + case 23: + return CONTAINER_STOPPED; + case 24: + return CONTAINER_KILLED; + case 25: + return UNEXPECTED_EXIT_STATUS; + case 26: + return FAILED; + case 0: + return DETAILS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp timestamp_; + /** + * + * + *
+   * The time at which the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + /** + * + * + *
+   * The time at which the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + * + * + *
+   * The time at which the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * A human-readable description of the event. Note that these strings can
+   * change at any time without notice. Any application logic must use the
+   * information in the `details` field.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A human-readable description of the event. Note that these strings can
+   * change at any time without notice. Any application logic must use the
+   * information in the `details` field.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELAYED_FIELD_NUMBER = 17; + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + * + * @return Whether the delayed field is set. + */ + @java.lang.Override + public boolean hasDelayed() { + return detailsCase_ == 17; + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + * + * @return The delayed. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.DelayedEvent getDelayed() { + if (detailsCase_ == 17) { + return (com.google.cloud.lifesciences.v2beta.DelayedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.DelayedEvent.getDefaultInstance(); + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.DelayedEventOrBuilder getDelayedOrBuilder() { + if (detailsCase_ == 17) { + return (com.google.cloud.lifesciences.v2beta.DelayedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.DelayedEvent.getDefaultInstance(); + } + + public static final int WORKER_ASSIGNED_FIELD_NUMBER = 18; + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + * + * @return Whether the workerAssigned field is set. + */ + @java.lang.Override + public boolean hasWorkerAssigned() { + return detailsCase_ == 18; + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + * + * @return The workerAssigned. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent getWorkerAssigned() { + if (detailsCase_ == 18) { + return (com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.getDefaultInstance(); + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerAssignedEventOrBuilder + getWorkerAssignedOrBuilder() { + if (detailsCase_ == 18) { + return (com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.getDefaultInstance(); + } + + public static final int WORKER_RELEASED_FIELD_NUMBER = 19; + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + * + * @return Whether the workerReleased field is set. + */ + @java.lang.Override + public boolean hasWorkerReleased() { + return detailsCase_ == 19; + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + * + * @return The workerReleased. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent getWorkerReleased() { + if (detailsCase_ == 19) { + return (com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.getDefaultInstance(); + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerReleasedEventOrBuilder + getWorkerReleasedOrBuilder() { + if (detailsCase_ == 19) { + return (com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.getDefaultInstance(); + } + + public static final int PULL_STARTED_FIELD_NUMBER = 20; + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + * + * @return Whether the pullStarted field is set. + */ + @java.lang.Override + public boolean hasPullStarted() { + return detailsCase_ == 20; + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + * + * @return The pullStarted. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStartedEvent getPullStarted() { + if (detailsCase_ == 20) { + return (com.google.cloud.lifesciences.v2beta.PullStartedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.PullStartedEvent.getDefaultInstance(); + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStartedEventOrBuilder getPullStartedOrBuilder() { + if (detailsCase_ == 20) { + return (com.google.cloud.lifesciences.v2beta.PullStartedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.PullStartedEvent.getDefaultInstance(); + } + + public static final int PULL_STOPPED_FIELD_NUMBER = 21; + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + * + * @return Whether the pullStopped field is set. + */ + @java.lang.Override + public boolean hasPullStopped() { + return detailsCase_ == 21; + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + * + * @return The pullStopped. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStoppedEvent getPullStopped() { + if (detailsCase_ == 21) { + return (com.google.cloud.lifesciences.v2beta.PullStoppedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.PullStoppedEvent.getDefaultInstance(); + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStoppedEventOrBuilder getPullStoppedOrBuilder() { + if (detailsCase_ == 21) { + return (com.google.cloud.lifesciences.v2beta.PullStoppedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.PullStoppedEvent.getDefaultInstance(); + } + + public static final int CONTAINER_STARTED_FIELD_NUMBER = 22; + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + * + * @return Whether the containerStarted field is set. + */ + @java.lang.Override + public boolean hasContainerStarted() { + return detailsCase_ == 22; + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + * + * @return The containerStarted. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStartedEvent getContainerStarted() { + if (detailsCase_ == 22) { + return (com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.getDefaultInstance(); + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStartedEventOrBuilder + getContainerStartedOrBuilder() { + if (detailsCase_ == 22) { + return (com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.getDefaultInstance(); + } + + public static final int CONTAINER_STOPPED_FIELD_NUMBER = 23; + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + * + * @return Whether the containerStopped field is set. + */ + @java.lang.Override + public boolean hasContainerStopped() { + return detailsCase_ == 23; + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + * + * @return The containerStopped. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent getContainerStopped() { + if (detailsCase_ == 23) { + return (com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.getDefaultInstance(); + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStoppedEventOrBuilder + getContainerStoppedOrBuilder() { + if (detailsCase_ == 23) { + return (com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.getDefaultInstance(); + } + + public static final int CONTAINER_KILLED_FIELD_NUMBER = 24; + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + * + * @return Whether the containerKilled field is set. + */ + @java.lang.Override + public boolean hasContainerKilled() { + return detailsCase_ == 24; + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + * + * @return The containerKilled. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerKilledEvent getContainerKilled() { + if (detailsCase_ == 24) { + return (com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.getDefaultInstance(); + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerKilledEventOrBuilder + getContainerKilledOrBuilder() { + if (detailsCase_ == 24) { + return (com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.getDefaultInstance(); + } + + public static final int UNEXPECTED_EXIT_STATUS_FIELD_NUMBER = 25; + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + * + * @return Whether the unexpectedExitStatus field is set. + */ + @java.lang.Override + public boolean hasUnexpectedExitStatus() { + return detailsCase_ == 25; + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + * + * @return The unexpectedExitStatus. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent getUnexpectedExitStatus() { + if (detailsCase_ == 25) { + return (com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.getDefaultInstance(); + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEventOrBuilder + getUnexpectedExitStatusOrBuilder() { + if (detailsCase_ == 25) { + return (com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.getDefaultInstance(); + } + + public static final int FAILED_FIELD_NUMBER = 26; + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + * + * @return Whether the failed field is set. + */ + @java.lang.Override + public boolean hasFailed() { + return detailsCase_ == 26; + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + * + * @return The failed. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.FailedEvent getFailed() { + if (detailsCase_ == 26) { + return (com.google.cloud.lifesciences.v2beta.FailedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.FailedEvent.getDefaultInstance(); + } + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.FailedEventOrBuilder getFailedOrBuilder() { + if (detailsCase_ == 26) { + return (com.google.cloud.lifesciences.v2beta.FailedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.FailedEvent.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (timestamp_ != null) { + output.writeMessage(1, getTimestamp()); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (detailsCase_ == 17) { + output.writeMessage(17, (com.google.cloud.lifesciences.v2beta.DelayedEvent) details_); + } + if (detailsCase_ == 18) { + output.writeMessage(18, (com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) details_); + } + if (detailsCase_ == 19) { + output.writeMessage(19, (com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) details_); + } + if (detailsCase_ == 20) { + output.writeMessage(20, (com.google.cloud.lifesciences.v2beta.PullStartedEvent) details_); + } + if (detailsCase_ == 21) { + output.writeMessage(21, (com.google.cloud.lifesciences.v2beta.PullStoppedEvent) details_); + } + if (detailsCase_ == 22) { + output.writeMessage( + 22, (com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) details_); + } + if (detailsCase_ == 23) { + output.writeMessage( + 23, (com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) details_); + } + if (detailsCase_ == 24) { + output.writeMessage(24, (com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) details_); + } + if (detailsCase_ == 25) { + output.writeMessage( + 25, (com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) details_); + } + if (detailsCase_ == 26) { + output.writeMessage(26, (com.google.cloud.lifesciences.v2beta.FailedEvent) details_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimestamp()); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (detailsCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (com.google.cloud.lifesciences.v2beta.DelayedEvent) details_); + } + if (detailsCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, (com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) details_); + } + if (detailsCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, (com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) details_); + } + if (detailsCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.cloud.lifesciences.v2beta.PullStartedEvent) details_); + } + if (detailsCase_ == 21) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, (com.google.cloud.lifesciences.v2beta.PullStoppedEvent) details_); + } + if (detailsCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, (com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) details_); + } + if (detailsCase_ == 23) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 23, (com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) details_); + } + if (detailsCase_ == 24) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, (com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) details_); + } + if (detailsCase_ == 25) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 25, (com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) details_); + } + if (detailsCase_ == 26) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 26, (com.google.cloud.lifesciences.v2beta.FailedEvent) details_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.lifesciences.v2beta.Event)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.Event other = + (com.google.cloud.lifesciences.v2beta.Event) obj; + + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) return false; + } + if (!getDescription().equals(other.getDescription())) return false; + if (!getDetailsCase().equals(other.getDetailsCase())) return false; + switch (detailsCase_) { + case 17: + if (!getDelayed().equals(other.getDelayed())) return false; + break; + case 18: + if (!getWorkerAssigned().equals(other.getWorkerAssigned())) return false; + break; + case 19: + if (!getWorkerReleased().equals(other.getWorkerReleased())) return false; + break; + case 20: + if (!getPullStarted().equals(other.getPullStarted())) return false; + break; + case 21: + if (!getPullStopped().equals(other.getPullStopped())) return false; + break; + case 22: + if (!getContainerStarted().equals(other.getContainerStarted())) return false; + break; + case 23: + if (!getContainerStopped().equals(other.getContainerStopped())) return false; + break; + case 24: + if (!getContainerKilled().equals(other.getContainerKilled())) return false; + break; + case 25: + if (!getUnexpectedExitStatus().equals(other.getUnexpectedExitStatus())) return false; + break; + case 26: + if (!getFailed().equals(other.getFailed())) 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 (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + switch (detailsCase_) { + case 17: + hash = (37 * hash) + DELAYED_FIELD_NUMBER; + hash = (53 * hash) + getDelayed().hashCode(); + break; + case 18: + hash = (37 * hash) + WORKER_ASSIGNED_FIELD_NUMBER; + hash = (53 * hash) + getWorkerAssigned().hashCode(); + break; + case 19: + hash = (37 * hash) + WORKER_RELEASED_FIELD_NUMBER; + hash = (53 * hash) + getWorkerReleased().hashCode(); + break; + case 20: + hash = (37 * hash) + PULL_STARTED_FIELD_NUMBER; + hash = (53 * hash) + getPullStarted().hashCode(); + break; + case 21: + hash = (37 * hash) + PULL_STOPPED_FIELD_NUMBER; + hash = (53 * hash) + getPullStopped().hashCode(); + break; + case 22: + hash = (37 * hash) + CONTAINER_STARTED_FIELD_NUMBER; + hash = (53 * hash) + getContainerStarted().hashCode(); + break; + case 23: + hash = (37 * hash) + CONTAINER_STOPPED_FIELD_NUMBER; + hash = (53 * hash) + getContainerStopped().hashCode(); + break; + case 24: + hash = (37 * hash) + CONTAINER_KILLED_FIELD_NUMBER; + hash = (53 * hash) + getContainerKilled().hashCode(); + break; + case 25: + hash = (37 * hash) + UNEXPECTED_EXIT_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getUnexpectedExitStatus().hashCode(); + break; + case 26: + hash = (37 * hash) + FAILED_FIELD_NUMBER; + hash = (53 * hash) + getFailed().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.Event parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Event 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.lifesciences.v2beta.Event parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Event parseFrom( + 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.lifesciences.v2beta.Event parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Event parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.Event parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Event parseFrom( + java.io.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.lifesciences.v2beta.Event parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Event parseDelimitedFrom( + java.io.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.lifesciences.v2beta.Event parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Event parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.Event prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Carries information about events that occur during pipeline execution.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Event} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.Event) + com.google.cloud.lifesciences.v2beta.EventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Event_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Event.class, + com.google.cloud.lifesciences.v2beta.Event.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.Event.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 (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + description_ = ""; + + detailsCase_ = 0; + details_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Event_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Event getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.Event.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Event build() { + com.google.cloud.lifesciences.v2beta.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Event buildPartial() { + com.google.cloud.lifesciences.v2beta.Event result = + new com.google.cloud.lifesciences.v2beta.Event(this); + if (timestampBuilder_ == null) { + result.timestamp_ = timestamp_; + } else { + result.timestamp_ = timestampBuilder_.build(); + } + result.description_ = description_; + if (detailsCase_ == 17) { + if (delayedBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = delayedBuilder_.build(); + } + } + if (detailsCase_ == 18) { + if (workerAssignedBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = workerAssignedBuilder_.build(); + } + } + if (detailsCase_ == 19) { + if (workerReleasedBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = workerReleasedBuilder_.build(); + } + } + if (detailsCase_ == 20) { + if (pullStartedBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = pullStartedBuilder_.build(); + } + } + if (detailsCase_ == 21) { + if (pullStoppedBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = pullStoppedBuilder_.build(); + } + } + if (detailsCase_ == 22) { + if (containerStartedBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = containerStartedBuilder_.build(); + } + } + if (detailsCase_ == 23) { + if (containerStoppedBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = containerStoppedBuilder_.build(); + } + } + if (detailsCase_ == 24) { + if (containerKilledBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = containerKilledBuilder_.build(); + } + } + if (detailsCase_ == 25) { + if (unexpectedExitStatusBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = unexpectedExitStatusBuilder_.build(); + } + } + if (detailsCase_ == 26) { + if (failedBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = failedBuilder_.build(); + } + } + result.detailsCase_ = detailsCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.lifesciences.v2beta.Event) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.Event) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.Event other) { + if (other == com.google.cloud.lifesciences.v2beta.Event.getDefaultInstance()) return this; + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + switch (other.getDetailsCase()) { + case DELAYED: + { + mergeDelayed(other.getDelayed()); + break; + } + case WORKER_ASSIGNED: + { + mergeWorkerAssigned(other.getWorkerAssigned()); + break; + } + case WORKER_RELEASED: + { + mergeWorkerReleased(other.getWorkerReleased()); + break; + } + case PULL_STARTED: + { + mergePullStarted(other.getPullStarted()); + break; + } + case PULL_STOPPED: + { + mergePullStopped(other.getPullStopped()); + break; + } + case CONTAINER_STARTED: + { + mergeContainerStarted(other.getContainerStarted()); + break; + } + case CONTAINER_STOPPED: + { + mergeContainerStopped(other.getContainerStopped()); + break; + } + case CONTAINER_KILLED: + { + mergeContainerKilled(other.getContainerKilled()); + break; + } + case UNEXPECTED_EXIT_STATUS: + { + mergeUnexpectedExitStatus(other.getUnexpectedExitStatus()); + break; + } + case FAILED: + { + mergeFailed(other.getFailed()); + break; + } + case DETAILS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.lifesciences.v2beta.Event parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.Event) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public Builder clearDetails() { + detailsCase_ = 0; + details_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp timestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + timestampBuilder_; + /** + * + * + *
+     * The time at which the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + /** + * + * + *
+     * The time at which the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time at which the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time at which the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time at which the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = + com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time at which the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time at which the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { + + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + } + /** + * + * + *
+     * The time at which the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A human-readable description of the event. Note that these strings can
+     * change at any time without notice. Any application logic must use the
+     * information in the `details` field.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A human-readable description of the event. Note that these strings can
+     * change at any time without notice. Any application logic must use the
+     * information in the `details` field.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A human-readable description of the event. Note that these strings can
+     * change at any time without notice. Any application logic must use the
+     * information in the `details` field.
+     * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable description of the event. Note that these strings can
+     * change at any time without notice. Any application logic must use the
+     * information in the `details` field.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable description of the event. Note that these strings can
+     * change at any time without notice. Any application logic must use the
+     * information in the `details` field.
+     * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.DelayedEvent, + com.google.cloud.lifesciences.v2beta.DelayedEvent.Builder, + com.google.cloud.lifesciences.v2beta.DelayedEventOrBuilder> + delayedBuilder_; + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + * + * @return Whether the delayed field is set. + */ + @java.lang.Override + public boolean hasDelayed() { + return detailsCase_ == 17; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + * + * @return The delayed. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.DelayedEvent getDelayed() { + if (delayedBuilder_ == null) { + if (detailsCase_ == 17) { + return (com.google.cloud.lifesciences.v2beta.DelayedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.DelayedEvent.getDefaultInstance(); + } else { + if (detailsCase_ == 17) { + return delayedBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.DelayedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + */ + public Builder setDelayed(com.google.cloud.lifesciences.v2beta.DelayedEvent value) { + if (delayedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + delayedBuilder_.setMessage(value); + } + detailsCase_ = 17; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + */ + public Builder setDelayed( + com.google.cloud.lifesciences.v2beta.DelayedEvent.Builder builderForValue) { + if (delayedBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + delayedBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 17; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + */ + public Builder mergeDelayed(com.google.cloud.lifesciences.v2beta.DelayedEvent value) { + if (delayedBuilder_ == null) { + if (detailsCase_ == 17 + && details_ != com.google.cloud.lifesciences.v2beta.DelayedEvent.getDefaultInstance()) { + details_ = + com.google.cloud.lifesciences.v2beta.DelayedEvent.newBuilder( + (com.google.cloud.lifesciences.v2beta.DelayedEvent) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 17) { + delayedBuilder_.mergeFrom(value); + } + delayedBuilder_.setMessage(value); + } + detailsCase_ = 17; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + */ + public Builder clearDelayed() { + if (delayedBuilder_ == null) { + if (detailsCase_ == 17) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 17) { + detailsCase_ = 0; + details_ = null; + } + delayedBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + */ + public com.google.cloud.lifesciences.v2beta.DelayedEvent.Builder getDelayedBuilder() { + return getDelayedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.DelayedEventOrBuilder getDelayedOrBuilder() { + if ((detailsCase_ == 17) && (delayedBuilder_ != null)) { + return delayedBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 17) { + return (com.google.cloud.lifesciences.v2beta.DelayedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.DelayedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.DelayedEvent, + com.google.cloud.lifesciences.v2beta.DelayedEvent.Builder, + com.google.cloud.lifesciences.v2beta.DelayedEventOrBuilder> + getDelayedFieldBuilder() { + if (delayedBuilder_ == null) { + if (!(detailsCase_ == 17)) { + details_ = com.google.cloud.lifesciences.v2beta.DelayedEvent.getDefaultInstance(); + } + delayedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.DelayedEvent, + com.google.cloud.lifesciences.v2beta.DelayedEvent.Builder, + com.google.cloud.lifesciences.v2beta.DelayedEventOrBuilder>( + (com.google.cloud.lifesciences.v2beta.DelayedEvent) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 17; + onChanged(); + ; + return delayedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent, + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.Builder, + com.google.cloud.lifesciences.v2beta.WorkerAssignedEventOrBuilder> + workerAssignedBuilder_; + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + * + * @return Whether the workerAssigned field is set. + */ + @java.lang.Override + public boolean hasWorkerAssigned() { + return detailsCase_ == 18; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + * + * @return The workerAssigned. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent getWorkerAssigned() { + if (workerAssignedBuilder_ == null) { + if (detailsCase_ == 18) { + return (com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.getDefaultInstance(); + } else { + if (detailsCase_ == 18) { + return workerAssignedBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + */ + public Builder setWorkerAssigned( + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent value) { + if (workerAssignedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + workerAssignedBuilder_.setMessage(value); + } + detailsCase_ = 18; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + */ + public Builder setWorkerAssigned( + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.Builder builderForValue) { + if (workerAssignedBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + workerAssignedBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 18; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + */ + public Builder mergeWorkerAssigned( + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent value) { + if (workerAssignedBuilder_ == null) { + if (detailsCase_ == 18 + && details_ + != com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.getDefaultInstance()) { + details_ = + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.newBuilder( + (com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 18) { + workerAssignedBuilder_.mergeFrom(value); + } + workerAssignedBuilder_.setMessage(value); + } + detailsCase_ = 18; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + */ + public Builder clearWorkerAssigned() { + if (workerAssignedBuilder_ == null) { + if (detailsCase_ == 18) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 18) { + detailsCase_ = 0; + details_ = null; + } + workerAssignedBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + */ + public com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.Builder + getWorkerAssignedBuilder() { + return getWorkerAssignedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerAssignedEventOrBuilder + getWorkerAssignedOrBuilder() { + if ((detailsCase_ == 18) && (workerAssignedBuilder_ != null)) { + return workerAssignedBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 18) { + return (com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent, + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.Builder, + com.google.cloud.lifesciences.v2beta.WorkerAssignedEventOrBuilder> + getWorkerAssignedFieldBuilder() { + if (workerAssignedBuilder_ == null) { + if (!(detailsCase_ == 18)) { + details_ = com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.getDefaultInstance(); + } + workerAssignedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent, + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.Builder, + com.google.cloud.lifesciences.v2beta.WorkerAssignedEventOrBuilder>( + (com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 18; + onChanged(); + ; + return workerAssignedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent, + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.Builder, + com.google.cloud.lifesciences.v2beta.WorkerReleasedEventOrBuilder> + workerReleasedBuilder_; + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + * + * @return Whether the workerReleased field is set. + */ + @java.lang.Override + public boolean hasWorkerReleased() { + return detailsCase_ == 19; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + * + * @return The workerReleased. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent getWorkerReleased() { + if (workerReleasedBuilder_ == null) { + if (detailsCase_ == 19) { + return (com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.getDefaultInstance(); + } else { + if (detailsCase_ == 19) { + return workerReleasedBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + */ + public Builder setWorkerReleased( + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent value) { + if (workerReleasedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + workerReleasedBuilder_.setMessage(value); + } + detailsCase_ = 19; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + */ + public Builder setWorkerReleased( + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.Builder builderForValue) { + if (workerReleasedBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + workerReleasedBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 19; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + */ + public Builder mergeWorkerReleased( + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent value) { + if (workerReleasedBuilder_ == null) { + if (detailsCase_ == 19 + && details_ + != com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.getDefaultInstance()) { + details_ = + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.newBuilder( + (com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 19) { + workerReleasedBuilder_.mergeFrom(value); + } + workerReleasedBuilder_.setMessage(value); + } + detailsCase_ = 19; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + */ + public Builder clearWorkerReleased() { + if (workerReleasedBuilder_ == null) { + if (detailsCase_ == 19) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 19) { + detailsCase_ = 0; + details_ = null; + } + workerReleasedBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + */ + public com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.Builder + getWorkerReleasedBuilder() { + return getWorkerReleasedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerReleasedEventOrBuilder + getWorkerReleasedOrBuilder() { + if ((detailsCase_ == 19) && (workerReleasedBuilder_ != null)) { + return workerReleasedBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 19) { + return (com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent, + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.Builder, + com.google.cloud.lifesciences.v2beta.WorkerReleasedEventOrBuilder> + getWorkerReleasedFieldBuilder() { + if (workerReleasedBuilder_ == null) { + if (!(detailsCase_ == 19)) { + details_ = com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.getDefaultInstance(); + } + workerReleasedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent, + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.Builder, + com.google.cloud.lifesciences.v2beta.WorkerReleasedEventOrBuilder>( + (com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 19; + onChanged(); + ; + return workerReleasedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.PullStartedEvent, + com.google.cloud.lifesciences.v2beta.PullStartedEvent.Builder, + com.google.cloud.lifesciences.v2beta.PullStartedEventOrBuilder> + pullStartedBuilder_; + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + * + * @return Whether the pullStarted field is set. + */ + @java.lang.Override + public boolean hasPullStarted() { + return detailsCase_ == 20; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + * + * @return The pullStarted. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStartedEvent getPullStarted() { + if (pullStartedBuilder_ == null) { + if (detailsCase_ == 20) { + return (com.google.cloud.lifesciences.v2beta.PullStartedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.PullStartedEvent.getDefaultInstance(); + } else { + if (detailsCase_ == 20) { + return pullStartedBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.PullStartedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + */ + public Builder setPullStarted(com.google.cloud.lifesciences.v2beta.PullStartedEvent value) { + if (pullStartedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + pullStartedBuilder_.setMessage(value); + } + detailsCase_ = 20; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + */ + public Builder setPullStarted( + com.google.cloud.lifesciences.v2beta.PullStartedEvent.Builder builderForValue) { + if (pullStartedBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + pullStartedBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 20; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + */ + public Builder mergePullStarted(com.google.cloud.lifesciences.v2beta.PullStartedEvent value) { + if (pullStartedBuilder_ == null) { + if (detailsCase_ == 20 + && details_ + != com.google.cloud.lifesciences.v2beta.PullStartedEvent.getDefaultInstance()) { + details_ = + com.google.cloud.lifesciences.v2beta.PullStartedEvent.newBuilder( + (com.google.cloud.lifesciences.v2beta.PullStartedEvent) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 20) { + pullStartedBuilder_.mergeFrom(value); + } + pullStartedBuilder_.setMessage(value); + } + detailsCase_ = 20; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + */ + public Builder clearPullStarted() { + if (pullStartedBuilder_ == null) { + if (detailsCase_ == 20) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 20) { + detailsCase_ = 0; + details_ = null; + } + pullStartedBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + */ + public com.google.cloud.lifesciences.v2beta.PullStartedEvent.Builder getPullStartedBuilder() { + return getPullStartedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStartedEventOrBuilder + getPullStartedOrBuilder() { + if ((detailsCase_ == 20) && (pullStartedBuilder_ != null)) { + return pullStartedBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 20) { + return (com.google.cloud.lifesciences.v2beta.PullStartedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.PullStartedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.PullStartedEvent, + com.google.cloud.lifesciences.v2beta.PullStartedEvent.Builder, + com.google.cloud.lifesciences.v2beta.PullStartedEventOrBuilder> + getPullStartedFieldBuilder() { + if (pullStartedBuilder_ == null) { + if (!(detailsCase_ == 20)) { + details_ = com.google.cloud.lifesciences.v2beta.PullStartedEvent.getDefaultInstance(); + } + pullStartedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.PullStartedEvent, + com.google.cloud.lifesciences.v2beta.PullStartedEvent.Builder, + com.google.cloud.lifesciences.v2beta.PullStartedEventOrBuilder>( + (com.google.cloud.lifesciences.v2beta.PullStartedEvent) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 20; + onChanged(); + ; + return pullStartedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.PullStoppedEvent, + com.google.cloud.lifesciences.v2beta.PullStoppedEvent.Builder, + com.google.cloud.lifesciences.v2beta.PullStoppedEventOrBuilder> + pullStoppedBuilder_; + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + * + * @return Whether the pullStopped field is set. + */ + @java.lang.Override + public boolean hasPullStopped() { + return detailsCase_ == 21; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + * + * @return The pullStopped. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStoppedEvent getPullStopped() { + if (pullStoppedBuilder_ == null) { + if (detailsCase_ == 21) { + return (com.google.cloud.lifesciences.v2beta.PullStoppedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.PullStoppedEvent.getDefaultInstance(); + } else { + if (detailsCase_ == 21) { + return pullStoppedBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.PullStoppedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + */ + public Builder setPullStopped(com.google.cloud.lifesciences.v2beta.PullStoppedEvent value) { + if (pullStoppedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + pullStoppedBuilder_.setMessage(value); + } + detailsCase_ = 21; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + */ + public Builder setPullStopped( + com.google.cloud.lifesciences.v2beta.PullStoppedEvent.Builder builderForValue) { + if (pullStoppedBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + pullStoppedBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 21; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + */ + public Builder mergePullStopped(com.google.cloud.lifesciences.v2beta.PullStoppedEvent value) { + if (pullStoppedBuilder_ == null) { + if (detailsCase_ == 21 + && details_ + != com.google.cloud.lifesciences.v2beta.PullStoppedEvent.getDefaultInstance()) { + details_ = + com.google.cloud.lifesciences.v2beta.PullStoppedEvent.newBuilder( + (com.google.cloud.lifesciences.v2beta.PullStoppedEvent) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 21) { + pullStoppedBuilder_.mergeFrom(value); + } + pullStoppedBuilder_.setMessage(value); + } + detailsCase_ = 21; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + */ + public Builder clearPullStopped() { + if (pullStoppedBuilder_ == null) { + if (detailsCase_ == 21) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 21) { + detailsCase_ = 0; + details_ = null; + } + pullStoppedBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + */ + public com.google.cloud.lifesciences.v2beta.PullStoppedEvent.Builder getPullStoppedBuilder() { + return getPullStoppedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStoppedEventOrBuilder + getPullStoppedOrBuilder() { + if ((detailsCase_ == 21) && (pullStoppedBuilder_ != null)) { + return pullStoppedBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 21) { + return (com.google.cloud.lifesciences.v2beta.PullStoppedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.PullStoppedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.PullStoppedEvent, + com.google.cloud.lifesciences.v2beta.PullStoppedEvent.Builder, + com.google.cloud.lifesciences.v2beta.PullStoppedEventOrBuilder> + getPullStoppedFieldBuilder() { + if (pullStoppedBuilder_ == null) { + if (!(detailsCase_ == 21)) { + details_ = com.google.cloud.lifesciences.v2beta.PullStoppedEvent.getDefaultInstance(); + } + pullStoppedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.PullStoppedEvent, + com.google.cloud.lifesciences.v2beta.PullStoppedEvent.Builder, + com.google.cloud.lifesciences.v2beta.PullStoppedEventOrBuilder>( + (com.google.cloud.lifesciences.v2beta.PullStoppedEvent) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 21; + onChanged(); + ; + return pullStoppedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent, + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.Builder, + com.google.cloud.lifesciences.v2beta.ContainerStartedEventOrBuilder> + containerStartedBuilder_; + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + * + * @return Whether the containerStarted field is set. + */ + @java.lang.Override + public boolean hasContainerStarted() { + return detailsCase_ == 22; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + * + * @return The containerStarted. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStartedEvent getContainerStarted() { + if (containerStartedBuilder_ == null) { + if (detailsCase_ == 22) { + return (com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.getDefaultInstance(); + } else { + if (detailsCase_ == 22) { + return containerStartedBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + */ + public Builder setContainerStarted( + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent value) { + if (containerStartedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + containerStartedBuilder_.setMessage(value); + } + detailsCase_ = 22; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + */ + public Builder setContainerStarted( + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.Builder builderForValue) { + if (containerStartedBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + containerStartedBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 22; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + */ + public Builder mergeContainerStarted( + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent value) { + if (containerStartedBuilder_ == null) { + if (detailsCase_ == 22 + && details_ + != com.google.cloud.lifesciences.v2beta.ContainerStartedEvent + .getDefaultInstance()) { + details_ = + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.newBuilder( + (com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 22) { + containerStartedBuilder_.mergeFrom(value); + } + containerStartedBuilder_.setMessage(value); + } + detailsCase_ = 22; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + */ + public Builder clearContainerStarted() { + if (containerStartedBuilder_ == null) { + if (detailsCase_ == 22) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 22) { + detailsCase_ = 0; + details_ = null; + } + containerStartedBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + */ + public com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.Builder + getContainerStartedBuilder() { + return getContainerStartedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStartedEventOrBuilder + getContainerStartedOrBuilder() { + if ((detailsCase_ == 22) && (containerStartedBuilder_ != null)) { + return containerStartedBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 22) { + return (com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent, + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.Builder, + com.google.cloud.lifesciences.v2beta.ContainerStartedEventOrBuilder> + getContainerStartedFieldBuilder() { + if (containerStartedBuilder_ == null) { + if (!(detailsCase_ == 22)) { + details_ = + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.getDefaultInstance(); + } + containerStartedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent, + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent.Builder, + com.google.cloud.lifesciences.v2beta.ContainerStartedEventOrBuilder>( + (com.google.cloud.lifesciences.v2beta.ContainerStartedEvent) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 22; + onChanged(); + ; + return containerStartedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent, + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.Builder, + com.google.cloud.lifesciences.v2beta.ContainerStoppedEventOrBuilder> + containerStoppedBuilder_; + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + * + * @return Whether the containerStopped field is set. + */ + @java.lang.Override + public boolean hasContainerStopped() { + return detailsCase_ == 23; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + * + * @return The containerStopped. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent getContainerStopped() { + if (containerStoppedBuilder_ == null) { + if (detailsCase_ == 23) { + return (com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.getDefaultInstance(); + } else { + if (detailsCase_ == 23) { + return containerStoppedBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + */ + public Builder setContainerStopped( + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent value) { + if (containerStoppedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + containerStoppedBuilder_.setMessage(value); + } + detailsCase_ = 23; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + */ + public Builder setContainerStopped( + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.Builder builderForValue) { + if (containerStoppedBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + containerStoppedBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 23; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + */ + public Builder mergeContainerStopped( + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent value) { + if (containerStoppedBuilder_ == null) { + if (detailsCase_ == 23 + && details_ + != com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent + .getDefaultInstance()) { + details_ = + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.newBuilder( + (com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 23) { + containerStoppedBuilder_.mergeFrom(value); + } + containerStoppedBuilder_.setMessage(value); + } + detailsCase_ = 23; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + */ + public Builder clearContainerStopped() { + if (containerStoppedBuilder_ == null) { + if (detailsCase_ == 23) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 23) { + detailsCase_ = 0; + details_ = null; + } + containerStoppedBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + */ + public com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.Builder + getContainerStoppedBuilder() { + return getContainerStoppedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerStoppedEventOrBuilder + getContainerStoppedOrBuilder() { + if ((detailsCase_ == 23) && (containerStoppedBuilder_ != null)) { + return containerStoppedBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 23) { + return (com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent, + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.Builder, + com.google.cloud.lifesciences.v2beta.ContainerStoppedEventOrBuilder> + getContainerStoppedFieldBuilder() { + if (containerStoppedBuilder_ == null) { + if (!(detailsCase_ == 23)) { + details_ = + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.getDefaultInstance(); + } + containerStoppedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent, + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent.Builder, + com.google.cloud.lifesciences.v2beta.ContainerStoppedEventOrBuilder>( + (com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 23; + onChanged(); + ; + return containerStoppedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent, + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.Builder, + com.google.cloud.lifesciences.v2beta.ContainerKilledEventOrBuilder> + containerKilledBuilder_; + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + * + * @return Whether the containerKilled field is set. + */ + @java.lang.Override + public boolean hasContainerKilled() { + return detailsCase_ == 24; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + * + * @return The containerKilled. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerKilledEvent getContainerKilled() { + if (containerKilledBuilder_ == null) { + if (detailsCase_ == 24) { + return (com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.getDefaultInstance(); + } else { + if (detailsCase_ == 24) { + return containerKilledBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + */ + public Builder setContainerKilled( + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent value) { + if (containerKilledBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + containerKilledBuilder_.setMessage(value); + } + detailsCase_ = 24; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + */ + public Builder setContainerKilled( + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.Builder builderForValue) { + if (containerKilledBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + containerKilledBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 24; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + */ + public Builder mergeContainerKilled( + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent value) { + if (containerKilledBuilder_ == null) { + if (detailsCase_ == 24 + && details_ + != com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.getDefaultInstance()) { + details_ = + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.newBuilder( + (com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 24) { + containerKilledBuilder_.mergeFrom(value); + } + containerKilledBuilder_.setMessage(value); + } + detailsCase_ = 24; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + */ + public Builder clearContainerKilled() { + if (containerKilledBuilder_ == null) { + if (detailsCase_ == 24) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 24) { + detailsCase_ = 0; + details_ = null; + } + containerKilledBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + */ + public com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.Builder + getContainerKilledBuilder() { + return getContainerKilledFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ContainerKilledEventOrBuilder + getContainerKilledOrBuilder() { + if ((detailsCase_ == 24) && (containerKilledBuilder_ != null)) { + return containerKilledBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 24) { + return (com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent, + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.Builder, + com.google.cloud.lifesciences.v2beta.ContainerKilledEventOrBuilder> + getContainerKilledFieldBuilder() { + if (containerKilledBuilder_ == null) { + if (!(detailsCase_ == 24)) { + details_ = com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.getDefaultInstance(); + } + containerKilledBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent, + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent.Builder, + com.google.cloud.lifesciences.v2beta.ContainerKilledEventOrBuilder>( + (com.google.cloud.lifesciences.v2beta.ContainerKilledEvent) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 24; + onChanged(); + ; + return containerKilledBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent, + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.Builder, + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEventOrBuilder> + unexpectedExitStatusBuilder_; + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + * + * @return Whether the unexpectedExitStatus field is set. + */ + @java.lang.Override + public boolean hasUnexpectedExitStatus() { + return detailsCase_ == 25; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + * + * @return The unexpectedExitStatus. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent + getUnexpectedExitStatus() { + if (unexpectedExitStatusBuilder_ == null) { + if (detailsCase_ == 25) { + return (com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.getDefaultInstance(); + } else { + if (detailsCase_ == 25) { + return unexpectedExitStatusBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + */ + public Builder setUnexpectedExitStatus( + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent value) { + if (unexpectedExitStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + unexpectedExitStatusBuilder_.setMessage(value); + } + detailsCase_ = 25; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + */ + public Builder setUnexpectedExitStatus( + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.Builder builderForValue) { + if (unexpectedExitStatusBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + unexpectedExitStatusBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 25; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + */ + public Builder mergeUnexpectedExitStatus( + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent value) { + if (unexpectedExitStatusBuilder_ == null) { + if (detailsCase_ == 25 + && details_ + != com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent + .getDefaultInstance()) { + details_ = + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.newBuilder( + (com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 25) { + unexpectedExitStatusBuilder_.mergeFrom(value); + } + unexpectedExitStatusBuilder_.setMessage(value); + } + detailsCase_ = 25; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + */ + public Builder clearUnexpectedExitStatus() { + if (unexpectedExitStatusBuilder_ == null) { + if (detailsCase_ == 25) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 25) { + detailsCase_ = 0; + details_ = null; + } + unexpectedExitStatusBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + */ + public com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.Builder + getUnexpectedExitStatusBuilder() { + return getUnexpectedExitStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEventOrBuilder + getUnexpectedExitStatusOrBuilder() { + if ((detailsCase_ == 25) && (unexpectedExitStatusBuilder_ != null)) { + return unexpectedExitStatusBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 25) { + return (com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent, + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.Builder, + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEventOrBuilder> + getUnexpectedExitStatusFieldBuilder() { + if (unexpectedExitStatusBuilder_ == null) { + if (!(detailsCase_ == 25)) { + details_ = + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.getDefaultInstance(); + } + unexpectedExitStatusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent, + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.Builder, + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEventOrBuilder>( + (com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 25; + onChanged(); + ; + return unexpectedExitStatusBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.FailedEvent, + com.google.cloud.lifesciences.v2beta.FailedEvent.Builder, + com.google.cloud.lifesciences.v2beta.FailedEventOrBuilder> + failedBuilder_; + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + * + * @return Whether the failed field is set. + */ + @java.lang.Override + public boolean hasFailed() { + return detailsCase_ == 26; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + * + * @return The failed. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.FailedEvent getFailed() { + if (failedBuilder_ == null) { + if (detailsCase_ == 26) { + return (com.google.cloud.lifesciences.v2beta.FailedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.FailedEvent.getDefaultInstance(); + } else { + if (detailsCase_ == 26) { + return failedBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.FailedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + */ + public Builder setFailed(com.google.cloud.lifesciences.v2beta.FailedEvent value) { + if (failedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + failedBuilder_.setMessage(value); + } + detailsCase_ = 26; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + */ + public Builder setFailed( + com.google.cloud.lifesciences.v2beta.FailedEvent.Builder builderForValue) { + if (failedBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + failedBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 26; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + */ + public Builder mergeFailed(com.google.cloud.lifesciences.v2beta.FailedEvent value) { + if (failedBuilder_ == null) { + if (detailsCase_ == 26 + && details_ != com.google.cloud.lifesciences.v2beta.FailedEvent.getDefaultInstance()) { + details_ = + com.google.cloud.lifesciences.v2beta.FailedEvent.newBuilder( + (com.google.cloud.lifesciences.v2beta.FailedEvent) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 26) { + failedBuilder_.mergeFrom(value); + } + failedBuilder_.setMessage(value); + } + detailsCase_ = 26; + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + */ + public Builder clearFailed() { + if (failedBuilder_ == null) { + if (detailsCase_ == 26) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 26) { + detailsCase_ = 0; + details_ = null; + } + failedBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + */ + public com.google.cloud.lifesciences.v2beta.FailedEvent.Builder getFailedBuilder() { + return getFailedFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.FailedEventOrBuilder getFailedOrBuilder() { + if ((detailsCase_ == 26) && (failedBuilder_ != null)) { + return failedBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 26) { + return (com.google.cloud.lifesciences.v2beta.FailedEvent) details_; + } + return com.google.cloud.lifesciences.v2beta.FailedEvent.getDefaultInstance(); + } + } + /** + * + * + *
+     * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+     * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.FailedEvent, + com.google.cloud.lifesciences.v2beta.FailedEvent.Builder, + com.google.cloud.lifesciences.v2beta.FailedEventOrBuilder> + getFailedFieldBuilder() { + if (failedBuilder_ == null) { + if (!(detailsCase_ == 26)) { + details_ = com.google.cloud.lifesciences.v2beta.FailedEvent.getDefaultInstance(); + } + failedBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.FailedEvent, + com.google.cloud.lifesciences.v2beta.FailedEvent.Builder, + com.google.cloud.lifesciences.v2beta.FailedEventOrBuilder>( + (com.google.cloud.lifesciences.v2beta.FailedEvent) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 26; + onChanged(); + ; + return failedBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.lifesciences.v2beta.Event) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.Event) + private static final com.google.cloud.lifesciences.v2beta.Event DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.Event(); + } + + public static com.google.cloud.lifesciences.v2beta.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Event parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Event(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.lifesciences.v2beta.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/EventOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/EventOrBuilder.java new file mode 100644 index 00000000..06c97736 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/EventOrBuilder.java @@ -0,0 +1,447 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface EventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.Event) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time at which the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * + * + *
+   * The time at which the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + /** + * + * + *
+   * The time at which the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); + + /** + * + * + *
+   * A human-readable description of the event. Note that these strings can
+   * change at any time without notice. Any application logic must use the
+   * information in the `details` field.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A human-readable description of the event. Note that these strings can
+   * change at any time without notice. Any application logic must use the
+   * information in the `details` field.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + * + * @return Whether the delayed field is set. + */ + boolean hasDelayed(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + * + * @return The delayed. + */ + com.google.cloud.lifesciences.v2beta.DelayedEvent getDelayed(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.DelayedEvent delayed = 17; + */ + com.google.cloud.lifesciences.v2beta.DelayedEventOrBuilder getDelayedOrBuilder(); + + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + * + * @return Whether the workerAssigned field is set. + */ + boolean hasWorkerAssigned(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + * + * @return The workerAssigned. + */ + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent getWorkerAssigned(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerAssignedEvent worker_assigned = 18; + */ + com.google.cloud.lifesciences.v2beta.WorkerAssignedEventOrBuilder getWorkerAssignedOrBuilder(); + + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + * + * @return Whether the workerReleased field is set. + */ + boolean hasWorkerReleased(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + * + * @return The workerReleased. + */ + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent getWorkerReleased(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.WorkerReleasedEvent worker_released = 19; + */ + com.google.cloud.lifesciences.v2beta.WorkerReleasedEventOrBuilder getWorkerReleasedOrBuilder(); + + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + * + * @return Whether the pullStarted field is set. + */ + boolean hasPullStarted(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + * + * @return The pullStarted. + */ + com.google.cloud.lifesciences.v2beta.PullStartedEvent getPullStarted(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStartedEvent pull_started = 20; + */ + com.google.cloud.lifesciences.v2beta.PullStartedEventOrBuilder getPullStartedOrBuilder(); + + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + * + * @return Whether the pullStopped field is set. + */ + boolean hasPullStopped(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + * + * @return The pullStopped. + */ + com.google.cloud.lifesciences.v2beta.PullStoppedEvent getPullStopped(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PullStoppedEvent pull_stopped = 21; + */ + com.google.cloud.lifesciences.v2beta.PullStoppedEventOrBuilder getPullStoppedOrBuilder(); + + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + * + * @return Whether the containerStarted field is set. + */ + boolean hasContainerStarted(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + * + * @return The containerStarted. + */ + com.google.cloud.lifesciences.v2beta.ContainerStartedEvent getContainerStarted(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStartedEvent container_started = 22; + */ + com.google.cloud.lifesciences.v2beta.ContainerStartedEventOrBuilder + getContainerStartedOrBuilder(); + + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + * + * @return Whether the containerStopped field is set. + */ + boolean hasContainerStopped(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + * + * @return The containerStopped. + */ + com.google.cloud.lifesciences.v2beta.ContainerStoppedEvent getContainerStopped(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerStoppedEvent container_stopped = 23; + */ + com.google.cloud.lifesciences.v2beta.ContainerStoppedEventOrBuilder + getContainerStoppedOrBuilder(); + + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + * + * @return Whether the containerKilled field is set. + */ + boolean hasContainerKilled(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + * + * @return The containerKilled. + */ + com.google.cloud.lifesciences.v2beta.ContainerKilledEvent getContainerKilled(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ContainerKilledEvent container_killed = 24; + */ + com.google.cloud.lifesciences.v2beta.ContainerKilledEventOrBuilder getContainerKilledOrBuilder(); + + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + * + * @return Whether the unexpectedExitStatus field is set. + */ + boolean hasUnexpectedExitStatus(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + * + * @return The unexpectedExitStatus. + */ + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent getUnexpectedExitStatus(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent unexpected_exit_status = 25; + * + */ + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEventOrBuilder + getUnexpectedExitStatusOrBuilder(); + + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + * + * @return Whether the failed field is set. + */ + boolean hasFailed(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + * + * @return The failed. + */ + com.google.cloud.lifesciences.v2beta.FailedEvent getFailed(); + /** + * + * + *
+   * See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent].
+   * 
+ * + * .google.cloud.lifesciences.v2beta.FailedEvent failed = 26; + */ + com.google.cloud.lifesciences.v2beta.FailedEventOrBuilder getFailedOrBuilder(); + + public com.google.cloud.lifesciences.v2beta.Event.DetailsCase getDetailsCase(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ExistingDisk.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ExistingDisk.java new file mode 100644 index 00000000..e272dbc3 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ExistingDisk.java @@ -0,0 +1,692 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Configuration for an existing disk to be attached to the VM.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.ExistingDisk} + */ +public final class ExistingDisk extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.ExistingDisk) + ExistingDiskOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExistingDisk.newBuilder() to construct. + private ExistingDisk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExistingDisk() { + disk_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExistingDisk(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExistingDisk( + 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(); + + disk_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ExistingDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ExistingDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.ExistingDisk.class, + com.google.cloud.lifesciences.v2beta.ExistingDisk.Builder.class); + } + + public static final int DISK_FIELD_NUMBER = 1; + private volatile java.lang.Object disk_; + /** + * + * + *
+   * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is
+   * a complete URL for the disk.  If `disk` does not contain slashes, the Cloud
+   * Life Sciences API assumes that the disk is a zonal disk and a URL will be
+   * generated of the form `zones/<zone>/disks/<disk>`, where `<zone>` is the
+   * zone in which the instance is allocated. The disk must be ext4 formatted.
+   * If all `Mount` references to this disk have the `read_only` flag set to
+   * true, the disk will be attached in `read-only` mode and can be shared with
+   * other instances. Otherwise, the disk will be available for writing but
+   * cannot be shared.
+   * 
+ * + * string disk = 1; + * + * @return The disk. + */ + @java.lang.Override + public java.lang.String getDisk() { + java.lang.Object ref = disk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + disk_ = s; + return s; + } + } + /** + * + * + *
+   * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is
+   * a complete URL for the disk.  If `disk` does not contain slashes, the Cloud
+   * Life Sciences API assumes that the disk is a zonal disk and a URL will be
+   * generated of the form `zones/<zone>/disks/<disk>`, where `<zone>` is the
+   * zone in which the instance is allocated. The disk must be ext4 formatted.
+   * If all `Mount` references to this disk have the `read_only` flag set to
+   * true, the disk will be attached in `read-only` mode and can be shared with
+   * other instances. Otherwise, the disk will be available for writing but
+   * cannot be shared.
+   * 
+ * + * string disk = 1; + * + * @return The bytes for disk. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDiskBytes() { + java.lang.Object ref = disk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + disk_ = 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 (!getDiskBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, disk_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDiskBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, disk_); + } + 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.lifesciences.v2beta.ExistingDisk)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.ExistingDisk other = + (com.google.cloud.lifesciences.v2beta.ExistingDisk) obj; + + if (!getDisk().equals(other.getDisk())) 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) + DISK_FIELD_NUMBER; + hash = (53 * hash) + getDisk().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.ExistingDisk parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ExistingDisk 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.lifesciences.v2beta.ExistingDisk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ExistingDisk parseFrom( + 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.lifesciences.v2beta.ExistingDisk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ExistingDisk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.ExistingDisk parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ExistingDisk parseFrom( + java.io.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.lifesciences.v2beta.ExistingDisk parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ExistingDisk parseDelimitedFrom( + java.io.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.lifesciences.v2beta.ExistingDisk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ExistingDisk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.ExistingDisk prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 for an existing disk to be attached to the VM.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.ExistingDisk} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.ExistingDisk) + com.google.cloud.lifesciences.v2beta.ExistingDiskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ExistingDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ExistingDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.ExistingDisk.class, + com.google.cloud.lifesciences.v2beta.ExistingDisk.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.ExistingDisk.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(); + disk_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ExistingDisk_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ExistingDisk getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.ExistingDisk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ExistingDisk build() { + com.google.cloud.lifesciences.v2beta.ExistingDisk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ExistingDisk buildPartial() { + com.google.cloud.lifesciences.v2beta.ExistingDisk result = + new com.google.cloud.lifesciences.v2beta.ExistingDisk(this); + result.disk_ = disk_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.ExistingDisk) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.ExistingDisk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.ExistingDisk other) { + if (other == com.google.cloud.lifesciences.v2beta.ExistingDisk.getDefaultInstance()) + return this; + if (!other.getDisk().isEmpty()) { + disk_ = other.disk_; + 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.lifesciences.v2beta.ExistingDisk parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.ExistingDisk) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object disk_ = ""; + /** + * + * + *
+     * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is
+     * a complete URL for the disk.  If `disk` does not contain slashes, the Cloud
+     * Life Sciences API assumes that the disk is a zonal disk and a URL will be
+     * generated of the form `zones/<zone>/disks/<disk>`, where `<zone>` is the
+     * zone in which the instance is allocated. The disk must be ext4 formatted.
+     * If all `Mount` references to this disk have the `read_only` flag set to
+     * true, the disk will be attached in `read-only` mode and can be shared with
+     * other instances. Otherwise, the disk will be available for writing but
+     * cannot be shared.
+     * 
+ * + * string disk = 1; + * + * @return The disk. + */ + public java.lang.String getDisk() { + java.lang.Object ref = disk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + disk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is
+     * a complete URL for the disk.  If `disk` does not contain slashes, the Cloud
+     * Life Sciences API assumes that the disk is a zonal disk and a URL will be
+     * generated of the form `zones/<zone>/disks/<disk>`, where `<zone>` is the
+     * zone in which the instance is allocated. The disk must be ext4 formatted.
+     * If all `Mount` references to this disk have the `read_only` flag set to
+     * true, the disk will be attached in `read-only` mode and can be shared with
+     * other instances. Otherwise, the disk will be available for writing but
+     * cannot be shared.
+     * 
+ * + * string disk = 1; + * + * @return The bytes for disk. + */ + public com.google.protobuf.ByteString getDiskBytes() { + java.lang.Object ref = disk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + disk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is
+     * a complete URL for the disk.  If `disk` does not contain slashes, the Cloud
+     * Life Sciences API assumes that the disk is a zonal disk and a URL will be
+     * generated of the form `zones/<zone>/disks/<disk>`, where `<zone>` is the
+     * zone in which the instance is allocated. The disk must be ext4 formatted.
+     * If all `Mount` references to this disk have the `read_only` flag set to
+     * true, the disk will be attached in `read-only` mode and can be shared with
+     * other instances. Otherwise, the disk will be available for writing but
+     * cannot be shared.
+     * 
+ * + * string disk = 1; + * + * @param value The disk to set. + * @return This builder for chaining. + */ + public Builder setDisk(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + disk_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is
+     * a complete URL for the disk.  If `disk` does not contain slashes, the Cloud
+     * Life Sciences API assumes that the disk is a zonal disk and a URL will be
+     * generated of the form `zones/<zone>/disks/<disk>`, where `<zone>` is the
+     * zone in which the instance is allocated. The disk must be ext4 formatted.
+     * If all `Mount` references to this disk have the `read_only` flag set to
+     * true, the disk will be attached in `read-only` mode and can be shared with
+     * other instances. Otherwise, the disk will be available for writing but
+     * cannot be shared.
+     * 
+ * + * string disk = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisk() { + + disk_ = getDefaultInstance().getDisk(); + onChanged(); + return this; + } + /** + * + * + *
+     * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is
+     * a complete URL for the disk.  If `disk` does not contain slashes, the Cloud
+     * Life Sciences API assumes that the disk is a zonal disk and a URL will be
+     * generated of the form `zones/<zone>/disks/<disk>`, where `<zone>` is the
+     * zone in which the instance is allocated. The disk must be ext4 formatted.
+     * If all `Mount` references to this disk have the `read_only` flag set to
+     * true, the disk will be attached in `read-only` mode and can be shared with
+     * other instances. Otherwise, the disk will be available for writing but
+     * cannot be shared.
+     * 
+ * + * string disk = 1; + * + * @param value The bytes for disk to set. + * @return This builder for chaining. + */ + public Builder setDiskBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + disk_ = 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.lifesciences.v2beta.ExistingDisk) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.ExistingDisk) + private static final com.google.cloud.lifesciences.v2beta.ExistingDisk DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.ExistingDisk(); + } + + public static com.google.cloud.lifesciences.v2beta.ExistingDisk getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExistingDisk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExistingDisk(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.lifesciences.v2beta.ExistingDisk getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ExistingDiskOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ExistingDiskOrBuilder.java new file mode 100644 index 00000000..f4622fb8 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ExistingDiskOrBuilder.java @@ -0,0 +1,66 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface ExistingDiskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.ExistingDisk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is
+   * a complete URL for the disk.  If `disk` does not contain slashes, the Cloud
+   * Life Sciences API assumes that the disk is a zonal disk and a URL will be
+   * generated of the form `zones/<zone>/disks/<disk>`, where `<zone>` is the
+   * zone in which the instance is allocated. The disk must be ext4 formatted.
+   * If all `Mount` references to this disk have the `read_only` flag set to
+   * true, the disk will be attached in `read-only` mode and can be shared with
+   * other instances. Otherwise, the disk will be available for writing but
+   * cannot be shared.
+   * 
+ * + * string disk = 1; + * + * @return The disk. + */ + java.lang.String getDisk(); + /** + * + * + *
+   * If `disk` contains slashes, the Cloud Life Sciences API assumes that it is
+   * a complete URL for the disk.  If `disk` does not contain slashes, the Cloud
+   * Life Sciences API assumes that the disk is a zonal disk and a URL will be
+   * generated of the form `zones/<zone>/disks/<disk>`, where `<zone>` is the
+   * zone in which the instance is allocated. The disk must be ext4 formatted.
+   * If all `Mount` references to this disk have the `read_only` flag set to
+   * true, the disk will be attached in `read-only` mode and can be shared with
+   * other instances. Otherwise, the disk will be available for writing but
+   * cannot be shared.
+   * 
+ * + * string disk = 1; + * + * @return The bytes for disk. + */ + com.google.protobuf.ByteString getDiskBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/FailedEvent.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/FailedEvent.java new file mode 100644 index 00000000..f215c734 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/FailedEvent.java @@ -0,0 +1,785 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * An event generated when the execution of a pipeline has failed. Note
+ * that other events can continue to occur after this event.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.FailedEvent} + */ +public final class FailedEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.FailedEvent) + FailedEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use FailedEvent.newBuilder() to construct. + private FailedEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FailedEvent() { + code_ = 0; + cause_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FailedEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FailedEvent( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + code_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + cause_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_FailedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_FailedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.FailedEvent.class, + com.google.cloud.lifesciences.v2beta.FailedEvent.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_; + /** + * + * + *
+   * The Google standard error code that best describes this failure.
+   * 
+ * + * .google.rpc.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; + } + /** + * + * + *
+   * The Google standard error code that best describes this failure.
+   * 
+ * + * .google.rpc.Code code = 1; + * + * @return The code. + */ + @java.lang.Override + public com.google.rpc.Code getCode() { + @SuppressWarnings("deprecation") + com.google.rpc.Code result = com.google.rpc.Code.valueOf(code_); + return result == null ? com.google.rpc.Code.UNRECOGNIZED : result; + } + + public static final int CAUSE_FIELD_NUMBER = 2; + private volatile java.lang.Object cause_; + /** + * + * + *
+   * The human-readable description of the cause of the failure.
+   * 
+ * + * string cause = 2; + * + * @return The cause. + */ + @java.lang.Override + public java.lang.String getCause() { + java.lang.Object ref = cause_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cause_ = s; + return s; + } + } + /** + * + * + *
+   * The human-readable description of the cause of the failure.
+   * 
+ * + * string cause = 2; + * + * @return The bytes for cause. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCauseBytes() { + java.lang.Object ref = cause_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cause_ = 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 (code_ != com.google.rpc.Code.OK.getNumber()) { + output.writeEnum(1, code_); + } + if (!getCauseBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cause_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != com.google.rpc.Code.OK.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, code_); + } + if (!getCauseBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cause_); + } + 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.lifesciences.v2beta.FailedEvent)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.FailedEvent other = + (com.google.cloud.lifesciences.v2beta.FailedEvent) obj; + + if (code_ != other.code_) return false; + if (!getCause().equals(other.getCause())) 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) + CODE_FIELD_NUMBER; + hash = (53 * hash) + code_; + hash = (37 * hash) + CAUSE_FIELD_NUMBER; + hash = (53 * hash) + getCause().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.FailedEvent parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.FailedEvent 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.lifesciences.v2beta.FailedEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.FailedEvent parseFrom( + 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.lifesciences.v2beta.FailedEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.FailedEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.FailedEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.FailedEvent parseFrom( + java.io.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.lifesciences.v2beta.FailedEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.FailedEvent parseDelimitedFrom( + java.io.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.lifesciences.v2beta.FailedEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.FailedEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.FailedEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event generated when the execution of a pipeline has failed. Note
+   * that other events can continue to occur after this event.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.FailedEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.FailedEvent) + com.google.cloud.lifesciences.v2beta.FailedEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_FailedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_FailedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.FailedEvent.class, + com.google.cloud.lifesciences.v2beta.FailedEvent.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.FailedEvent.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(); + code_ = 0; + + cause_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_FailedEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.FailedEvent getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.FailedEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.FailedEvent build() { + com.google.cloud.lifesciences.v2beta.FailedEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.FailedEvent buildPartial() { + com.google.cloud.lifesciences.v2beta.FailedEvent result = + new com.google.cloud.lifesciences.v2beta.FailedEvent(this); + result.code_ = code_; + result.cause_ = cause_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.FailedEvent) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.FailedEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.FailedEvent other) { + if (other == com.google.cloud.lifesciences.v2beta.FailedEvent.getDefaultInstance()) + return this; + if (other.code_ != 0) { + setCodeValue(other.getCodeValue()); + } + if (!other.getCause().isEmpty()) { + cause_ = other.cause_; + 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.lifesciences.v2beta.FailedEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.FailedEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int code_ = 0; + /** + * + * + *
+     * The Google standard error code that best describes this failure.
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; + } + /** + * + * + *
+     * The Google standard error code that best describes this failure.
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @param value The enum numeric value on the wire for code to set. + * @return This builder for chaining. + */ + public Builder setCodeValue(int value) { + + code_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Google standard error code that best describes this failure.
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @return The code. + */ + @java.lang.Override + public com.google.rpc.Code getCode() { + @SuppressWarnings("deprecation") + com.google.rpc.Code result = com.google.rpc.Code.valueOf(code_); + return result == null ? com.google.rpc.Code.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The Google standard error code that best describes this failure.
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(com.google.rpc.Code value) { + if (value == null) { + throw new NullPointerException(); + } + + code_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google standard error code that best describes this failure.
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object cause_ = ""; + /** + * + * + *
+     * The human-readable description of the cause of the failure.
+     * 
+ * + * string cause = 2; + * + * @return The cause. + */ + public java.lang.String getCause() { + java.lang.Object ref = cause_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cause_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The human-readable description of the cause of the failure.
+     * 
+ * + * string cause = 2; + * + * @return The bytes for cause. + */ + public com.google.protobuf.ByteString getCauseBytes() { + java.lang.Object ref = cause_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cause_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The human-readable description of the cause of the failure.
+     * 
+ * + * string cause = 2; + * + * @param value The cause to set. + * @return This builder for chaining. + */ + public Builder setCause(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cause_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable description of the cause of the failure.
+     * 
+ * + * string cause = 2; + * + * @return This builder for chaining. + */ + public Builder clearCause() { + + cause_ = getDefaultInstance().getCause(); + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable description of the cause of the failure.
+     * 
+ * + * string cause = 2; + * + * @param value The bytes for cause to set. + * @return This builder for chaining. + */ + public Builder setCauseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cause_ = 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.lifesciences.v2beta.FailedEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.FailedEvent) + private static final com.google.cloud.lifesciences.v2beta.FailedEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.FailedEvent(); + } + + public static com.google.cloud.lifesciences.v2beta.FailedEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FailedEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FailedEvent(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.lifesciences.v2beta.FailedEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/FailedEventOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/FailedEventOrBuilder.java new file mode 100644 index 00000000..57ca4e65 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/FailedEventOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface FailedEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.FailedEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Google standard error code that best describes this failure.
+   * 
+ * + * .google.rpc.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + int getCodeValue(); + /** + * + * + *
+   * The Google standard error code that best describes this failure.
+   * 
+ * + * .google.rpc.Code code = 1; + * + * @return The code. + */ + com.google.rpc.Code getCode(); + + /** + * + * + *
+   * The human-readable description of the cause of the failure.
+   * 
+ * + * string cause = 2; + * + * @return The cause. + */ + java.lang.String getCause(); + /** + * + * + *
+   * The human-readable description of the cause of the failure.
+   * 
+ * + * string cause = 2; + * + * @return The bytes for cause. + */ + com.google.protobuf.ByteString getCauseBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Metadata.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Metadata.java new file mode 100644 index 00000000..c3c81287 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Metadata.java @@ -0,0 +1,2564 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Carries information about the pipeline execution that is returned
+ * in the long running operation's metadata field.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Metadata} + */ +public final class Metadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.Metadata) + MetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use Metadata.newBuilder() to construct. + private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Metadata() { + events_ = java.util.Collections.emptyList(); + pubSubTopic_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Metadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Metadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.lifesciences.v2beta.Pipeline.Builder subBuilder = null; + if (pipeline_ != null) { + subBuilder = pipeline_.toBuilder(); + } + pipeline_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.Pipeline.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(pipeline_); + pipeline_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + events_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + events_.add( + input.readMessage( + com.google.cloud.lifesciences.v2beta.Event.parser(), extensionRegistry)); + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + 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 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + pubSubTopic_ = 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_ & 0x00000002) != 0)) { + events_ = java.util.Collections.unmodifiableList(events_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Metadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Metadata.class, + com.google.cloud.lifesciences.v2beta.Metadata.Builder.class); + } + + public static final int PIPELINE_FIELD_NUMBER = 1; + private com.google.cloud.lifesciences.v2beta.Pipeline pipeline_; + /** + * + * + *
+   * The pipeline this operation represents.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + * + * @return Whether the pipeline field is set. + */ + @java.lang.Override + public boolean hasPipeline() { + return pipeline_ != null; + } + /** + * + * + *
+   * The pipeline this operation represents.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + * + * @return The pipeline. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Pipeline getPipeline() { + return pipeline_ == null + ? com.google.cloud.lifesciences.v2beta.Pipeline.getDefaultInstance() + : pipeline_; + } + /** + * + * + *
+   * The pipeline this operation represents.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PipelineOrBuilder getPipelineOrBuilder() { + return getPipeline(); + } + + public static final int LABELS_FIELD_NUMBER = 2; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Metadata_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(); + } + /** + * + * + *
+   * The user-defined labels associated with this operation.
+   * 
+ * + * map<string, string> labels = 2; + */ + @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(); + } + /** + * + * + *
+   * The user-defined labels associated with this operation.
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The user-defined labels associated with this operation.
+   * 
+ * + * map<string, string> labels = 2; + */ + @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; + } + /** + * + * + *
+   * The user-defined labels associated with this operation.
+   * 
+ * + * map<string, string> labels = 2; + */ + @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 EVENTS_FIELD_NUMBER = 3; + private java.util.List events_; + /** + * + * + *
+   * The list of events that have happened so far during the execution of this
+   * operation.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + @java.lang.Override + public java.util.List getEventsList() { + return events_; + } + /** + * + * + *
+   * The list of events that have happened so far during the execution of this
+   * operation.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + @java.lang.Override + public java.util.List + getEventsOrBuilderList() { + return events_; + } + /** + * + * + *
+   * The list of events that have happened so far during the execution of this
+   * operation.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + @java.lang.Override + public int getEventsCount() { + return events_.size(); + } + /** + * + * + *
+   * The list of events that have happened so far during the execution of this
+   * operation.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Event getEvents(int index) { + return events_.get(index); + } + /** + * + * + *
+   * The list of events that have happened so far during the execution of this
+   * operation.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.EventOrBuilder getEventsOrBuilder(int index) { + return events_.get(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time at which the operation was created by the API.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The time at which the operation was created by the API.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time at which the operation was created by the API.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int START_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The first time at which resources were allocated to execute the pipeline.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * The first time at which resources were allocated to execute the pipeline.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The first time at which resources were allocated to execute the pipeline.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time at which execution was completed and resources were cleaned up.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time at which execution was completed and resources were cleaned up.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time at which execution was completed and resources were cleaned up.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int PUB_SUB_TOPIC_FIELD_NUMBER = 7; + private volatile java.lang.Object pubSubTopic_; + /** + * + * + *
+   * The name of the Cloud Pub/Sub topic where notifications of operation status
+   * changes are sent.
+   * 
+ * + * string pub_sub_topic = 7; + * + * @return The pubSubTopic. + */ + @java.lang.Override + public java.lang.String getPubSubTopic() { + java.lang.Object ref = pubSubTopic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pubSubTopic_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the Cloud Pub/Sub topic where notifications of operation status
+   * changes are sent.
+   * 
+ * + * string pub_sub_topic = 7; + * + * @return The bytes for pubSubTopic. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPubSubTopicBytes() { + java.lang.Object ref = pubSubTopic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pubSubTopic_ = 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 (pipeline_ != null) { + output.writeMessage(1, getPipeline()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); + for (int i = 0; i < events_.size(); i++) { + output.writeMessage(3, events_.get(i)); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(5, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(6, getEndTime()); + } + if (!getPubSubTopicBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pubSubTopic_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pipeline_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPipeline()); + } + 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(2, labels__); + } + for (int i = 0; i < events_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, events_.get(i)); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTime()); + } + if (!getPubSubTopicBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pubSubTopic_); + } + 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.lifesciences.v2beta.Metadata)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.Metadata other = + (com.google.cloud.lifesciences.v2beta.Metadata) obj; + + if (hasPipeline() != other.hasPipeline()) return false; + if (hasPipeline()) { + if (!getPipeline().equals(other.getPipeline())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getEventsList().equals(other.getEventsList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getPubSubTopic().equals(other.getPubSubTopic())) 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 (hasPipeline()) { + hash = (37 * hash) + PIPELINE_FIELD_NUMBER; + hash = (53 * hash) + getPipeline().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (getEventsCount() > 0) { + hash = (37 * hash) + EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getEventsList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + PUB_SUB_TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getPubSubTopic().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.Metadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Metadata 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.lifesciences.v2beta.Metadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Metadata parseFrom( + 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.lifesciences.v2beta.Metadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Metadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.Metadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Metadata parseFrom( + java.io.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.lifesciences.v2beta.Metadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Metadata parseDelimitedFrom( + java.io.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.lifesciences.v2beta.Metadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Metadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.Metadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Carries information about the pipeline execution that is returned
+   * in the long running operation's metadata field.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Metadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.Metadata) + com.google.cloud.lifesciences.v2beta.MetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Metadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Metadata.class, + com.google.cloud.lifesciences.v2beta.Metadata.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.Metadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEventsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (pipelineBuilder_ == null) { + pipeline_ = null; + } else { + pipeline_ = null; + pipelineBuilder_ = null; + } + internalGetMutableLabels().clear(); + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + eventsBuilder_.clear(); + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + pubSubTopic_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Metadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Metadata getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.Metadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Metadata build() { + com.google.cloud.lifesciences.v2beta.Metadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Metadata buildPartial() { + com.google.cloud.lifesciences.v2beta.Metadata result = + new com.google.cloud.lifesciences.v2beta.Metadata(this); + int from_bitField0_ = bitField0_; + if (pipelineBuilder_ == null) { + result.pipeline_ = pipeline_; + } else { + result.pipeline_ = pipelineBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (eventsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + events_ = java.util.Collections.unmodifiableList(events_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.events_ = events_; + } else { + result.events_ = eventsBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.pubSubTopic_ = pubSubTopic_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.Metadata) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.Metadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.Metadata other) { + if (other == com.google.cloud.lifesciences.v2beta.Metadata.getDefaultInstance()) return this; + if (other.hasPipeline()) { + mergePipeline(other.getPipeline()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (eventsBuilder_ == null) { + if (!other.events_.isEmpty()) { + if (events_.isEmpty()) { + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEventsIsMutable(); + events_.addAll(other.events_); + } + onChanged(); + } + } else { + if (!other.events_.isEmpty()) { + if (eventsBuilder_.isEmpty()) { + eventsBuilder_.dispose(); + eventsBuilder_ = null; + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000002); + eventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEventsFieldBuilder() + : null; + } else { + eventsBuilder_.addAllMessages(other.events_); + } + } + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getPubSubTopic().isEmpty()) { + pubSubTopic_ = other.pubSubTopic_; + 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.lifesciences.v2beta.Metadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.Metadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.lifesciences.v2beta.Pipeline pipeline_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Pipeline, + com.google.cloud.lifesciences.v2beta.Pipeline.Builder, + com.google.cloud.lifesciences.v2beta.PipelineOrBuilder> + pipelineBuilder_; + /** + * + * + *
+     * The pipeline this operation represents.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + * + * @return Whether the pipeline field is set. + */ + public boolean hasPipeline() { + return pipelineBuilder_ != null || pipeline_ != null; + } + /** + * + * + *
+     * The pipeline this operation represents.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + * + * @return The pipeline. + */ + public com.google.cloud.lifesciences.v2beta.Pipeline getPipeline() { + if (pipelineBuilder_ == null) { + return pipeline_ == null + ? com.google.cloud.lifesciences.v2beta.Pipeline.getDefaultInstance() + : pipeline_; + } else { + return pipelineBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The pipeline this operation represents.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + */ + public Builder setPipeline(com.google.cloud.lifesciences.v2beta.Pipeline value) { + if (pipelineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pipeline_ = value; + onChanged(); + } else { + pipelineBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The pipeline this operation represents.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + */ + public Builder setPipeline( + com.google.cloud.lifesciences.v2beta.Pipeline.Builder builderForValue) { + if (pipelineBuilder_ == null) { + pipeline_ = builderForValue.build(); + onChanged(); + } else { + pipelineBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The pipeline this operation represents.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + */ + public Builder mergePipeline(com.google.cloud.lifesciences.v2beta.Pipeline value) { + if (pipelineBuilder_ == null) { + if (pipeline_ != null) { + pipeline_ = + com.google.cloud.lifesciences.v2beta.Pipeline.newBuilder(pipeline_) + .mergeFrom(value) + .buildPartial(); + } else { + pipeline_ = value; + } + onChanged(); + } else { + pipelineBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The pipeline this operation represents.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + */ + public Builder clearPipeline() { + if (pipelineBuilder_ == null) { + pipeline_ = null; + onChanged(); + } else { + pipeline_ = null; + pipelineBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The pipeline this operation represents.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + */ + public com.google.cloud.lifesciences.v2beta.Pipeline.Builder getPipelineBuilder() { + + onChanged(); + return getPipelineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The pipeline this operation represents.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + */ + public com.google.cloud.lifesciences.v2beta.PipelineOrBuilder getPipelineOrBuilder() { + if (pipelineBuilder_ != null) { + return pipelineBuilder_.getMessageOrBuilder(); + } else { + return pipeline_ == null + ? com.google.cloud.lifesciences.v2beta.Pipeline.getDefaultInstance() + : pipeline_; + } + } + /** + * + * + *
+     * The pipeline this operation represents.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Pipeline, + com.google.cloud.lifesciences.v2beta.Pipeline.Builder, + com.google.cloud.lifesciences.v2beta.PipelineOrBuilder> + getPipelineFieldBuilder() { + if (pipelineBuilder_ == null) { + pipelineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Pipeline, + com.google.cloud.lifesciences.v2beta.Pipeline.Builder, + com.google.cloud.lifesciences.v2beta.PipelineOrBuilder>( + getPipeline(), getParentForChildren(), isClean()); + pipeline_ = null; + } + return pipelineBuilder_; + } + + 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(); + } + /** + * + * + *
+     * The user-defined labels associated with this operation.
+     * 
+ * + * map<string, string> labels = 2; + */ + @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(); + } + /** + * + * + *
+     * The user-defined labels associated with this operation.
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The user-defined labels associated with this operation.
+     * 
+ * + * map<string, string> labels = 2; + */ + @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; + } + /** + * + * + *
+     * The user-defined labels associated with this operation.
+     * 
+ * + * map<string, string> labels = 2; + */ + @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; + } + /** + * + * + *
+     * The user-defined labels associated with this operation.
+     * 
+ * + * map<string, string> labels = 2; + */ + 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(); + } + /** + * + * + *
+     * The user-defined labels associated with this operation.
+     * 
+ * + * map<string, string> labels = 2; + */ + 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; + } + /** + * + * + *
+     * The user-defined labels associated with this operation.
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private java.util.List events_ = + java.util.Collections.emptyList(); + + private void ensureEventsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + events_ = new java.util.ArrayList(events_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Event, + com.google.cloud.lifesciences.v2beta.Event.Builder, + com.google.cloud.lifesciences.v2beta.EventOrBuilder> + eventsBuilder_; + + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public java.util.List getEventsList() { + if (eventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(events_); + } else { + return eventsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public int getEventsCount() { + if (eventsBuilder_ == null) { + return events_.size(); + } else { + return eventsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public com.google.cloud.lifesciences.v2beta.Event getEvents(int index) { + if (eventsBuilder_ == null) { + return events_.get(index); + } else { + return eventsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public Builder setEvents(int index, com.google.cloud.lifesciences.v2beta.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.set(index, value); + onChanged(); + } else { + eventsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public Builder setEvents( + int index, com.google.cloud.lifesciences.v2beta.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.set(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public Builder addEvents(com.google.cloud.lifesciences.v2beta.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(value); + onChanged(); + } else { + eventsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public Builder addEvents(int index, com.google.cloud.lifesciences.v2beta.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(index, value); + onChanged(); + } else { + eventsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public Builder addEvents(com.google.cloud.lifesciences.v2beta.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public Builder addEvents( + int index, com.google.cloud.lifesciences.v2beta.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public Builder addAllEvents( + java.lang.Iterable values) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, events_); + onChanged(); + } else { + eventsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public Builder clearEvents() { + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + eventsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public Builder removeEvents(int index) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.remove(index); + onChanged(); + } else { + eventsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public com.google.cloud.lifesciences.v2beta.Event.Builder getEventsBuilder(int index) { + return getEventsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public com.google.cloud.lifesciences.v2beta.EventOrBuilder getEventsOrBuilder(int index) { + if (eventsBuilder_ == null) { + return events_.get(index); + } else { + return eventsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public java.util.List + getEventsOrBuilderList() { + if (eventsBuilder_ != null) { + return eventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(events_); + } + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public com.google.cloud.lifesciences.v2beta.Event.Builder addEventsBuilder() { + return getEventsFieldBuilder() + .addBuilder(com.google.cloud.lifesciences.v2beta.Event.getDefaultInstance()); + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public com.google.cloud.lifesciences.v2beta.Event.Builder addEventsBuilder(int index) { + return getEventsFieldBuilder() + .addBuilder(index, com.google.cloud.lifesciences.v2beta.Event.getDefaultInstance()); + } + /** + * + * + *
+     * The list of events that have happened so far during the execution of this
+     * operation.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + public java.util.List + getEventsBuilderList() { + return getEventsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Event, + com.google.cloud.lifesciences.v2beta.Event.Builder, + com.google.cloud.lifesciences.v2beta.EventOrBuilder> + getEventsFieldBuilder() { + if (eventsBuilder_ == null) { + eventsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Event, + com.google.cloud.lifesciences.v2beta.Event.Builder, + com.google.cloud.lifesciences.v2beta.EventOrBuilder>( + events_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + events_ = null; + } + return eventsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * The time at which the operation was created by the API.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * The time at which the operation was created by the API.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time at which the operation was created by the API.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time at which the operation was created by the API.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time at which the operation was created by the API.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time at which the operation was created by the API.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time at which the operation was created by the API.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which the operation was created by the API.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The time at which the operation was created by the API.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The first time at which resources were allocated to execute the pipeline.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * The first time at which resources were allocated to execute the pipeline.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The first time at which resources were allocated to execute the pipeline.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The first time at which resources were allocated to execute the pipeline.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The first time at which resources were allocated to execute the pipeline.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The first time at which resources were allocated to execute the pipeline.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The first time at which resources were allocated to execute the pipeline.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The first time at which resources were allocated to execute the pipeline.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The first time at which resources were allocated to execute the pipeline.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time at which execution was completed and resources were cleaned up.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time at which execution was completed and resources were cleaned up.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time at which execution was completed and resources were cleaned up.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time at which execution was completed and resources were cleaned up.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time at which execution was completed and resources were cleaned up.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time at which execution was completed and resources were cleaned up.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time at which execution was completed and resources were cleaned up.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time at which execution was completed and resources were cleaned up.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time at which execution was completed and resources were cleaned up.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + 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 pubSubTopic_ = ""; + /** + * + * + *
+     * The name of the Cloud Pub/Sub topic where notifications of operation status
+     * changes are sent.
+     * 
+ * + * string pub_sub_topic = 7; + * + * @return The pubSubTopic. + */ + public java.lang.String getPubSubTopic() { + java.lang.Object ref = pubSubTopic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pubSubTopic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the Cloud Pub/Sub topic where notifications of operation status
+     * changes are sent.
+     * 
+ * + * string pub_sub_topic = 7; + * + * @return The bytes for pubSubTopic. + */ + public com.google.protobuf.ByteString getPubSubTopicBytes() { + java.lang.Object ref = pubSubTopic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pubSubTopic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the Cloud Pub/Sub topic where notifications of operation status
+     * changes are sent.
+     * 
+ * + * string pub_sub_topic = 7; + * + * @param value The pubSubTopic to set. + * @return This builder for chaining. + */ + public Builder setPubSubTopic(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pubSubTopic_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the Cloud Pub/Sub topic where notifications of operation status
+     * changes are sent.
+     * 
+ * + * string pub_sub_topic = 7; + * + * @return This builder for chaining. + */ + public Builder clearPubSubTopic() { + + pubSubTopic_ = getDefaultInstance().getPubSubTopic(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the Cloud Pub/Sub topic where notifications of operation status
+     * changes are sent.
+     * 
+ * + * string pub_sub_topic = 7; + * + * @param value The bytes for pubSubTopic to set. + * @return This builder for chaining. + */ + public Builder setPubSubTopicBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pubSubTopic_ = 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.lifesciences.v2beta.Metadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.Metadata) + private static final com.google.cloud.lifesciences.v2beta.Metadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.Metadata(); + } + + public static com.google.cloud.lifesciences.v2beta.Metadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Metadata(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.lifesciences.v2beta.Metadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/MetadataOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/MetadataOrBuilder.java new file mode 100644 index 00000000..75b28241 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/MetadataOrBuilder.java @@ -0,0 +1,303 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface MetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.Metadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The pipeline this operation represents.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + * + * @return Whether the pipeline field is set. + */ + boolean hasPipeline(); + /** + * + * + *
+   * The pipeline this operation represents.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + * + * @return The pipeline. + */ + com.google.cloud.lifesciences.v2beta.Pipeline getPipeline(); + /** + * + * + *
+   * The pipeline this operation represents.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1; + */ + com.google.cloud.lifesciences.v2beta.PipelineOrBuilder getPipelineOrBuilder(); + + /** + * + * + *
+   * The user-defined labels associated with this operation.
+   * 
+ * + * map<string, string> labels = 2; + */ + int getLabelsCount(); + /** + * + * + *
+   * The user-defined labels associated with this operation.
+   * 
+ * + * map<string, string> labels = 2; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The user-defined labels associated with this operation.
+   * 
+ * + * map<string, string> labels = 2; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The user-defined labels associated with this operation.
+   * 
+ * + * map<string, string> labels = 2; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The user-defined labels associated with this operation.
+   * 
+ * + * map<string, string> labels = 2; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The list of events that have happened so far during the execution of this
+   * operation.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + java.util.List getEventsList(); + /** + * + * + *
+   * The list of events that have happened so far during the execution of this
+   * operation.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + com.google.cloud.lifesciences.v2beta.Event getEvents(int index); + /** + * + * + *
+   * The list of events that have happened so far during the execution of this
+   * operation.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + int getEventsCount(); + /** + * + * + *
+   * The list of events that have happened so far during the execution of this
+   * operation.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + java.util.List + getEventsOrBuilderList(); + /** + * + * + *
+   * The list of events that have happened so far during the execution of this
+   * operation.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Event events = 3; + */ + com.google.cloud.lifesciences.v2beta.EventOrBuilder getEventsOrBuilder(int index); + + /** + * + * + *
+   * The time at which the operation was created by the API.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time at which the operation was created by the API.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time at which the operation was created by the API.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The first time at which resources were allocated to execute the pipeline.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * The first time at which resources were allocated to execute the pipeline.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The first time at which resources were allocated to execute the pipeline.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The time at which execution was completed and resources were cleaned up.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time at which execution was completed and resources were cleaned up.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time at which execution was completed and resources were cleaned up.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * The name of the Cloud Pub/Sub topic where notifications of operation status
+   * changes are sent.
+   * 
+ * + * string pub_sub_topic = 7; + * + * @return The pubSubTopic. + */ + java.lang.String getPubSubTopic(); + /** + * + * + *
+   * The name of the Cloud Pub/Sub topic where notifications of operation status
+   * changes are sent.
+   * 
+ * + * string pub_sub_topic = 7; + * + * @return The bytes for pubSubTopic. + */ + com.google.protobuf.ByteString getPubSubTopicBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Mount.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Mount.java new file mode 100644 index 00000000..edd5ab19 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Mount.java @@ -0,0 +1,903 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Carries information about a particular disk mount inside a container.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Mount} + */ +public final class Mount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.Mount) + MountOrBuilder { + private static final long serialVersionUID = 0L; + // Use Mount.newBuilder() to construct. + private Mount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Mount() { + disk_ = ""; + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Mount(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Mount( + 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(); + + disk_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + path_ = s; + break; + } + case 24: + { + readOnly_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Mount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Mount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Mount.class, + com.google.cloud.lifesciences.v2beta.Mount.Builder.class); + } + + public static final int DISK_FIELD_NUMBER = 1; + private volatile java.lang.Object disk_; + /** + * + * + *
+   * The name of the disk to mount, as specified in the resources section.
+   * 
+ * + * string disk = 1; + * + * @return The disk. + */ + @java.lang.Override + public java.lang.String getDisk() { + java.lang.Object ref = disk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + disk_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the disk to mount, as specified in the resources section.
+   * 
+ * + * string disk = 1; + * + * @return The bytes for disk. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDiskBytes() { + java.lang.Object ref = disk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + disk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object path_; + /** + * + * + *
+   * The path to mount the disk inside the container.
+   * 
+ * + * string path = 2; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * The path to mount the disk inside the container.
+   * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_ONLY_FIELD_NUMBER = 3; + private boolean readOnly_; + /** + * + * + *
+   * If true, the disk is mounted read-only inside the container.
+   * 
+ * + * bool read_only = 3; + * + * @return The readOnly. + */ + @java.lang.Override + public boolean getReadOnly() { + return readOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getDiskBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, disk_); + } + if (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_); + } + if (readOnly_ != false) { + output.writeBool(3, readOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDiskBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, disk_); + } + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_); + } + if (readOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, readOnly_); + } + 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.lifesciences.v2beta.Mount)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.Mount other = + (com.google.cloud.lifesciences.v2beta.Mount) obj; + + if (!getDisk().equals(other.getDisk())) return false; + if (!getPath().equals(other.getPath())) return false; + if (getReadOnly() != other.getReadOnly()) 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) + DISK_FIELD_NUMBER; + hash = (53 * hash) + getDisk().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + READ_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReadOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.Mount parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Mount 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.lifesciences.v2beta.Mount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Mount parseFrom( + 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.lifesciences.v2beta.Mount parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Mount parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.Mount parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Mount parseFrom( + java.io.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.lifesciences.v2beta.Mount parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Mount parseDelimitedFrom( + java.io.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.lifesciences.v2beta.Mount parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Mount parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.Mount prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Carries information about a particular disk mount inside a container.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Mount} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.Mount) + com.google.cloud.lifesciences.v2beta.MountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Mount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Mount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Mount.class, + com.google.cloud.lifesciences.v2beta.Mount.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.Mount.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(); + disk_ = ""; + + path_ = ""; + + readOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Mount_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Mount getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.Mount.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Mount build() { + com.google.cloud.lifesciences.v2beta.Mount result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Mount buildPartial() { + com.google.cloud.lifesciences.v2beta.Mount result = + new com.google.cloud.lifesciences.v2beta.Mount(this); + result.disk_ = disk_; + result.path_ = path_; + result.readOnly_ = readOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.Mount) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.Mount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.Mount other) { + if (other == com.google.cloud.lifesciences.v2beta.Mount.getDefaultInstance()) return this; + if (!other.getDisk().isEmpty()) { + disk_ = other.disk_; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + if (other.getReadOnly() != false) { + setReadOnly(other.getReadOnly()); + } + 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.lifesciences.v2beta.Mount parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.Mount) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object disk_ = ""; + /** + * + * + *
+     * The name of the disk to mount, as specified in the resources section.
+     * 
+ * + * string disk = 1; + * + * @return The disk. + */ + public java.lang.String getDisk() { + java.lang.Object ref = disk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + disk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the disk to mount, as specified in the resources section.
+     * 
+ * + * string disk = 1; + * + * @return The bytes for disk. + */ + public com.google.protobuf.ByteString getDiskBytes() { + java.lang.Object ref = disk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + disk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the disk to mount, as specified in the resources section.
+     * 
+ * + * string disk = 1; + * + * @param value The disk to set. + * @return This builder for chaining. + */ + public Builder setDisk(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + disk_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the disk to mount, as specified in the resources section.
+     * 
+ * + * string disk = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisk() { + + disk_ = getDefaultInstance().getDisk(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the disk to mount, as specified in the resources section.
+     * 
+ * + * string disk = 1; + * + * @param value The bytes for disk to set. + * @return This builder for chaining. + */ + public Builder setDiskBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + disk_ = value; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * The path to mount the disk inside the container.
+     * 
+ * + * string path = 2; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The path to mount the disk inside the container.
+     * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The path to mount the disk inside the container.
+     * 
+ * + * string path = 2; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The path to mount the disk inside the container.
+     * 
+ * + * string path = 2; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * The path to mount the disk inside the container.
+     * 
+ * + * string path = 2; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = value; + onChanged(); + return this; + } + + private boolean readOnly_; + /** + * + * + *
+     * If true, the disk is mounted read-only inside the container.
+     * 
+ * + * bool read_only = 3; + * + * @return The readOnly. + */ + @java.lang.Override + public boolean getReadOnly() { + return readOnly_; + } + /** + * + * + *
+     * If true, the disk is mounted read-only inside the container.
+     * 
+ * + * bool read_only = 3; + * + * @param value The readOnly to set. + * @return This builder for chaining. + */ + public Builder setReadOnly(boolean value) { + + readOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, the disk is mounted read-only inside the container.
+     * 
+ * + * bool read_only = 3; + * + * @return This builder for chaining. + */ + public Builder clearReadOnly() { + + readOnly_ = 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.lifesciences.v2beta.Mount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.Mount) + private static final com.google.cloud.lifesciences.v2beta.Mount DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.Mount(); + } + + public static com.google.cloud.lifesciences.v2beta.Mount getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Mount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Mount(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.lifesciences.v2beta.Mount getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/MountOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/MountOrBuilder.java new file mode 100644 index 00000000..2a3984d9 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/MountOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface MountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.Mount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the disk to mount, as specified in the resources section.
+   * 
+ * + * string disk = 1; + * + * @return The disk. + */ + java.lang.String getDisk(); + /** + * + * + *
+   * The name of the disk to mount, as specified in the resources section.
+   * 
+ * + * string disk = 1; + * + * @return The bytes for disk. + */ + com.google.protobuf.ByteString getDiskBytes(); + + /** + * + * + *
+   * The path to mount the disk inside the container.
+   * 
+ * + * string path = 2; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * The path to mount the disk inside the container.
+   * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+   * If true, the disk is mounted read-only inside the container.
+   * 
+ * + * bool read_only = 3; + * + * @return The readOnly. + */ + boolean getReadOnly(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NFSMount.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NFSMount.java new file mode 100644 index 00000000..658d1ab7 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NFSMount.java @@ -0,0 +1,634 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Configuration for an `NFSMount` to be attached to the VM.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.NFSMount} + */ +public final class NFSMount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.NFSMount) + NFSMountOrBuilder { + private static final long serialVersionUID = 0L; + // Use NFSMount.newBuilder() to construct. + private NFSMount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NFSMount() { + target_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NFSMount(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NFSMount( + 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(); + + target_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_NFSMount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_NFSMount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.NFSMount.class, + com.google.cloud.lifesciences.v2beta.NFSMount.Builder.class); + } + + public static final int TARGET_FIELD_NUMBER = 1; + private volatile java.lang.Object target_; + /** + * + * + *
+   * A target NFS mount. The target must be specified as `address:/mount".
+   * 
+ * + * string target = 1; + * + * @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; + } + } + /** + * + * + *
+   * A target NFS mount. The target must be specified as `address:/mount".
+   * 
+ * + * string target = 1; + * + * @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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, target_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, target_); + } + 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.lifesciences.v2beta.NFSMount)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.NFSMount other = + (com.google.cloud.lifesciences.v2beta.NFSMount) obj; + + if (!getTarget().equals(other.getTarget())) 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_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.NFSMount parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.NFSMount 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.lifesciences.v2beta.NFSMount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.NFSMount parseFrom( + 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.lifesciences.v2beta.NFSMount parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.NFSMount parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.NFSMount parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.NFSMount parseFrom( + java.io.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.lifesciences.v2beta.NFSMount parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.NFSMount parseDelimitedFrom( + java.io.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.lifesciences.v2beta.NFSMount parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.NFSMount parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.NFSMount prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 for an `NFSMount` to be attached to the VM.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.NFSMount} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.NFSMount) + com.google.cloud.lifesciences.v2beta.NFSMountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_NFSMount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_NFSMount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.NFSMount.class, + com.google.cloud.lifesciences.v2beta.NFSMount.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.NFSMount.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(); + target_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_NFSMount_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.NFSMount getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.NFSMount.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.NFSMount build() { + com.google.cloud.lifesciences.v2beta.NFSMount result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.NFSMount buildPartial() { + com.google.cloud.lifesciences.v2beta.NFSMount result = + new com.google.cloud.lifesciences.v2beta.NFSMount(this); + result.target_ = target_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.NFSMount) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.NFSMount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.NFSMount other) { + if (other == com.google.cloud.lifesciences.v2beta.NFSMount.getDefaultInstance()) return this; + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + 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.lifesciences.v2beta.NFSMount parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.NFSMount) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * A target NFS mount. The target must be specified as `address:/mount".
+     * 
+ * + * string target = 1; + * + * @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; + } + } + /** + * + * + *
+     * A target NFS mount. The target must be specified as `address:/mount".
+     * 
+ * + * string target = 1; + * + * @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; + } + } + /** + * + * + *
+     * A target NFS mount. The target must be specified as `address:/mount".
+     * 
+ * + * string target = 1; + * + * @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; + } + /** + * + * + *
+     * A target NFS mount. The target must be specified as `address:/mount".
+     * 
+ * + * string target = 1; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * A target NFS mount. The target must be specified as `address:/mount".
+     * 
+ * + * string target = 1; + * + * @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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.lifesciences.v2beta.NFSMount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.NFSMount) + private static final com.google.cloud.lifesciences.v2beta.NFSMount DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.NFSMount(); + } + + public static com.google.cloud.lifesciences.v2beta.NFSMount getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NFSMount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NFSMount(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.lifesciences.v2beta.NFSMount getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NFSMountOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NFSMountOrBuilder.java new file mode 100644 index 00000000..6942efba --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NFSMountOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface NFSMountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.NFSMount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A target NFS mount. The target must be specified as `address:/mount".
+   * 
+ * + * string target = 1; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * A target NFS mount. The target must be specified as `address:/mount".
+   * 
+ * + * string target = 1; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Network.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Network.java new file mode 100644 index 00000000..095ab87b --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Network.java @@ -0,0 +1,982 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * VM networking options.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Network} + */ +public final class Network extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.Network) + NetworkOrBuilder { + private static final long serialVersionUID = 0L; + // Use Network.newBuilder() to construct. + private Network(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Network() { + network_ = ""; + subnetwork_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Network(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Network( + 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(); + + network_ = s; + break; + } + case 16: + { + usePrivateAddress_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + subnetwork_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Network_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Network_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Network.class, + com.google.cloud.lifesciences.v2beta.Network.Builder.class); + } + + public static final int NETWORK_FIELD_NUMBER = 1; + private volatile java.lang.Object network_; + /** + * + * + *
+   * The network name to attach the VM's network interface to. The value will
+   * be prefixed with `global/networks/` unless it contains a `/`, in which
+   * case it is assumed to be a fully specified network resource URL.
+   * If unspecified, the global default network is used.
+   * 
+ * + * string network = 1; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * The network name to attach the VM's network interface to. The value will
+   * be prefixed with `global/networks/` unless it contains a `/`, in which
+   * case it is assumed to be a fully specified network resource URL.
+   * If unspecified, the global default network is used.
+   * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USE_PRIVATE_ADDRESS_FIELD_NUMBER = 2; + private boolean usePrivateAddress_; + /** + * + * + *
+   * If set to true, do not attach a public IP address to the VM. Note that
+   * without a public IP address, additional configuration is required to
+   * allow the VM to access Google services.
+   * See https://cloud.google.com/vpc/docs/configure-private-google-access
+   * for more information.
+   * 
+ * + * bool use_private_address = 2; + * + * @return The usePrivateAddress. + */ + @java.lang.Override + public boolean getUsePrivateAddress() { + return usePrivateAddress_; + } + + public static final int SUBNETWORK_FIELD_NUMBER = 3; + private volatile java.lang.Object subnetwork_; + /** + * + * + *
+   * If the specified network is configured for custom subnet creation, the
+   * name of the subnetwork to attach the instance to must be specified here.
+   * The value is prefixed with `regions/*/subnetworks/` unless it contains a
+   * `/`, in which case it is assumed to be a fully specified subnetwork
+   * resource URL.
+   * If the `*` character appears in the value, it is replaced with the region
+   * that the virtual machine has been allocated in.
+   * 
+ * + * string subnetwork = 3; + * + * @return The subnetwork. + */ + @java.lang.Override + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } + } + /** + * + * + *
+   * If the specified network is configured for custom subnet creation, the
+   * name of the subnetwork to attach the instance to must be specified here.
+   * The value is prefixed with `regions/*/subnetworks/` unless it contains a
+   * `/`, in which case it is assumed to be a fully specified subnetwork
+   * resource URL.
+   * If the `*` character appears in the value, it is replaced with the region
+   * that the virtual machine has been allocated in.
+   * 
+ * + * string subnetwork = 3; + * + * @return The bytes for subnetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = 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 (!getNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); + } + if (usePrivateAddress_ != false) { + output.writeBool(2, usePrivateAddress_); + } + if (!getSubnetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subnetwork_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); + } + if (usePrivateAddress_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, usePrivateAddress_); + } + if (!getSubnetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subnetwork_); + } + 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.lifesciences.v2beta.Network)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.Network other = + (com.google.cloud.lifesciences.v2beta.Network) obj; + + if (!getNetwork().equals(other.getNetwork())) return false; + if (getUsePrivateAddress() != other.getUsePrivateAddress()) return false; + if (!getSubnetwork().equals(other.getSubnetwork())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + USE_PRIVATE_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUsePrivateAddress()); + hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetwork().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.Network parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Network 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.lifesciences.v2beta.Network parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Network parseFrom( + 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.lifesciences.v2beta.Network parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Network parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.Network parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Network parseFrom( + java.io.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.lifesciences.v2beta.Network parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Network parseDelimitedFrom( + java.io.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.lifesciences.v2beta.Network parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Network parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.Network prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * VM networking options.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Network} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.Network) + com.google.cloud.lifesciences.v2beta.NetworkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Network_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Network_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Network.class, + com.google.cloud.lifesciences.v2beta.Network.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.Network.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(); + network_ = ""; + + usePrivateAddress_ = false; + + subnetwork_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Network_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Network getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.Network.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Network build() { + com.google.cloud.lifesciences.v2beta.Network result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Network buildPartial() { + com.google.cloud.lifesciences.v2beta.Network result = + new com.google.cloud.lifesciences.v2beta.Network(this); + result.network_ = network_; + result.usePrivateAddress_ = usePrivateAddress_; + result.subnetwork_ = subnetwork_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.Network) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.Network) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.Network other) { + if (other == com.google.cloud.lifesciences.v2beta.Network.getDefaultInstance()) return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (other.getUsePrivateAddress() != false) { + setUsePrivateAddress(other.getUsePrivateAddress()); + } + if (!other.getSubnetwork().isEmpty()) { + subnetwork_ = other.subnetwork_; + 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.lifesciences.v2beta.Network parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.Network) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * The network name to attach the VM's network interface to. The value will
+     * be prefixed with `global/networks/` unless it contains a `/`, in which
+     * case it is assumed to be a fully specified network resource URL.
+     * If unspecified, the global default network is used.
+     * 
+ * + * string network = 1; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The network name to attach the VM's network interface to. The value will
+     * be prefixed with `global/networks/` unless it contains a `/`, in which
+     * case it is assumed to be a fully specified network resource URL.
+     * If unspecified, the global default network is used.
+     * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The network name to attach the VM's network interface to. The value will
+     * be prefixed with `global/networks/` unless it contains a `/`, in which
+     * case it is assumed to be a fully specified network resource URL.
+     * If unspecified, the global default network is used.
+     * 
+ * + * string network = 1; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + network_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The network name to attach the VM's network interface to. The value will
+     * be prefixed with `global/networks/` unless it contains a `/`, in which
+     * case it is assumed to be a fully specified network resource URL.
+     * If unspecified, the global default network is used.
+     * 
+ * + * string network = 1; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * The network name to attach the VM's network interface to. The value will
+     * be prefixed with `global/networks/` unless it contains a `/`, in which
+     * case it is assumed to be a fully specified network resource URL.
+     * If unspecified, the global default network is used.
+     * 
+ * + * string network = 1; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + network_ = value; + onChanged(); + return this; + } + + private boolean usePrivateAddress_; + /** + * + * + *
+     * If set to true, do not attach a public IP address to the VM. Note that
+     * without a public IP address, additional configuration is required to
+     * allow the VM to access Google services.
+     * See https://cloud.google.com/vpc/docs/configure-private-google-access
+     * for more information.
+     * 
+ * + * bool use_private_address = 2; + * + * @return The usePrivateAddress. + */ + @java.lang.Override + public boolean getUsePrivateAddress() { + return usePrivateAddress_; + } + /** + * + * + *
+     * If set to true, do not attach a public IP address to the VM. Note that
+     * without a public IP address, additional configuration is required to
+     * allow the VM to access Google services.
+     * See https://cloud.google.com/vpc/docs/configure-private-google-access
+     * for more information.
+     * 
+ * + * bool use_private_address = 2; + * + * @param value The usePrivateAddress to set. + * @return This builder for chaining. + */ + public Builder setUsePrivateAddress(boolean value) { + + usePrivateAddress_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, do not attach a public IP address to the VM. Note that
+     * without a public IP address, additional configuration is required to
+     * allow the VM to access Google services.
+     * See https://cloud.google.com/vpc/docs/configure-private-google-access
+     * for more information.
+     * 
+ * + * bool use_private_address = 2; + * + * @return This builder for chaining. + */ + public Builder clearUsePrivateAddress() { + + usePrivateAddress_ = false; + onChanged(); + return this; + } + + private java.lang.Object subnetwork_ = ""; + /** + * + * + *
+     * If the specified network is configured for custom subnet creation, the
+     * name of the subnetwork to attach the instance to must be specified here.
+     * The value is prefixed with `regions/*/subnetworks/` unless it contains a
+     * `/`, in which case it is assumed to be a fully specified subnetwork
+     * resource URL.
+     * If the `*` character appears in the value, it is replaced with the region
+     * that the virtual machine has been allocated in.
+     * 
+ * + * string subnetwork = 3; + * + * @return The subnetwork. + */ + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If the specified network is configured for custom subnet creation, the
+     * name of the subnetwork to attach the instance to must be specified here.
+     * The value is prefixed with `regions/*/subnetworks/` unless it contains a
+     * `/`, in which case it is assumed to be a fully specified subnetwork
+     * resource URL.
+     * If the `*` character appears in the value, it is replaced with the region
+     * that the virtual machine has been allocated in.
+     * 
+ * + * string subnetwork = 3; + * + * @return The bytes for subnetwork. + */ + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If the specified network is configured for custom subnet creation, the
+     * name of the subnetwork to attach the instance to must be specified here.
+     * The value is prefixed with `regions/*/subnetworks/` unless it contains a
+     * `/`, in which case it is assumed to be a fully specified subnetwork
+     * resource URL.
+     * If the `*` character appears in the value, it is replaced with the region
+     * that the virtual machine has been allocated in.
+     * 
+ * + * string subnetwork = 3; + * + * @param value The subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnetwork_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If the specified network is configured for custom subnet creation, the
+     * name of the subnetwork to attach the instance to must be specified here.
+     * The value is prefixed with `regions/*/subnetworks/` unless it contains a
+     * `/`, in which case it is assumed to be a fully specified subnetwork
+     * resource URL.
+     * If the `*` character appears in the value, it is replaced with the region
+     * that the virtual machine has been allocated in.
+     * 
+ * + * string subnetwork = 3; + * + * @return This builder for chaining. + */ + public Builder clearSubnetwork() { + + subnetwork_ = getDefaultInstance().getSubnetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * If the specified network is configured for custom subnet creation, the
+     * name of the subnetwork to attach the instance to must be specified here.
+     * The value is prefixed with `regions/*/subnetworks/` unless it contains a
+     * `/`, in which case it is assumed to be a fully specified subnetwork
+     * resource URL.
+     * If the `*` character appears in the value, it is replaced with the region
+     * that the virtual machine has been allocated in.
+     * 
+ * + * string subnetwork = 3; + * + * @param value The bytes for subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnetwork_ = 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.lifesciences.v2beta.Network) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.Network) + private static final com.google.cloud.lifesciences.v2beta.Network DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.Network(); + } + + public static com.google.cloud.lifesciences.v2beta.Network getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Network parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Network(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.lifesciences.v2beta.Network getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NetworkOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NetworkOrBuilder.java new file mode 100644 index 00000000..c5a0ce6d --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/NetworkOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface NetworkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.Network) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The network name to attach the VM's network interface to. The value will
+   * be prefixed with `global/networks/` unless it contains a `/`, in which
+   * case it is assumed to be a fully specified network resource URL.
+   * If unspecified, the global default network is used.
+   * 
+ * + * string network = 1; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * The network name to attach the VM's network interface to. The value will
+   * be prefixed with `global/networks/` unless it contains a `/`, in which
+   * case it is assumed to be a fully specified network resource URL.
+   * If unspecified, the global default network is used.
+   * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * If set to true, do not attach a public IP address to the VM. Note that
+   * without a public IP address, additional configuration is required to
+   * allow the VM to access Google services.
+   * See https://cloud.google.com/vpc/docs/configure-private-google-access
+   * for more information.
+   * 
+ * + * bool use_private_address = 2; + * + * @return The usePrivateAddress. + */ + boolean getUsePrivateAddress(); + + /** + * + * + *
+   * If the specified network is configured for custom subnet creation, the
+   * name of the subnetwork to attach the instance to must be specified here.
+   * The value is prefixed with `regions/*/subnetworks/` unless it contains a
+   * `/`, in which case it is assumed to be a fully specified subnetwork
+   * resource URL.
+   * If the `*` character appears in the value, it is replaced with the region
+   * that the virtual machine has been allocated in.
+   * 
+ * + * string subnetwork = 3; + * + * @return The subnetwork. + */ + java.lang.String getSubnetwork(); + /** + * + * + *
+   * If the specified network is configured for custom subnet creation, the
+   * name of the subnetwork to attach the instance to must be specified here.
+   * The value is prefixed with `regions/*/subnetworks/` unless it contains a
+   * `/`, in which case it is assumed to be a fully specified subnetwork
+   * resource URL.
+   * If the `*` character appears in the value, it is replaced with the region
+   * that the virtual machine has been allocated in.
+   * 
+ * + * string subnetwork = 3; + * + * @return The bytes for subnetwork. + */ + com.google.protobuf.ByteString getSubnetworkBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PersistentDisk.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PersistentDisk.java new file mode 100644 index 00000000..32059dcd --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PersistentDisk.java @@ -0,0 +1,929 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Configuration for a persistent disk to be attached to the VM.
+ * See https://cloud.google.com/compute/docs/disks/performance for more
+ * information about disk type, size, and performance considerations.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.PersistentDisk} + */ +public final class PersistentDisk extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.PersistentDisk) + PersistentDiskOrBuilder { + private static final long serialVersionUID = 0L; + // Use PersistentDisk.newBuilder() to construct. + private PersistentDisk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PersistentDisk() { + type_ = ""; + sourceImage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PersistentDisk(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PersistentDisk( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + sizeGb_ = input.readInt32(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceImage_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PersistentDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PersistentDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.PersistentDisk.class, + com.google.cloud.lifesciences.v2beta.PersistentDisk.Builder.class); + } + + public static final int SIZE_GB_FIELD_NUMBER = 1; + private int sizeGb_; + /** + * + * + *
+   * The size, in GB, of the disk to attach. If the size is not
+   * specified, a default is chosen to ensure reasonable I/O performance.
+   * If the disk type is specified as `local-ssd`, multiple local drives are
+   * automatically combined to provide the requested size. Note, however, that
+   * each physical SSD is 375GB in size, and no more than 8 drives can be
+   * attached to a single instance.
+   * 
+ * + * int32 size_gb = 1; + * + * @return The sizeGb. + */ + @java.lang.Override + public int getSizeGb() { + return sizeGb_; + } + + public static final int TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object type_; + /** + * + * + *
+   * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+   * 
+ * + * string type = 2; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+   * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_IMAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object sourceImage_; + /** + * + * + *
+   * An image to put on the disk before attaching it to the VM.
+   * 
+ * + * string source_image = 3; + * + * @return The sourceImage. + */ + @java.lang.Override + public java.lang.String getSourceImage() { + java.lang.Object ref = sourceImage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceImage_ = s; + return s; + } + } + /** + * + * + *
+   * An image to put on the disk before attaching it to the VM.
+   * 
+ * + * string source_image = 3; + * + * @return The bytes for sourceImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceImageBytes() { + java.lang.Object ref = sourceImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceImage_ = 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 (sizeGb_ != 0) { + output.writeInt32(1, sizeGb_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (!getSourceImageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceImage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sizeGb_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, sizeGb_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + if (!getSourceImageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceImage_); + } + 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.lifesciences.v2beta.PersistentDisk)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.PersistentDisk other = + (com.google.cloud.lifesciences.v2beta.PersistentDisk) obj; + + if (getSizeGb() != other.getSizeGb()) return false; + if (!getType().equals(other.getType())) return false; + if (!getSourceImage().equals(other.getSourceImage())) 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) + SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + getSizeGb(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + SOURCE_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getSourceImage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.PersistentDisk parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.PersistentDisk 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.lifesciences.v2beta.PersistentDisk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.PersistentDisk parseFrom( + 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.lifesciences.v2beta.PersistentDisk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.PersistentDisk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.PersistentDisk parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.PersistentDisk parseFrom( + java.io.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.lifesciences.v2beta.PersistentDisk parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.PersistentDisk parseDelimitedFrom( + java.io.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.lifesciences.v2beta.PersistentDisk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.PersistentDisk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.PersistentDisk prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 for a persistent disk to be attached to the VM.
+   * See https://cloud.google.com/compute/docs/disks/performance for more
+   * information about disk type, size, and performance considerations.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.PersistentDisk} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.PersistentDisk) + com.google.cloud.lifesciences.v2beta.PersistentDiskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PersistentDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PersistentDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.PersistentDisk.class, + com.google.cloud.lifesciences.v2beta.PersistentDisk.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.PersistentDisk.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(); + sizeGb_ = 0; + + type_ = ""; + + sourceImage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PersistentDisk_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PersistentDisk getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.PersistentDisk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PersistentDisk build() { + com.google.cloud.lifesciences.v2beta.PersistentDisk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PersistentDisk buildPartial() { + com.google.cloud.lifesciences.v2beta.PersistentDisk result = + new com.google.cloud.lifesciences.v2beta.PersistentDisk(this); + result.sizeGb_ = sizeGb_; + result.type_ = type_; + result.sourceImage_ = sourceImage_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.PersistentDisk) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.PersistentDisk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.PersistentDisk other) { + if (other == com.google.cloud.lifesciences.v2beta.PersistentDisk.getDefaultInstance()) + return this; + if (other.getSizeGb() != 0) { + setSizeGb(other.getSizeGb()); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getSourceImage().isEmpty()) { + sourceImage_ = other.sourceImage_; + 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.lifesciences.v2beta.PersistentDisk parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.PersistentDisk) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sizeGb_; + /** + * + * + *
+     * The size, in GB, of the disk to attach. If the size is not
+     * specified, a default is chosen to ensure reasonable I/O performance.
+     * If the disk type is specified as `local-ssd`, multiple local drives are
+     * automatically combined to provide the requested size. Note, however, that
+     * each physical SSD is 375GB in size, and no more than 8 drives can be
+     * attached to a single instance.
+     * 
+ * + * int32 size_gb = 1; + * + * @return The sizeGb. + */ + @java.lang.Override + public int getSizeGb() { + return sizeGb_; + } + /** + * + * + *
+     * The size, in GB, of the disk to attach. If the size is not
+     * specified, a default is chosen to ensure reasonable I/O performance.
+     * If the disk type is specified as `local-ssd`, multiple local drives are
+     * automatically combined to provide the requested size. Note, however, that
+     * each physical SSD is 375GB in size, and no more than 8 drives can be
+     * attached to a single instance.
+     * 
+ * + * int32 size_gb = 1; + * + * @param value The sizeGb to set. + * @return This builder for chaining. + */ + public Builder setSizeGb(int value) { + + sizeGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The size, in GB, of the disk to attach. If the size is not
+     * specified, a default is chosen to ensure reasonable I/O performance.
+     * If the disk type is specified as `local-ssd`, multiple local drives are
+     * automatically combined to provide the requested size. Note, however, that
+     * each physical SSD is 375GB in size, and no more than 8 drives can be
+     * attached to a single instance.
+     * 
+ * + * int32 size_gb = 1; + * + * @return This builder for chaining. + */ + public Builder clearSizeGb() { + + sizeGb_ = 0; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+     * 
+ * + * string type = 2; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+     * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+     * 
+ * + * string type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+     * 
+ * + * string type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+     * 
+ * + * string type = 2; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceImage_ = ""; + /** + * + * + *
+     * An image to put on the disk before attaching it to the VM.
+     * 
+ * + * string source_image = 3; + * + * @return The sourceImage. + */ + public java.lang.String getSourceImage() { + java.lang.Object ref = sourceImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An image to put on the disk before attaching it to the VM.
+     * 
+ * + * string source_image = 3; + * + * @return The bytes for sourceImage. + */ + public com.google.protobuf.ByteString getSourceImageBytes() { + java.lang.Object ref = sourceImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An image to put on the disk before attaching it to the VM.
+     * 
+ * + * string source_image = 3; + * + * @param value The sourceImage to set. + * @return This builder for chaining. + */ + public Builder setSourceImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceImage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An image to put on the disk before attaching it to the VM.
+     * 
+ * + * string source_image = 3; + * + * @return This builder for chaining. + */ + public Builder clearSourceImage() { + + sourceImage_ = getDefaultInstance().getSourceImage(); + onChanged(); + return this; + } + /** + * + * + *
+     * An image to put on the disk before attaching it to the VM.
+     * 
+ * + * string source_image = 3; + * + * @param value The bytes for sourceImage to set. + * @return This builder for chaining. + */ + public Builder setSourceImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceImage_ = 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.lifesciences.v2beta.PersistentDisk) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.PersistentDisk) + private static final com.google.cloud.lifesciences.v2beta.PersistentDisk DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.PersistentDisk(); + } + + public static com.google.cloud.lifesciences.v2beta.PersistentDisk getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PersistentDisk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PersistentDisk(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.lifesciences.v2beta.PersistentDisk getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PersistentDiskOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PersistentDiskOrBuilder.java new file mode 100644 index 00000000..d81d5af9 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PersistentDiskOrBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface PersistentDiskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.PersistentDisk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The size, in GB, of the disk to attach. If the size is not
+   * specified, a default is chosen to ensure reasonable I/O performance.
+   * If the disk type is specified as `local-ssd`, multiple local drives are
+   * automatically combined to provide the requested size. Note, however, that
+   * each physical SSD is 375GB in size, and no more than 8 drives can be
+   * attached to a single instance.
+   * 
+ * + * int32 size_gb = 1; + * + * @return The sizeGb. + */ + int getSizeGb(); + + /** + * + * + *
+   * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+   * 
+ * + * string type = 2; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * The Compute Engine disk type. If unspecified, `pd-standard` is used.
+   * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * An image to put on the disk before attaching it to the VM.
+   * 
+ * + * string source_image = 3; + * + * @return The sourceImage. + */ + java.lang.String getSourceImage(); + /** + * + * + *
+   * An image to put on the disk before attaching it to the VM.
+   * 
+ * + * string source_image = 3; + * + * @return The bytes for sourceImage. + */ + com.google.protobuf.ByteString getSourceImageBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Pipeline.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Pipeline.java new file mode 100644 index 00000000..c4f69629 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Pipeline.java @@ -0,0 +1,1890 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Specifies a series of actions to execute, expressed as Docker containers.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Pipeline} + */ +public final class Pipeline extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.Pipeline) + PipelineOrBuilder { + private static final long serialVersionUID = 0L; + // Use Pipeline.newBuilder() to construct. + private Pipeline(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Pipeline() { + actions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Pipeline(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Pipeline( + 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)) { + actions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + actions_.add( + input.readMessage( + com.google.cloud.lifesciences.v2beta.Action.parser(), extensionRegistry)); + break; + } + case 18: + { + com.google.cloud.lifesciences.v2beta.Resources.Builder subBuilder = null; + if (resources_ != null) { + subBuilder = resources_.toBuilder(); + } + resources_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.Resources.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resources_); + resources_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + environment_ = + com.google.protobuf.MapField.newMapField( + EnvironmentDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry environment__ = + input.readMessage( + EnvironmentDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + environment_.getMutableMap().put(environment__.getKey(), environment__.getValue()); + break; + } + case 34: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeout_ != null) { + subBuilder = timeout_.toBuilder(); + } + timeout_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeout_); + timeout_ = 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)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Pipeline_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetEnvironment(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Pipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Pipeline.class, + com.google.cloud.lifesciences.v2beta.Pipeline.Builder.class); + } + + public static final int ACTIONS_FIELD_NUMBER = 1; + private java.util.List actions_; + /** + * + * + *
+   * The list of actions to execute, in the order they are specified.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + * + * + *
+   * The list of actions to execute, in the order they are specified.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + * + * + *
+   * The list of actions to execute, in the order they are specified.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + * + * + *
+   * The list of actions to execute, in the order they are specified.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Action getActions(int index) { + return actions_.get(index); + } + /** + * + * + *
+   * The list of actions to execute, in the order they are specified.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ActionOrBuilder getActionsOrBuilder(int index) { + return actions_.get(index); + } + + public static final int RESOURCES_FIELD_NUMBER = 2; + private com.google.cloud.lifesciences.v2beta.Resources resources_; + /** + * + * + *
+   * The resources required for execution.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + * + * @return Whether the resources field is set. + */ + @java.lang.Override + public boolean hasResources() { + return resources_ != null; + } + /** + * + * + *
+   * The resources required for execution.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + * + * @return The resources. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Resources getResources() { + return resources_ == null + ? com.google.cloud.lifesciences.v2beta.Resources.getDefaultInstance() + : resources_; + } + /** + * + * + *
+   * The resources required for execution.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ResourcesOrBuilder getResourcesOrBuilder() { + return getResources(); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 3; + + private static final class EnvironmentDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Pipeline_EnvironmentEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField environment_; + + private com.google.protobuf.MapField + internalGetEnvironment() { + if (environment_ == null) { + return com.google.protobuf.MapField.emptyMapField(EnvironmentDefaultEntryHolder.defaultEntry); + } + return environment_; + } + + public int getEnvironmentCount() { + return internalGetEnvironment().getMap().size(); + } + /** + * + * + *
+   * The environment to pass into every action. Each action can also specify
+   * additional environment variables but cannot delete an entry from this map
+   * (though they can overwrite it with a different value).
+   * 
+ * + * map<string, string> environment = 3; + */ + @java.lang.Override + public boolean containsEnvironment(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetEnvironment().getMap().containsKey(key); + } + /** Use {@link #getEnvironmentMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvironment() { + return getEnvironmentMap(); + } + /** + * + * + *
+   * The environment to pass into every action. Each action can also specify
+   * additional environment variables but cannot delete an entry from this map
+   * (though they can overwrite it with a different value).
+   * 
+ * + * map<string, string> environment = 3; + */ + @java.lang.Override + public java.util.Map getEnvironmentMap() { + return internalGetEnvironment().getMap(); + } + /** + * + * + *
+   * The environment to pass into every action. Each action can also specify
+   * additional environment variables but cannot delete an entry from this map
+   * (though they can overwrite it with a different value).
+   * 
+ * + * map<string, string> environment = 3; + */ + @java.lang.Override + public java.lang.String getEnvironmentOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvironment().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The environment to pass into every action. Each action can also specify
+   * additional environment variables but cannot delete an entry from this map
+   * (though they can overwrite it with a different value).
+   * 
+ * + * map<string, string> environment = 3; + */ + @java.lang.Override + public java.lang.String getEnvironmentOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvironment().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TIMEOUT_FIELD_NUMBER = 4; + private com.google.protobuf.Duration timeout_; + /** + * + * + *
+   * The maximum amount of time to give the pipeline to complete.  This includes
+   * the time spent waiting for a worker to be allocated.  If the pipeline fails
+   * to complete before the timeout, it will be cancelled and the error code
+   * will be set to DEADLINE_EXCEEDED.
+   * If unspecified, it will default to 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 4; + * + * @return Whether the timeout field is set. + */ + @java.lang.Override + public boolean hasTimeout() { + return timeout_ != null; + } + /** + * + * + *
+   * The maximum amount of time to give the pipeline to complete.  This includes
+   * the time spent waiting for a worker to be allocated.  If the pipeline fails
+   * to complete before the timeout, it will be cancelled and the error code
+   * will be set to DEADLINE_EXCEEDED.
+   * If unspecified, it will default to 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 4; + * + * @return The timeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeout() { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + /** + * + * + *
+   * The maximum amount of time to give the pipeline to complete.  This includes
+   * the time spent waiting for a worker to be allocated.  If the pipeline fails
+   * to complete before the timeout, it will be cancelled and the error code
+   * will be set to DEADLINE_EXCEEDED.
+   * If unspecified, it will default to 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 4; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + return getTimeout(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 < actions_.size(); i++) { + output.writeMessage(1, actions_.get(i)); + } + if (resources_ != null) { + output.writeMessage(2, getResources()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetEnvironment(), EnvironmentDefaultEntryHolder.defaultEntry, 3); + if (timeout_ != null) { + output.writeMessage(4, getTimeout()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, actions_.get(i)); + } + if (resources_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResources()); + } + for (java.util.Map.Entry entry : + internalGetEnvironment().getMap().entrySet()) { + com.google.protobuf.MapEntry environment__ = + EnvironmentDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, environment__); + } + if (timeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTimeout()); + } + 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.lifesciences.v2beta.Pipeline)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.Pipeline other = + (com.google.cloud.lifesciences.v2beta.Pipeline) obj; + + if (!getActionsList().equals(other.getActionsList())) return false; + if (hasResources() != other.hasResources()) return false; + if (hasResources()) { + if (!getResources().equals(other.getResources())) return false; + } + if (!internalGetEnvironment().equals(other.internalGetEnvironment())) return false; + if (hasTimeout() != other.hasTimeout()) return false; + if (hasTimeout()) { + if (!getTimeout().equals(other.getTimeout())) 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 (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + if (hasResources()) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResources().hashCode(); + } + if (!internalGetEnvironment().getMap().isEmpty()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + internalGetEnvironment().hashCode(); + } + if (hasTimeout()) { + hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getTimeout().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.Pipeline parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Pipeline 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.lifesciences.v2beta.Pipeline parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Pipeline parseFrom( + 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.lifesciences.v2beta.Pipeline parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Pipeline parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.Pipeline parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Pipeline parseFrom( + java.io.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.lifesciences.v2beta.Pipeline parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Pipeline parseDelimitedFrom( + java.io.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.lifesciences.v2beta.Pipeline parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Pipeline parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.Pipeline prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Specifies a series of actions to execute, expressed as Docker containers.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Pipeline} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.Pipeline) + com.google.cloud.lifesciences.v2beta.PipelineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Pipeline_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetEnvironment(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableEnvironment(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Pipeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Pipeline.class, + com.google.cloud.lifesciences.v2beta.Pipeline.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.Pipeline.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getActionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + actionsBuilder_.clear(); + } + if (resourcesBuilder_ == null) { + resources_ = null; + } else { + resources_ = null; + resourcesBuilder_ = null; + } + internalGetMutableEnvironment().clear(); + if (timeoutBuilder_ == null) { + timeout_ = null; + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Pipeline_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Pipeline getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.Pipeline.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Pipeline build() { + com.google.cloud.lifesciences.v2beta.Pipeline result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Pipeline buildPartial() { + com.google.cloud.lifesciences.v2beta.Pipeline result = + new com.google.cloud.lifesciences.v2beta.Pipeline(this); + int from_bitField0_ = bitField0_; + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + if (resourcesBuilder_ == null) { + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + result.environment_ = internalGetEnvironment(); + result.environment_.makeImmutable(); + if (timeoutBuilder_ == null) { + result.timeout_ = timeout_; + } else { + result.timeout_ = timeoutBuilder_.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.lifesciences.v2beta.Pipeline) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.Pipeline) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.Pipeline other) { + if (other == com.google.cloud.lifesciences.v2beta.Pipeline.getDefaultInstance()) return this; + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000001); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getActionsFieldBuilder() + : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + if (other.hasResources()) { + mergeResources(other.getResources()); + } + internalGetMutableEnvironment().mergeFrom(other.internalGetEnvironment()); + if (other.hasTimeout()) { + mergeTimeout(other.getTimeout()); + } + 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.lifesciences.v2beta.Pipeline parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.Pipeline) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List actions_ = + java.util.Collections.emptyList(); + + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Action, + com.google.cloud.lifesciences.v2beta.Action.Builder, + com.google.cloud.lifesciences.v2beta.ActionOrBuilder> + actionsBuilder_; + + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public com.google.cloud.lifesciences.v2beta.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public Builder setActions(int index, com.google.cloud.lifesciences.v2beta.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public Builder setActions( + int index, com.google.cloud.lifesciences.v2beta.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public Builder addActions(com.google.cloud.lifesciences.v2beta.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public Builder addActions(int index, com.google.cloud.lifesciences.v2beta.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public Builder addActions(com.google.cloud.lifesciences.v2beta.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public Builder addActions( + int index, com.google.cloud.lifesciences.v2beta.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public com.google.cloud.lifesciences.v2beta.Action.Builder getActionsBuilder(int index) { + return getActionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public com.google.cloud.lifesciences.v2beta.ActionOrBuilder getActionsOrBuilder(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public com.google.cloud.lifesciences.v2beta.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder() + .addBuilder(com.google.cloud.lifesciences.v2beta.Action.getDefaultInstance()); + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public com.google.cloud.lifesciences.v2beta.Action.Builder addActionsBuilder(int index) { + return getActionsFieldBuilder() + .addBuilder(index, com.google.cloud.lifesciences.v2beta.Action.getDefaultInstance()); + } + /** + * + * + *
+     * The list of actions to execute, in the order they are specified.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Action, + com.google.cloud.lifesciences.v2beta.Action.Builder, + com.google.cloud.lifesciences.v2beta.ActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Action, + com.google.cloud.lifesciences.v2beta.Action.Builder, + com.google.cloud.lifesciences.v2beta.ActionOrBuilder>( + actions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + actions_ = null; + } + return actionsBuilder_; + } + + private com.google.cloud.lifesciences.v2beta.Resources resources_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Resources, + com.google.cloud.lifesciences.v2beta.Resources.Builder, + com.google.cloud.lifesciences.v2beta.ResourcesOrBuilder> + resourcesBuilder_; + /** + * + * + *
+     * The resources required for execution.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + * + * @return Whether the resources field is set. + */ + public boolean hasResources() { + return resourcesBuilder_ != null || resources_ != null; + } + /** + * + * + *
+     * The resources required for execution.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + * + * @return The resources. + */ + public com.google.cloud.lifesciences.v2beta.Resources getResources() { + if (resourcesBuilder_ == null) { + return resources_ == null + ? com.google.cloud.lifesciences.v2beta.Resources.getDefaultInstance() + : resources_; + } else { + return resourcesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The resources required for execution.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + */ + public Builder setResources(com.google.cloud.lifesciences.v2beta.Resources value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resources_ = value; + onChanged(); + } else { + resourcesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The resources required for execution.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + */ + public Builder setResources( + com.google.cloud.lifesciences.v2beta.Resources.Builder builderForValue) { + if (resourcesBuilder_ == null) { + resources_ = builderForValue.build(); + onChanged(); + } else { + resourcesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The resources required for execution.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + */ + public Builder mergeResources(com.google.cloud.lifesciences.v2beta.Resources value) { + if (resourcesBuilder_ == null) { + if (resources_ != null) { + resources_ = + com.google.cloud.lifesciences.v2beta.Resources.newBuilder(resources_) + .mergeFrom(value) + .buildPartial(); + } else { + resources_ = value; + } + onChanged(); + } else { + resourcesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The resources required for execution.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = null; + onChanged(); + } else { + resources_ = null; + resourcesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The resources required for execution.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + */ + public com.google.cloud.lifesciences.v2beta.Resources.Builder getResourcesBuilder() { + + onChanged(); + return getResourcesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The resources required for execution.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + */ + public com.google.cloud.lifesciences.v2beta.ResourcesOrBuilder getResourcesOrBuilder() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilder(); + } else { + return resources_ == null + ? com.google.cloud.lifesciences.v2beta.Resources.getDefaultInstance() + : resources_; + } + } + /** + * + * + *
+     * The resources required for execution.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Resources, + com.google.cloud.lifesciences.v2beta.Resources.Builder, + com.google.cloud.lifesciences.v2beta.ResourcesOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Resources, + com.google.cloud.lifesciences.v2beta.Resources.Builder, + com.google.cloud.lifesciences.v2beta.ResourcesOrBuilder>( + getResources(), getParentForChildren(), isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + + private com.google.protobuf.MapField environment_; + + private com.google.protobuf.MapField + internalGetEnvironment() { + if (environment_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvironmentDefaultEntryHolder.defaultEntry); + } + return environment_; + } + + private com.google.protobuf.MapField + internalGetMutableEnvironment() { + onChanged(); + ; + if (environment_ == null) { + environment_ = + com.google.protobuf.MapField.newMapField(EnvironmentDefaultEntryHolder.defaultEntry); + } + if (!environment_.isMutable()) { + environment_ = environment_.copy(); + } + return environment_; + } + + public int getEnvironmentCount() { + return internalGetEnvironment().getMap().size(); + } + /** + * + * + *
+     * The environment to pass into every action. Each action can also specify
+     * additional environment variables but cannot delete an entry from this map
+     * (though they can overwrite it with a different value).
+     * 
+ * + * map<string, string> environment = 3; + */ + @java.lang.Override + public boolean containsEnvironment(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetEnvironment().getMap().containsKey(key); + } + /** Use {@link #getEnvironmentMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvironment() { + return getEnvironmentMap(); + } + /** + * + * + *
+     * The environment to pass into every action. Each action can also specify
+     * additional environment variables but cannot delete an entry from this map
+     * (though they can overwrite it with a different value).
+     * 
+ * + * map<string, string> environment = 3; + */ + @java.lang.Override + public java.util.Map getEnvironmentMap() { + return internalGetEnvironment().getMap(); + } + /** + * + * + *
+     * The environment to pass into every action. Each action can also specify
+     * additional environment variables but cannot delete an entry from this map
+     * (though they can overwrite it with a different value).
+     * 
+ * + * map<string, string> environment = 3; + */ + @java.lang.Override + public java.lang.String getEnvironmentOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvironment().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The environment to pass into every action. Each action can also specify
+     * additional environment variables but cannot delete an entry from this map
+     * (though they can overwrite it with a different value).
+     * 
+ * + * map<string, string> environment = 3; + */ + @java.lang.Override + public java.lang.String getEnvironmentOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvironment().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearEnvironment() { + internalGetMutableEnvironment().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The environment to pass into every action. Each action can also specify
+     * additional environment variables but cannot delete an entry from this map
+     * (though they can overwrite it with a different value).
+     * 
+ * + * map<string, string> environment = 3; + */ + public Builder removeEnvironment(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableEnvironment().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableEnvironment() { + return internalGetMutableEnvironment().getMutableMap(); + } + /** + * + * + *
+     * The environment to pass into every action. Each action can also specify
+     * additional environment variables but cannot delete an entry from this map
+     * (though they can overwrite it with a different value).
+     * 
+ * + * map<string, string> environment = 3; + */ + public Builder putEnvironment(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableEnvironment().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The environment to pass into every action. Each action can also specify
+     * additional environment variables but cannot delete an entry from this map
+     * (though they can overwrite it with a different value).
+     * 
+ * + * map<string, string> environment = 3; + */ + public Builder putAllEnvironment(java.util.Map values) { + internalGetMutableEnvironment().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Duration timeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeoutBuilder_; + /** + * + * + *
+     * The maximum amount of time to give the pipeline to complete.  This includes
+     * the time spent waiting for a worker to be allocated.  If the pipeline fails
+     * to complete before the timeout, it will be cancelled and the error code
+     * will be set to DEADLINE_EXCEEDED.
+     * If unspecified, it will default to 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 4; + * + * @return Whether the timeout field is set. + */ + public boolean hasTimeout() { + return timeoutBuilder_ != null || timeout_ != null; + } + /** + * + * + *
+     * The maximum amount of time to give the pipeline to complete.  This includes
+     * the time spent waiting for a worker to be allocated.  If the pipeline fails
+     * to complete before the timeout, it will be cancelled and the error code
+     * will be set to DEADLINE_EXCEEDED.
+     * If unspecified, it will default to 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 4; + * + * @return The timeout. + */ + public com.google.protobuf.Duration getTimeout() { + if (timeoutBuilder_ == null) { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } else { + return timeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The maximum amount of time to give the pipeline to complete.  This includes
+     * the time spent waiting for a worker to be allocated.  If the pipeline fails
+     * to complete before the timeout, it will be cancelled and the error code
+     * will be set to DEADLINE_EXCEEDED.
+     * If unspecified, it will default to 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 4; + */ + public Builder setTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeout_ = value; + onChanged(); + } else { + timeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time to give the pipeline to complete.  This includes
+     * the time spent waiting for a worker to be allocated.  If the pipeline fails
+     * to complete before the timeout, it will be cancelled and the error code
+     * will be set to DEADLINE_EXCEEDED.
+     * If unspecified, it will default to 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 4; + */ + public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (timeoutBuilder_ == null) { + timeout_ = builderForValue.build(); + onChanged(); + } else { + timeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time to give the pipeline to complete.  This includes
+     * the time spent waiting for a worker to be allocated.  If the pipeline fails
+     * to complete before the timeout, it will be cancelled and the error code
+     * will be set to DEADLINE_EXCEEDED.
+     * If unspecified, it will default to 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 4; + */ + public Builder mergeTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (timeout_ != null) { + timeout_ = + com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial(); + } else { + timeout_ = value; + } + onChanged(); + } else { + timeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time to give the pipeline to complete.  This includes
+     * the time spent waiting for a worker to be allocated.  If the pipeline fails
+     * to complete before the timeout, it will be cancelled and the error code
+     * will be set to DEADLINE_EXCEEDED.
+     * If unspecified, it will default to 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 4; + */ + public Builder clearTimeout() { + if (timeoutBuilder_ == null) { + timeout_ = null; + onChanged(); + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time to give the pipeline to complete.  This includes
+     * the time spent waiting for a worker to be allocated.  If the pipeline fails
+     * to complete before the timeout, it will be cancelled and the error code
+     * will be set to DEADLINE_EXCEEDED.
+     * If unspecified, it will default to 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 4; + */ + public com.google.protobuf.Duration.Builder getTimeoutBuilder() { + + onChanged(); + return getTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The maximum amount of time to give the pipeline to complete.  This includes
+     * the time spent waiting for a worker to be allocated.  If the pipeline fails
+     * to complete before the timeout, it will be cancelled and the error code
+     * will be set to DEADLINE_EXCEEDED.
+     * If unspecified, it will default to 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 4; + */ + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + if (timeoutBuilder_ != null) { + return timeoutBuilder_.getMessageOrBuilder(); + } else { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + } + /** + * + * + *
+     * The maximum amount of time to give the pipeline to complete.  This includes
+     * the time spent waiting for a worker to be allocated.  If the pipeline fails
+     * to complete before the timeout, it will be cancelled and the error code
+     * will be set to DEADLINE_EXCEEDED.
+     * If unspecified, it will default to 7 days.
+     * 
+ * + * .google.protobuf.Duration timeout = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeoutFieldBuilder() { + if (timeoutBuilder_ == null) { + timeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeout(), getParentForChildren(), isClean()); + timeout_ = null; + } + return timeoutBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.lifesciences.v2beta.Pipeline) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.Pipeline) + private static final com.google.cloud.lifesciences.v2beta.Pipeline DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.Pipeline(); + } + + public static com.google.cloud.lifesciences.v2beta.Pipeline getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Pipeline parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Pipeline(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.lifesciences.v2beta.Pipeline getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PipelineOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PipelineOrBuilder.java new file mode 100644 index 00000000..1a115260 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PipelineOrBuilder.java @@ -0,0 +1,223 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface PipelineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.Pipeline) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of actions to execute, in the order they are specified.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + java.util.List getActionsList(); + /** + * + * + *
+   * The list of actions to execute, in the order they are specified.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + com.google.cloud.lifesciences.v2beta.Action getActions(int index); + /** + * + * + *
+   * The list of actions to execute, in the order they are specified.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + int getActionsCount(); + /** + * + * + *
+   * The list of actions to execute, in the order they are specified.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + java.util.List + getActionsOrBuilderList(); + /** + * + * + *
+   * The list of actions to execute, in the order they are specified.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Action actions = 1; + */ + com.google.cloud.lifesciences.v2beta.ActionOrBuilder getActionsOrBuilder(int index); + + /** + * + * + *
+   * The resources required for execution.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + * + * @return Whether the resources field is set. + */ + boolean hasResources(); + /** + * + * + *
+   * The resources required for execution.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + * + * @return The resources. + */ + com.google.cloud.lifesciences.v2beta.Resources getResources(); + /** + * + * + *
+   * The resources required for execution.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Resources resources = 2; + */ + com.google.cloud.lifesciences.v2beta.ResourcesOrBuilder getResourcesOrBuilder(); + + /** + * + * + *
+   * The environment to pass into every action. Each action can also specify
+   * additional environment variables but cannot delete an entry from this map
+   * (though they can overwrite it with a different value).
+   * 
+ * + * map<string, string> environment = 3; + */ + int getEnvironmentCount(); + /** + * + * + *
+   * The environment to pass into every action. Each action can also specify
+   * additional environment variables but cannot delete an entry from this map
+   * (though they can overwrite it with a different value).
+   * 
+ * + * map<string, string> environment = 3; + */ + boolean containsEnvironment(java.lang.String key); + /** Use {@link #getEnvironmentMap()} instead. */ + @java.lang.Deprecated + java.util.Map getEnvironment(); + /** + * + * + *
+   * The environment to pass into every action. Each action can also specify
+   * additional environment variables but cannot delete an entry from this map
+   * (though they can overwrite it with a different value).
+   * 
+ * + * map<string, string> environment = 3; + */ + java.util.Map getEnvironmentMap(); + /** + * + * + *
+   * The environment to pass into every action. Each action can also specify
+   * additional environment variables but cannot delete an entry from this map
+   * (though they can overwrite it with a different value).
+   * 
+ * + * map<string, string> environment = 3; + */ + java.lang.String getEnvironmentOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The environment to pass into every action. Each action can also specify
+   * additional environment variables but cannot delete an entry from this map
+   * (though they can overwrite it with a different value).
+   * 
+ * + * map<string, string> environment = 3; + */ + java.lang.String getEnvironmentOrThrow(java.lang.String key); + + /** + * + * + *
+   * The maximum amount of time to give the pipeline to complete.  This includes
+   * the time spent waiting for a worker to be allocated.  If the pipeline fails
+   * to complete before the timeout, it will be cancelled and the error code
+   * will be set to DEADLINE_EXCEEDED.
+   * If unspecified, it will default to 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 4; + * + * @return Whether the timeout field is set. + */ + boolean hasTimeout(); + /** + * + * + *
+   * The maximum amount of time to give the pipeline to complete.  This includes
+   * the time spent waiting for a worker to be allocated.  If the pipeline fails
+   * to complete before the timeout, it will be cancelled and the error code
+   * will be set to DEADLINE_EXCEEDED.
+   * If unspecified, it will default to 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 4; + * + * @return The timeout. + */ + com.google.protobuf.Duration getTimeout(); + /** + * + * + *
+   * The maximum amount of time to give the pipeline to complete.  This includes
+   * the time spent waiting for a worker to be allocated.  If the pipeline fails
+   * to complete before the timeout, it will be cancelled and the error code
+   * will be set to DEADLINE_EXCEEDED.
+   * If unspecified, it will default to 7 days.
+   * 
+ * + * .google.protobuf.Duration timeout = 4; + */ + com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStartedEvent.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStartedEvent.java new file mode 100644 index 00000000..2999c442 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStartedEvent.java @@ -0,0 +1,637 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * An event generated when the worker starts pulling an image.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.PullStartedEvent} + */ +public final class PullStartedEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.PullStartedEvent) + PullStartedEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use PullStartedEvent.newBuilder() to construct. + private PullStartedEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PullStartedEvent() { + imageUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PullStartedEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PullStartedEvent( + 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(); + + imageUri_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PullStartedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PullStartedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.PullStartedEvent.class, + com.google.cloud.lifesciences.v2beta.PullStartedEvent.Builder.class); + } + + public static final int IMAGE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object imageUri_; + /** + * + * + *
+   * The URI of the image that was pulled.
+   * 
+ * + * string image_uri = 1; + * + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the image that was pulled.
+   * 
+ * + * string image_uri = 1; + * + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = 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 (!getImageUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getImageUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageUri_); + } + 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.lifesciences.v2beta.PullStartedEvent)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.PullStartedEvent other = + (com.google.cloud.lifesciences.v2beta.PullStartedEvent) obj; + + if (!getImageUri().equals(other.getImageUri())) 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_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.PullStartedEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.PullStartedEvent 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.lifesciences.v2beta.PullStartedEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.PullStartedEvent parseFrom( + 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.lifesciences.v2beta.PullStartedEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.PullStartedEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.PullStartedEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.PullStartedEvent parseFrom( + java.io.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.lifesciences.v2beta.PullStartedEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.PullStartedEvent parseDelimitedFrom( + java.io.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.lifesciences.v2beta.PullStartedEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.PullStartedEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.PullStartedEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event generated when the worker starts pulling an image.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.PullStartedEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.PullStartedEvent) + com.google.cloud.lifesciences.v2beta.PullStartedEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PullStartedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PullStartedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.PullStartedEvent.class, + com.google.cloud.lifesciences.v2beta.PullStartedEvent.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.PullStartedEvent.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(); + imageUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PullStartedEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStartedEvent getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.PullStartedEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStartedEvent build() { + com.google.cloud.lifesciences.v2beta.PullStartedEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStartedEvent buildPartial() { + com.google.cloud.lifesciences.v2beta.PullStartedEvent result = + new com.google.cloud.lifesciences.v2beta.PullStartedEvent(this); + result.imageUri_ = imageUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.PullStartedEvent) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.PullStartedEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.PullStartedEvent other) { + if (other == com.google.cloud.lifesciences.v2beta.PullStartedEvent.getDefaultInstance()) + return this; + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + 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.lifesciences.v2beta.PullStartedEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.PullStartedEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object imageUri_ = ""; + /** + * + * + *
+     * The URI of the image that was pulled.
+     * 
+ * + * string image_uri = 1; + * + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the image that was pulled.
+     * 
+ * + * string image_uri = 1; + * + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the image that was pulled.
+     * 
+ * + * string image_uri = 1; + * + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the image that was pulled.
+     * 
+ * + * string image_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the image that was pulled.
+     * 
+ * + * string image_uri = 1; + * + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = 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.lifesciences.v2beta.PullStartedEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.PullStartedEvent) + private static final com.google.cloud.lifesciences.v2beta.PullStartedEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.PullStartedEvent(); + } + + public static com.google.cloud.lifesciences.v2beta.PullStartedEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PullStartedEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PullStartedEvent(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.lifesciences.v2beta.PullStartedEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStartedEventOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStartedEventOrBuilder.java new file mode 100644 index 00000000..3ee09888 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStartedEventOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface PullStartedEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.PullStartedEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI of the image that was pulled.
+   * 
+ * + * string image_uri = 1; + * + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + * + * + *
+   * The URI of the image that was pulled.
+   * 
+ * + * string image_uri = 1; + * + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString getImageUriBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStoppedEvent.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStoppedEvent.java new file mode 100644 index 00000000..00a9401c --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStoppedEvent.java @@ -0,0 +1,637 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * An event generated when the worker stops pulling an image.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.PullStoppedEvent} + */ +public final class PullStoppedEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.PullStoppedEvent) + PullStoppedEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use PullStoppedEvent.newBuilder() to construct. + private PullStoppedEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PullStoppedEvent() { + imageUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PullStoppedEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PullStoppedEvent( + 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(); + + imageUri_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PullStoppedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PullStoppedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.PullStoppedEvent.class, + com.google.cloud.lifesciences.v2beta.PullStoppedEvent.Builder.class); + } + + public static final int IMAGE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object imageUri_; + /** + * + * + *
+   * The URI of the image that was pulled.
+   * 
+ * + * string image_uri = 1; + * + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the image that was pulled.
+   * 
+ * + * string image_uri = 1; + * + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = 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 (!getImageUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getImageUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageUri_); + } + 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.lifesciences.v2beta.PullStoppedEvent)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.PullStoppedEvent other = + (com.google.cloud.lifesciences.v2beta.PullStoppedEvent) obj; + + if (!getImageUri().equals(other.getImageUri())) 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_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.PullStoppedEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.PullStoppedEvent 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.lifesciences.v2beta.PullStoppedEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.PullStoppedEvent parseFrom( + 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.lifesciences.v2beta.PullStoppedEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.PullStoppedEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.PullStoppedEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.PullStoppedEvent parseFrom( + java.io.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.lifesciences.v2beta.PullStoppedEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.PullStoppedEvent parseDelimitedFrom( + java.io.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.lifesciences.v2beta.PullStoppedEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.PullStoppedEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.PullStoppedEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event generated when the worker stops pulling an image.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.PullStoppedEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.PullStoppedEvent) + com.google.cloud.lifesciences.v2beta.PullStoppedEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PullStoppedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PullStoppedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.PullStoppedEvent.class, + com.google.cloud.lifesciences.v2beta.PullStoppedEvent.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.PullStoppedEvent.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(); + imageUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_PullStoppedEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStoppedEvent getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.PullStoppedEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStoppedEvent build() { + com.google.cloud.lifesciences.v2beta.PullStoppedEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PullStoppedEvent buildPartial() { + com.google.cloud.lifesciences.v2beta.PullStoppedEvent result = + new com.google.cloud.lifesciences.v2beta.PullStoppedEvent(this); + result.imageUri_ = imageUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.PullStoppedEvent) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.PullStoppedEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.PullStoppedEvent other) { + if (other == com.google.cloud.lifesciences.v2beta.PullStoppedEvent.getDefaultInstance()) + return this; + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + 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.lifesciences.v2beta.PullStoppedEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.PullStoppedEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object imageUri_ = ""; + /** + * + * + *
+     * The URI of the image that was pulled.
+     * 
+ * + * string image_uri = 1; + * + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the image that was pulled.
+     * 
+ * + * string image_uri = 1; + * + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the image that was pulled.
+     * 
+ * + * string image_uri = 1; + * + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the image that was pulled.
+     * 
+ * + * string image_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the image that was pulled.
+     * 
+ * + * string image_uri = 1; + * + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = 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.lifesciences.v2beta.PullStoppedEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.PullStoppedEvent) + private static final com.google.cloud.lifesciences.v2beta.PullStoppedEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.PullStoppedEvent(); + } + + public static com.google.cloud.lifesciences.v2beta.PullStoppedEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PullStoppedEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PullStoppedEvent(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.lifesciences.v2beta.PullStoppedEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStoppedEventOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStoppedEventOrBuilder.java new file mode 100644 index 00000000..36d09caf --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/PullStoppedEventOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface PullStoppedEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.PullStoppedEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI of the image that was pulled.
+   * 
+ * + * string image_uri = 1; + * + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + * + * + *
+   * The URI of the image that was pulled.
+   * 
+ * + * string image_uri = 1; + * + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString getImageUriBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Resources.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Resources.java new file mode 100644 index 00000000..8047064e --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Resources.java @@ -0,0 +1,1319 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * The system resources for the pipeline run.
+ * At least one zone or region must be specified or the pipeline run will fail.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Resources} + */ +public final class Resources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.Resources) + ResourcesOrBuilder { + private static final long serialVersionUID = 0L; + // Use Resources.newBuilder() to construct. + private Resources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Resources() { + regions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Resources(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Resources( + 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 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + regions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + regions_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + zones_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + zones_.add(s); + break; + } + case 34: + { + com.google.cloud.lifesciences.v2beta.VirtualMachine.Builder subBuilder = null; + if (virtualMachine_ != null) { + subBuilder = virtualMachine_.toBuilder(); + } + virtualMachine_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.VirtualMachine.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(virtualMachine_); + virtualMachine_ = 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)) { + regions_ = regions_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + zones_ = zones_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Resources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Resources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Resources.class, + com.google.cloud.lifesciences.v2beta.Resources.Builder.class); + } + + public static final int REGIONS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList regions_; + /** + * + * + *
+   * The list of regions allowed for VM allocation. If set, the `zones` field
+   * must not be set.
+   * 
+ * + * repeated string regions = 2; + * + * @return A list containing the regions. + */ + public com.google.protobuf.ProtocolStringList getRegionsList() { + return regions_; + } + /** + * + * + *
+   * The list of regions allowed for VM allocation. If set, the `zones` field
+   * must not be set.
+   * 
+ * + * repeated string regions = 2; + * + * @return The count of regions. + */ + public int getRegionsCount() { + return regions_.size(); + } + /** + * + * + *
+   * The list of regions allowed for VM allocation. If set, the `zones` field
+   * must not be set.
+   * 
+ * + * repeated string regions = 2; + * + * @param index The index of the element to return. + * @return The regions at the given index. + */ + public java.lang.String getRegions(int index) { + return regions_.get(index); + } + /** + * + * + *
+   * The list of regions allowed for VM allocation. If set, the `zones` field
+   * must not be set.
+   * 
+ * + * repeated string regions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the regions at the given index. + */ + public com.google.protobuf.ByteString getRegionsBytes(int index) { + return regions_.getByteString(index); + } + + public static final int ZONES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList zones_; + /** + * + * + *
+   * The list of zones allowed for VM allocation. If set, the `regions` field
+   * must not be set.
+   * 
+ * + * repeated string zones = 3; + * + * @return A list containing the zones. + */ + public com.google.protobuf.ProtocolStringList getZonesList() { + return zones_; + } + /** + * + * + *
+   * The list of zones allowed for VM allocation. If set, the `regions` field
+   * must not be set.
+   * 
+ * + * repeated string zones = 3; + * + * @return The count of zones. + */ + public int getZonesCount() { + return zones_.size(); + } + /** + * + * + *
+   * The list of zones allowed for VM allocation. If set, the `regions` field
+   * must not be set.
+   * 
+ * + * repeated string zones = 3; + * + * @param index The index of the element to return. + * @return The zones at the given index. + */ + public java.lang.String getZones(int index) { + return zones_.get(index); + } + /** + * + * + *
+   * The list of zones allowed for VM allocation. If set, the `regions` field
+   * must not be set.
+   * 
+ * + * repeated string zones = 3; + * + * @param index The index of the value to return. + * @return The bytes of the zones at the given index. + */ + public com.google.protobuf.ByteString getZonesBytes(int index) { + return zones_.getByteString(index); + } + + public static final int VIRTUAL_MACHINE_FIELD_NUMBER = 4; + private com.google.cloud.lifesciences.v2beta.VirtualMachine virtualMachine_; + /** + * + * + *
+   * The virtual machine specification.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + * + * @return Whether the virtualMachine field is set. + */ + @java.lang.Override + public boolean hasVirtualMachine() { + return virtualMachine_ != null; + } + /** + * + * + *
+   * The virtual machine specification.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + * + * @return The virtualMachine. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.VirtualMachine getVirtualMachine() { + return virtualMachine_ == null + ? com.google.cloud.lifesciences.v2beta.VirtualMachine.getDefaultInstance() + : virtualMachine_; + } + /** + * + * + *
+   * The virtual machine specification.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.VirtualMachineOrBuilder getVirtualMachineOrBuilder() { + return getVirtualMachine(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 < regions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, regions_.getRaw(i)); + } + for (int i = 0; i < zones_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, zones_.getRaw(i)); + } + if (virtualMachine_ != null) { + output.writeMessage(4, getVirtualMachine()); + } + 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 < regions_.size(); i++) { + dataSize += computeStringSizeNoTag(regions_.getRaw(i)); + } + size += dataSize; + size += 1 * getRegionsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < zones_.size(); i++) { + dataSize += computeStringSizeNoTag(zones_.getRaw(i)); + } + size += dataSize; + size += 1 * getZonesList().size(); + } + if (virtualMachine_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getVirtualMachine()); + } + 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.lifesciences.v2beta.Resources)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.Resources other = + (com.google.cloud.lifesciences.v2beta.Resources) obj; + + if (!getRegionsList().equals(other.getRegionsList())) return false; + if (!getZonesList().equals(other.getZonesList())) return false; + if (hasVirtualMachine() != other.hasVirtualMachine()) return false; + if (hasVirtualMachine()) { + if (!getVirtualMachine().equals(other.getVirtualMachine())) 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 (getRegionsCount() > 0) { + hash = (37 * hash) + REGIONS_FIELD_NUMBER; + hash = (53 * hash) + getRegionsList().hashCode(); + } + if (getZonesCount() > 0) { + hash = (37 * hash) + ZONES_FIELD_NUMBER; + hash = (53 * hash) + getZonesList().hashCode(); + } + if (hasVirtualMachine()) { + hash = (37 * hash) + VIRTUAL_MACHINE_FIELD_NUMBER; + hash = (53 * hash) + getVirtualMachine().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.Resources parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Resources 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.lifesciences.v2beta.Resources parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Resources parseFrom( + 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.lifesciences.v2beta.Resources parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Resources parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.Resources parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Resources parseFrom( + java.io.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.lifesciences.v2beta.Resources parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Resources parseDelimitedFrom( + java.io.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.lifesciences.v2beta.Resources parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Resources parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.Resources prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 system resources for the pipeline run.
+   * At least one zone or region must be specified or the pipeline run will fail.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Resources} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.Resources) + com.google.cloud.lifesciences.v2beta.ResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Resources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Resources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Resources.class, + com.google.cloud.lifesciences.v2beta.Resources.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.Resources.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(); + regions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (virtualMachineBuilder_ == null) { + virtualMachine_ = null; + } else { + virtualMachine_ = null; + virtualMachineBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Resources_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Resources getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.Resources.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Resources build() { + com.google.cloud.lifesciences.v2beta.Resources result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Resources buildPartial() { + com.google.cloud.lifesciences.v2beta.Resources result = + new com.google.cloud.lifesciences.v2beta.Resources(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + regions_ = regions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.regions_ = regions_; + if (((bitField0_ & 0x00000002) != 0)) { + zones_ = zones_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.zones_ = zones_; + if (virtualMachineBuilder_ == null) { + result.virtualMachine_ = virtualMachine_; + } else { + result.virtualMachine_ = virtualMachineBuilder_.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.lifesciences.v2beta.Resources) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.Resources) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.Resources other) { + if (other == com.google.cloud.lifesciences.v2beta.Resources.getDefaultInstance()) return this; + if (!other.regions_.isEmpty()) { + if (regions_.isEmpty()) { + regions_ = other.regions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRegionsIsMutable(); + regions_.addAll(other.regions_); + } + onChanged(); + } + if (!other.zones_.isEmpty()) { + if (zones_.isEmpty()) { + zones_ = other.zones_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureZonesIsMutable(); + zones_.addAll(other.zones_); + } + onChanged(); + } + if (other.hasVirtualMachine()) { + mergeVirtualMachine(other.getVirtualMachine()); + } + 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.lifesciences.v2beta.Resources parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.Resources) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList regions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureRegionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + regions_ = new com.google.protobuf.LazyStringArrayList(regions_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The list of regions allowed for VM allocation. If set, the `zones` field
+     * must not be set.
+     * 
+ * + * repeated string regions = 2; + * + * @return A list containing the regions. + */ + public com.google.protobuf.ProtocolStringList getRegionsList() { + return regions_.getUnmodifiableView(); + } + /** + * + * + *
+     * The list of regions allowed for VM allocation. If set, the `zones` field
+     * must not be set.
+     * 
+ * + * repeated string regions = 2; + * + * @return The count of regions. + */ + public int getRegionsCount() { + return regions_.size(); + } + /** + * + * + *
+     * The list of regions allowed for VM allocation. If set, the `zones` field
+     * must not be set.
+     * 
+ * + * repeated string regions = 2; + * + * @param index The index of the element to return. + * @return The regions at the given index. + */ + public java.lang.String getRegions(int index) { + return regions_.get(index); + } + /** + * + * + *
+     * The list of regions allowed for VM allocation. If set, the `zones` field
+     * must not be set.
+     * 
+ * + * repeated string regions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the regions at the given index. + */ + public com.google.protobuf.ByteString getRegionsBytes(int index) { + return regions_.getByteString(index); + } + /** + * + * + *
+     * The list of regions allowed for VM allocation. If set, the `zones` field
+     * must not be set.
+     * 
+ * + * repeated string regions = 2; + * + * @param index The index to set the value at. + * @param value The regions to set. + * @return This builder for chaining. + */ + public Builder setRegions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRegionsIsMutable(); + regions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of regions allowed for VM allocation. If set, the `zones` field
+     * must not be set.
+     * 
+ * + * repeated string regions = 2; + * + * @param value The regions to add. + * @return This builder for chaining. + */ + public Builder addRegions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRegionsIsMutable(); + regions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of regions allowed for VM allocation. If set, the `zones` field
+     * must not be set.
+     * 
+ * + * repeated string regions = 2; + * + * @param values The regions to add. + * @return This builder for chaining. + */ + public Builder addAllRegions(java.lang.Iterable values) { + ensureRegionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, regions_); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of regions allowed for VM allocation. If set, the `zones` field
+     * must not be set.
+     * 
+ * + * repeated string regions = 2; + * + * @return This builder for chaining. + */ + public Builder clearRegions() { + regions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of regions allowed for VM allocation. If set, the `zones` field
+     * must not be set.
+     * 
+ * + * repeated string regions = 2; + * + * @param value The bytes of the regions to add. + * @return This builder for chaining. + */ + public Builder addRegionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRegionsIsMutable(); + regions_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList zones_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureZonesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + zones_ = new com.google.protobuf.LazyStringArrayList(zones_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The list of zones allowed for VM allocation. If set, the `regions` field
+     * must not be set.
+     * 
+ * + * repeated string zones = 3; + * + * @return A list containing the zones. + */ + public com.google.protobuf.ProtocolStringList getZonesList() { + return zones_.getUnmodifiableView(); + } + /** + * + * + *
+     * The list of zones allowed for VM allocation. If set, the `regions` field
+     * must not be set.
+     * 
+ * + * repeated string zones = 3; + * + * @return The count of zones. + */ + public int getZonesCount() { + return zones_.size(); + } + /** + * + * + *
+     * The list of zones allowed for VM allocation. If set, the `regions` field
+     * must not be set.
+     * 
+ * + * repeated string zones = 3; + * + * @param index The index of the element to return. + * @return The zones at the given index. + */ + public java.lang.String getZones(int index) { + return zones_.get(index); + } + /** + * + * + *
+     * The list of zones allowed for VM allocation. If set, the `regions` field
+     * must not be set.
+     * 
+ * + * repeated string zones = 3; + * + * @param index The index of the value to return. + * @return The bytes of the zones at the given index. + */ + public com.google.protobuf.ByteString getZonesBytes(int index) { + return zones_.getByteString(index); + } + /** + * + * + *
+     * The list of zones allowed for VM allocation. If set, the `regions` field
+     * must not be set.
+     * 
+ * + * repeated string zones = 3; + * + * @param index The index to set the value at. + * @param value The zones to set. + * @return This builder for chaining. + */ + public Builder setZones(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of zones allowed for VM allocation. If set, the `regions` field
+     * must not be set.
+     * 
+ * + * repeated string zones = 3; + * + * @param value The zones to add. + * @return This builder for chaining. + */ + public Builder addZones(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of zones allowed for VM allocation. If set, the `regions` field
+     * must not be set.
+     * 
+ * + * repeated string zones = 3; + * + * @param values The zones to add. + * @return This builder for chaining. + */ + public Builder addAllZones(java.lang.Iterable values) { + ensureZonesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, zones_); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of zones allowed for VM allocation. If set, the `regions` field
+     * must not be set.
+     * 
+ * + * repeated string zones = 3; + * + * @return This builder for chaining. + */ + public Builder clearZones() { + zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of zones allowed for VM allocation. If set, the `regions` field
+     * must not be set.
+     * 
+ * + * repeated string zones = 3; + * + * @param value The bytes of the zones to add. + * @return This builder for chaining. + */ + public Builder addZonesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureZonesIsMutable(); + zones_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.lifesciences.v2beta.VirtualMachine virtualMachine_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.VirtualMachine, + com.google.cloud.lifesciences.v2beta.VirtualMachine.Builder, + com.google.cloud.lifesciences.v2beta.VirtualMachineOrBuilder> + virtualMachineBuilder_; + /** + * + * + *
+     * The virtual machine specification.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + * + * @return Whether the virtualMachine field is set. + */ + public boolean hasVirtualMachine() { + return virtualMachineBuilder_ != null || virtualMachine_ != null; + } + /** + * + * + *
+     * The virtual machine specification.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + * + * @return The virtualMachine. + */ + public com.google.cloud.lifesciences.v2beta.VirtualMachine getVirtualMachine() { + if (virtualMachineBuilder_ == null) { + return virtualMachine_ == null + ? com.google.cloud.lifesciences.v2beta.VirtualMachine.getDefaultInstance() + : virtualMachine_; + } else { + return virtualMachineBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The virtual machine specification.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + */ + public Builder setVirtualMachine(com.google.cloud.lifesciences.v2beta.VirtualMachine value) { + if (virtualMachineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + virtualMachine_ = value; + onChanged(); + } else { + virtualMachineBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The virtual machine specification.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + */ + public Builder setVirtualMachine( + com.google.cloud.lifesciences.v2beta.VirtualMachine.Builder builderForValue) { + if (virtualMachineBuilder_ == null) { + virtualMachine_ = builderForValue.build(); + onChanged(); + } else { + virtualMachineBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The virtual machine specification.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + */ + public Builder mergeVirtualMachine(com.google.cloud.lifesciences.v2beta.VirtualMachine value) { + if (virtualMachineBuilder_ == null) { + if (virtualMachine_ != null) { + virtualMachine_ = + com.google.cloud.lifesciences.v2beta.VirtualMachine.newBuilder(virtualMachine_) + .mergeFrom(value) + .buildPartial(); + } else { + virtualMachine_ = value; + } + onChanged(); + } else { + virtualMachineBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The virtual machine specification.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + */ + public Builder clearVirtualMachine() { + if (virtualMachineBuilder_ == null) { + virtualMachine_ = null; + onChanged(); + } else { + virtualMachine_ = null; + virtualMachineBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The virtual machine specification.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + */ + public com.google.cloud.lifesciences.v2beta.VirtualMachine.Builder getVirtualMachineBuilder() { + + onChanged(); + return getVirtualMachineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The virtual machine specification.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + */ + public com.google.cloud.lifesciences.v2beta.VirtualMachineOrBuilder + getVirtualMachineOrBuilder() { + if (virtualMachineBuilder_ != null) { + return virtualMachineBuilder_.getMessageOrBuilder(); + } else { + return virtualMachine_ == null + ? com.google.cloud.lifesciences.v2beta.VirtualMachine.getDefaultInstance() + : virtualMachine_; + } + } + /** + * + * + *
+     * The virtual machine specification.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.VirtualMachine, + com.google.cloud.lifesciences.v2beta.VirtualMachine.Builder, + com.google.cloud.lifesciences.v2beta.VirtualMachineOrBuilder> + getVirtualMachineFieldBuilder() { + if (virtualMachineBuilder_ == null) { + virtualMachineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.VirtualMachine, + com.google.cloud.lifesciences.v2beta.VirtualMachine.Builder, + com.google.cloud.lifesciences.v2beta.VirtualMachineOrBuilder>( + getVirtualMachine(), getParentForChildren(), isClean()); + virtualMachine_ = null; + } + return virtualMachineBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.lifesciences.v2beta.Resources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.Resources) + private static final com.google.cloud.lifesciences.v2beta.Resources DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.Resources(); + } + + public static com.google.cloud.lifesciences.v2beta.Resources getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Resources(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.lifesciences.v2beta.Resources getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ResourcesOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ResourcesOrBuilder.java new file mode 100644 index 00000000..b4462e24 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ResourcesOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface ResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.Resources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of regions allowed for VM allocation. If set, the `zones` field
+   * must not be set.
+   * 
+ * + * repeated string regions = 2; + * + * @return A list containing the regions. + */ + java.util.List getRegionsList(); + /** + * + * + *
+   * The list of regions allowed for VM allocation. If set, the `zones` field
+   * must not be set.
+   * 
+ * + * repeated string regions = 2; + * + * @return The count of regions. + */ + int getRegionsCount(); + /** + * + * + *
+   * The list of regions allowed for VM allocation. If set, the `zones` field
+   * must not be set.
+   * 
+ * + * repeated string regions = 2; + * + * @param index The index of the element to return. + * @return The regions at the given index. + */ + java.lang.String getRegions(int index); + /** + * + * + *
+   * The list of regions allowed for VM allocation. If set, the `zones` field
+   * must not be set.
+   * 
+ * + * repeated string regions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the regions at the given index. + */ + com.google.protobuf.ByteString getRegionsBytes(int index); + + /** + * + * + *
+   * The list of zones allowed for VM allocation. If set, the `regions` field
+   * must not be set.
+   * 
+ * + * repeated string zones = 3; + * + * @return A list containing the zones. + */ + java.util.List getZonesList(); + /** + * + * + *
+   * The list of zones allowed for VM allocation. If set, the `regions` field
+   * must not be set.
+   * 
+ * + * repeated string zones = 3; + * + * @return The count of zones. + */ + int getZonesCount(); + /** + * + * + *
+   * The list of zones allowed for VM allocation. If set, the `regions` field
+   * must not be set.
+   * 
+ * + * repeated string zones = 3; + * + * @param index The index of the element to return. + * @return The zones at the given index. + */ + java.lang.String getZones(int index); + /** + * + * + *
+   * The list of zones allowed for VM allocation. If set, the `regions` field
+   * must not be set.
+   * 
+ * + * repeated string zones = 3; + * + * @param index The index of the value to return. + * @return The bytes of the zones at the given index. + */ + com.google.protobuf.ByteString getZonesBytes(int index); + + /** + * + * + *
+   * The virtual machine specification.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + * + * @return Whether the virtualMachine field is set. + */ + boolean hasVirtualMachine(); + /** + * + * + *
+   * The virtual machine specification.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + * + * @return The virtualMachine. + */ + com.google.cloud.lifesciences.v2beta.VirtualMachine getVirtualMachine(); + /** + * + * + *
+   * The virtual machine specification.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.VirtualMachine virtual_machine = 4; + */ + com.google.cloud.lifesciences.v2beta.VirtualMachineOrBuilder getVirtualMachineOrBuilder(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineRequest.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineRequest.java new file mode 100644 index 00000000..9ed0348f --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineRequest.java @@ -0,0 +1,1511 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * The arguments to the `RunPipeline` method. The requesting user must have
+ * the `iam.serviceAccounts.actAs` permission for the Cloud Life Sciences
+ * service account or the request will fail.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.RunPipelineRequest} + */ +public final class RunPipelineRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.RunPipelineRequest) + RunPipelineRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunPipelineRequest.newBuilder() to construct. + private RunPipelineRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunPipelineRequest() { + parent_ = ""; + pubSubTopic_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunPipelineRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunPipelineRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.lifesciences.v2beta.Pipeline.Builder subBuilder = null; + if (pipeline_ != null) { + subBuilder = pipeline_.toBuilder(); + } + pipeline_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.Pipeline.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(pipeline_); + pipeline_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pubSubTopic_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.RunPipelineRequest.class, + com.google.cloud.lifesciences.v2beta.RunPipelineRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 4; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * The project and location that this request should be executed against.
+   * 
+ * + * string parent = 4; + * + * @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; + } + } + /** + * + * + *
+   * The project and location that this request should be executed against.
+   * 
+ * + * string parent = 4; + * + * @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 PIPELINE_FIELD_NUMBER = 1; + private com.google.cloud.lifesciences.v2beta.Pipeline pipeline_; + /** + * + * + *
+   * Required. The description of the pipeline to run.
+   * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pipeline field is set. + */ + @java.lang.Override + public boolean hasPipeline() { + return pipeline_ != null; + } + /** + * + * + *
+   * Required. The description of the pipeline to run.
+   * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pipeline. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Pipeline getPipeline() { + return pipeline_ == null + ? com.google.cloud.lifesciences.v2beta.Pipeline.getDefaultInstance() + : pipeline_; + } + /** + * + * + *
+   * Required. The description of the pipeline to run.
+   * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PipelineOrBuilder getPipelineOrBuilder() { + return getPipeline(); + } + + public static final int LABELS_FIELD_NUMBER = 2; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_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(); + } + /** + * + * + *
+   * User-defined labels to associate with the returned operation. These
+   * labels are not propagated to any Google Cloud Platform resources used by
+   * the operation, and can be modified at any time.
+   * To associate labels with resources created while executing the operation,
+   * see the appropriate resource message (for example, `VirtualMachine`).
+   * 
+ * + * map<string, string> labels = 2; + */ + @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(); + } + /** + * + * + *
+   * User-defined labels to associate with the returned operation. These
+   * labels are not propagated to any Google Cloud Platform resources used by
+   * the operation, and can be modified at any time.
+   * To associate labels with resources created while executing the operation,
+   * see the appropriate resource message (for example, `VirtualMachine`).
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * User-defined labels to associate with the returned operation. These
+   * labels are not propagated to any Google Cloud Platform resources used by
+   * the operation, and can be modified at any time.
+   * To associate labels with resources created while executing the operation,
+   * see the appropriate resource message (for example, `VirtualMachine`).
+   * 
+ * + * map<string, string> labels = 2; + */ + @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; + } + /** + * + * + *
+   * User-defined labels to associate with the returned operation. These
+   * labels are not propagated to any Google Cloud Platform resources used by
+   * the operation, and can be modified at any time.
+   * To associate labels with resources created while executing the operation,
+   * see the appropriate resource message (for example, `VirtualMachine`).
+   * 
+ * + * map<string, string> labels = 2; + */ + @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 PUB_SUB_TOPIC_FIELD_NUMBER = 3; + private volatile java.lang.Object pubSubTopic_; + /** + * + * + *
+   * The name of an existing Pub/Sub topic.  The server will publish
+   * messages to this topic whenever the status of the operation changes.
+   * The Life Sciences Service Agent account must have publisher permissions to
+   * the specified topic or notifications will not be sent.
+   * 
+ * + * string pub_sub_topic = 3; + * + * @return The pubSubTopic. + */ + @java.lang.Override + public java.lang.String getPubSubTopic() { + java.lang.Object ref = pubSubTopic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pubSubTopic_ = s; + return s; + } + } + /** + * + * + *
+   * The name of an existing Pub/Sub topic.  The server will publish
+   * messages to this topic whenever the status of the operation changes.
+   * The Life Sciences Service Agent account must have publisher permissions to
+   * the specified topic or notifications will not be sent.
+   * 
+ * + * string pub_sub_topic = 3; + * + * @return The bytes for pubSubTopic. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPubSubTopicBytes() { + java.lang.Object ref = pubSubTopic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pubSubTopic_ = 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 (pipeline_ != null) { + output.writeMessage(1, getPipeline()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); + if (!getPubSubTopicBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pubSubTopic_); + } + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pipeline_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPipeline()); + } + 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(2, labels__); + } + if (!getPubSubTopicBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pubSubTopic_); + } + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); + } + 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.lifesciences.v2beta.RunPipelineRequest)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.RunPipelineRequest other = + (com.google.cloud.lifesciences.v2beta.RunPipelineRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasPipeline() != other.hasPipeline()) return false; + if (hasPipeline()) { + if (!getPipeline().equals(other.getPipeline())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getPubSubTopic().equals(other.getPubSubTopic())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasPipeline()) { + hash = (37 * hash) + PIPELINE_FIELD_NUMBER; + hash = (53 * hash) + getPipeline().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + PUB_SUB_TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getPubSubTopic().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineRequest 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.lifesciences.v2beta.RunPipelineRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineRequest parseFrom( + 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.lifesciences.v2beta.RunPipelineRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineRequest parseFrom( + java.io.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.lifesciences.v2beta.RunPipelineRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineRequest parseDelimitedFrom( + java.io.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.lifesciences.v2beta.RunPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.RunPipelineRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 arguments to the `RunPipeline` method. The requesting user must have
+   * the `iam.serviceAccounts.actAs` permission for the Cloud Life Sciences
+   * service account or the request will fail.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.RunPipelineRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.RunPipelineRequest) + com.google.cloud.lifesciences.v2beta.RunPipelineRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.RunPipelineRequest.class, + com.google.cloud.lifesciences.v2beta.RunPipelineRequest.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.RunPipelineRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (pipelineBuilder_ == null) { + pipeline_ = null; + } else { + pipeline_ = null; + pipelineBuilder_ = null; + } + internalGetMutableLabels().clear(); + pubSubTopic_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.RunPipelineRequest getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.RunPipelineRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.RunPipelineRequest build() { + com.google.cloud.lifesciences.v2beta.RunPipelineRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.RunPipelineRequest buildPartial() { + com.google.cloud.lifesciences.v2beta.RunPipelineRequest result = + new com.google.cloud.lifesciences.v2beta.RunPipelineRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (pipelineBuilder_ == null) { + result.pipeline_ = pipeline_; + } else { + result.pipeline_ = pipelineBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.pubSubTopic_ = pubSubTopic_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.RunPipelineRequest) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.RunPipelineRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.RunPipelineRequest other) { + if (other == com.google.cloud.lifesciences.v2beta.RunPipelineRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasPipeline()) { + mergePipeline(other.getPipeline()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (!other.getPubSubTopic().isEmpty()) { + pubSubTopic_ = other.pubSubTopic_; + 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.lifesciences.v2beta.RunPipelineRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.RunPipelineRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The project and location that this request should be executed against.
+     * 
+ * + * string parent = 4; + * + * @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; + } + } + /** + * + * + *
+     * The project and location that this request should be executed against.
+     * 
+ * + * string parent = 4; + * + * @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; + } + } + /** + * + * + *
+     * The project and location that this request should be executed against.
+     * 
+ * + * string parent = 4; + * + * @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; + } + /** + * + * + *
+     * The project and location that this request should be executed against.
+     * 
+ * + * string parent = 4; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The project and location that this request should be executed against.
+     * 
+ * + * string parent = 4; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.lifesciences.v2beta.Pipeline pipeline_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Pipeline, + com.google.cloud.lifesciences.v2beta.Pipeline.Builder, + com.google.cloud.lifesciences.v2beta.PipelineOrBuilder> + pipelineBuilder_; + /** + * + * + *
+     * Required. The description of the pipeline to run.
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pipeline field is set. + */ + public boolean hasPipeline() { + return pipelineBuilder_ != null || pipeline_ != null; + } + /** + * + * + *
+     * Required. The description of the pipeline to run.
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pipeline. + */ + public com.google.cloud.lifesciences.v2beta.Pipeline getPipeline() { + if (pipelineBuilder_ == null) { + return pipeline_ == null + ? com.google.cloud.lifesciences.v2beta.Pipeline.getDefaultInstance() + : pipeline_; + } else { + return pipelineBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The description of the pipeline to run.
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPipeline(com.google.cloud.lifesciences.v2beta.Pipeline value) { + if (pipelineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pipeline_ = value; + onChanged(); + } else { + pipelineBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The description of the pipeline to run.
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPipeline( + com.google.cloud.lifesciences.v2beta.Pipeline.Builder builderForValue) { + if (pipelineBuilder_ == null) { + pipeline_ = builderForValue.build(); + onChanged(); + } else { + pipelineBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The description of the pipeline to run.
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePipeline(com.google.cloud.lifesciences.v2beta.Pipeline value) { + if (pipelineBuilder_ == null) { + if (pipeline_ != null) { + pipeline_ = + com.google.cloud.lifesciences.v2beta.Pipeline.newBuilder(pipeline_) + .mergeFrom(value) + .buildPartial(); + } else { + pipeline_ = value; + } + onChanged(); + } else { + pipelineBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The description of the pipeline to run.
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPipeline() { + if (pipelineBuilder_ == null) { + pipeline_ = null; + onChanged(); + } else { + pipeline_ = null; + pipelineBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The description of the pipeline to run.
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.lifesciences.v2beta.Pipeline.Builder getPipelineBuilder() { + + onChanged(); + return getPipelineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The description of the pipeline to run.
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.lifesciences.v2beta.PipelineOrBuilder getPipelineOrBuilder() { + if (pipelineBuilder_ != null) { + return pipelineBuilder_.getMessageOrBuilder(); + } else { + return pipeline_ == null + ? com.google.cloud.lifesciences.v2beta.Pipeline.getDefaultInstance() + : pipeline_; + } + } + /** + * + * + *
+     * Required. The description of the pipeline to run.
+     * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Pipeline, + com.google.cloud.lifesciences.v2beta.Pipeline.Builder, + com.google.cloud.lifesciences.v2beta.PipelineOrBuilder> + getPipelineFieldBuilder() { + if (pipelineBuilder_ == null) { + pipelineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Pipeline, + com.google.cloud.lifesciences.v2beta.Pipeline.Builder, + com.google.cloud.lifesciences.v2beta.PipelineOrBuilder>( + getPipeline(), getParentForChildren(), isClean()); + pipeline_ = null; + } + return pipelineBuilder_; + } + + 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(); + } + /** + * + * + *
+     * User-defined labels to associate with the returned operation. These
+     * labels are not propagated to any Google Cloud Platform resources used by
+     * the operation, and can be modified at any time.
+     * To associate labels with resources created while executing the operation,
+     * see the appropriate resource message (for example, `VirtualMachine`).
+     * 
+ * + * map<string, string> labels = 2; + */ + @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(); + } + /** + * + * + *
+     * User-defined labels to associate with the returned operation. These
+     * labels are not propagated to any Google Cloud Platform resources used by
+     * the operation, and can be modified at any time.
+     * To associate labels with resources created while executing the operation,
+     * see the appropriate resource message (for example, `VirtualMachine`).
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * User-defined labels to associate with the returned operation. These
+     * labels are not propagated to any Google Cloud Platform resources used by
+     * the operation, and can be modified at any time.
+     * To associate labels with resources created while executing the operation,
+     * see the appropriate resource message (for example, `VirtualMachine`).
+     * 
+ * + * map<string, string> labels = 2; + */ + @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; + } + /** + * + * + *
+     * User-defined labels to associate with the returned operation. These
+     * labels are not propagated to any Google Cloud Platform resources used by
+     * the operation, and can be modified at any time.
+     * To associate labels with resources created while executing the operation,
+     * see the appropriate resource message (for example, `VirtualMachine`).
+     * 
+ * + * map<string, string> labels = 2; + */ + @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; + } + /** + * + * + *
+     * User-defined labels to associate with the returned operation. These
+     * labels are not propagated to any Google Cloud Platform resources used by
+     * the operation, and can be modified at any time.
+     * To associate labels with resources created while executing the operation,
+     * see the appropriate resource message (for example, `VirtualMachine`).
+     * 
+ * + * map<string, string> labels = 2; + */ + 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(); + } + /** + * + * + *
+     * User-defined labels to associate with the returned operation. These
+     * labels are not propagated to any Google Cloud Platform resources used by
+     * the operation, and can be modified at any time.
+     * To associate labels with resources created while executing the operation,
+     * see the appropriate resource message (for example, `VirtualMachine`).
+     * 
+ * + * map<string, string> labels = 2; + */ + 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; + } + /** + * + * + *
+     * User-defined labels to associate with the returned operation. These
+     * labels are not propagated to any Google Cloud Platform resources used by
+     * the operation, and can be modified at any time.
+     * To associate labels with resources created while executing the operation,
+     * see the appropriate resource message (for example, `VirtualMachine`).
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object pubSubTopic_ = ""; + /** + * + * + *
+     * The name of an existing Pub/Sub topic.  The server will publish
+     * messages to this topic whenever the status of the operation changes.
+     * The Life Sciences Service Agent account must have publisher permissions to
+     * the specified topic or notifications will not be sent.
+     * 
+ * + * string pub_sub_topic = 3; + * + * @return The pubSubTopic. + */ + public java.lang.String getPubSubTopic() { + java.lang.Object ref = pubSubTopic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pubSubTopic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of an existing Pub/Sub topic.  The server will publish
+     * messages to this topic whenever the status of the operation changes.
+     * The Life Sciences Service Agent account must have publisher permissions to
+     * the specified topic or notifications will not be sent.
+     * 
+ * + * string pub_sub_topic = 3; + * + * @return The bytes for pubSubTopic. + */ + public com.google.protobuf.ByteString getPubSubTopicBytes() { + java.lang.Object ref = pubSubTopic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pubSubTopic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of an existing Pub/Sub topic.  The server will publish
+     * messages to this topic whenever the status of the operation changes.
+     * The Life Sciences Service Agent account must have publisher permissions to
+     * the specified topic or notifications will not be sent.
+     * 
+ * + * string pub_sub_topic = 3; + * + * @param value The pubSubTopic to set. + * @return This builder for chaining. + */ + public Builder setPubSubTopic(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pubSubTopic_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of an existing Pub/Sub topic.  The server will publish
+     * messages to this topic whenever the status of the operation changes.
+     * The Life Sciences Service Agent account must have publisher permissions to
+     * the specified topic or notifications will not be sent.
+     * 
+ * + * string pub_sub_topic = 3; + * + * @return This builder for chaining. + */ + public Builder clearPubSubTopic() { + + pubSubTopic_ = getDefaultInstance().getPubSubTopic(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of an existing Pub/Sub topic.  The server will publish
+     * messages to this topic whenever the status of the operation changes.
+     * The Life Sciences Service Agent account must have publisher permissions to
+     * the specified topic or notifications will not be sent.
+     * 
+ * + * string pub_sub_topic = 3; + * + * @param value The bytes for pubSubTopic to set. + * @return This builder for chaining. + */ + public Builder setPubSubTopicBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pubSubTopic_ = 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.lifesciences.v2beta.RunPipelineRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.RunPipelineRequest) + private static final com.google.cloud.lifesciences.v2beta.RunPipelineRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.RunPipelineRequest(); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunPipelineRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunPipelineRequest(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.lifesciences.v2beta.RunPipelineRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineRequestOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineRequestOrBuilder.java new file mode 100644 index 00000000..fb90cde9 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineRequestOrBuilder.java @@ -0,0 +1,196 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface RunPipelineRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.RunPipelineRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The project and location that this request should be executed against.
+   * 
+ * + * string parent = 4; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The project and location that this request should be executed against.
+   * 
+ * + * string parent = 4; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The description of the pipeline to run.
+   * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the pipeline field is set. + */ + boolean hasPipeline(); + /** + * + * + *
+   * Required. The description of the pipeline to run.
+   * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The pipeline. + */ + com.google.cloud.lifesciences.v2beta.Pipeline getPipeline(); + /** + * + * + *
+   * Required. The description of the pipeline to run.
+   * 
+ * + * + * .google.cloud.lifesciences.v2beta.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.lifesciences.v2beta.PipelineOrBuilder getPipelineOrBuilder(); + + /** + * + * + *
+   * User-defined labels to associate with the returned operation. These
+   * labels are not propagated to any Google Cloud Platform resources used by
+   * the operation, and can be modified at any time.
+   * To associate labels with resources created while executing the operation,
+   * see the appropriate resource message (for example, `VirtualMachine`).
+   * 
+ * + * map<string, string> labels = 2; + */ + int getLabelsCount(); + /** + * + * + *
+   * User-defined labels to associate with the returned operation. These
+   * labels are not propagated to any Google Cloud Platform resources used by
+   * the operation, and can be modified at any time.
+   * To associate labels with resources created while executing the operation,
+   * see the appropriate resource message (for example, `VirtualMachine`).
+   * 
+ * + * map<string, string> labels = 2; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * User-defined labels to associate with the returned operation. These
+   * labels are not propagated to any Google Cloud Platform resources used by
+   * the operation, and can be modified at any time.
+   * To associate labels with resources created while executing the operation,
+   * see the appropriate resource message (for example, `VirtualMachine`).
+   * 
+ * + * map<string, string> labels = 2; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * User-defined labels to associate with the returned operation. These
+   * labels are not propagated to any Google Cloud Platform resources used by
+   * the operation, and can be modified at any time.
+   * To associate labels with resources created while executing the operation,
+   * see the appropriate resource message (for example, `VirtualMachine`).
+   * 
+ * + * map<string, string> labels = 2; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * User-defined labels to associate with the returned operation. These
+   * labels are not propagated to any Google Cloud Platform resources used by
+   * the operation, and can be modified at any time.
+   * To associate labels with resources created while executing the operation,
+   * see the appropriate resource message (for example, `VirtualMachine`).
+   * 
+ * + * map<string, string> labels = 2; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The name of an existing Pub/Sub topic.  The server will publish
+   * messages to this topic whenever the status of the operation changes.
+   * The Life Sciences Service Agent account must have publisher permissions to
+   * the specified topic or notifications will not be sent.
+   * 
+ * + * string pub_sub_topic = 3; + * + * @return The pubSubTopic. + */ + java.lang.String getPubSubTopic(); + /** + * + * + *
+   * The name of an existing Pub/Sub topic.  The server will publish
+   * messages to this topic whenever the status of the operation changes.
+   * The Life Sciences Service Agent account must have publisher permissions to
+   * the specified topic or notifications will not be sent.
+   * 
+ * + * string pub_sub_topic = 3; + * + * @return The bytes for pubSubTopic. + */ + com.google.protobuf.ByteString getPubSubTopicBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineResponse.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineResponse.java new file mode 100644 index 00000000..09ec213c --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineResponse.java @@ -0,0 +1,459 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * The response to the RunPipeline method, returned in the operation's result
+ * field on success.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.RunPipelineResponse} + */ +public final class RunPipelineResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.RunPipelineResponse) + RunPipelineResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunPipelineResponse.newBuilder() to construct. + private RunPipelineResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunPipelineResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunPipelineResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunPipelineResponse( + 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_RunPipelineResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_RunPipelineResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.RunPipelineResponse.class, + com.google.cloud.lifesciences.v2beta.RunPipelineResponse.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.lifesciences.v2beta.RunPipelineResponse)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.RunPipelineResponse other = + (com.google.cloud.lifesciences.v2beta.RunPipelineResponse) 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.lifesciences.v2beta.RunPipelineResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineResponse 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.lifesciences.v2beta.RunPipelineResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineResponse parseFrom( + 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.lifesciences.v2beta.RunPipelineResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineResponse parseFrom( + java.io.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.lifesciences.v2beta.RunPipelineResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineResponse parseDelimitedFrom( + java.io.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.lifesciences.v2beta.RunPipelineResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.RunPipelineResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 to the RunPipeline method, returned in the operation's result
+   * field on success.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.RunPipelineResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.RunPipelineResponse) + com.google.cloud.lifesciences.v2beta.RunPipelineResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_RunPipelineResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_RunPipelineResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.RunPipelineResponse.class, + com.google.cloud.lifesciences.v2beta.RunPipelineResponse.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.RunPipelineResponse.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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_RunPipelineResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.RunPipelineResponse getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.RunPipelineResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.RunPipelineResponse build() { + com.google.cloud.lifesciences.v2beta.RunPipelineResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.RunPipelineResponse buildPartial() { + com.google.cloud.lifesciences.v2beta.RunPipelineResponse result = + new com.google.cloud.lifesciences.v2beta.RunPipelineResponse(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.lifesciences.v2beta.RunPipelineResponse) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.RunPipelineResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.RunPipelineResponse other) { + if (other == com.google.cloud.lifesciences.v2beta.RunPipelineResponse.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.lifesciences.v2beta.RunPipelineResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.RunPipelineResponse) 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.lifesciences.v2beta.RunPipelineResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.RunPipelineResponse) + private static final com.google.cloud.lifesciences.v2beta.RunPipelineResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.RunPipelineResponse(); + } + + public static com.google.cloud.lifesciences.v2beta.RunPipelineResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunPipelineResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunPipelineResponse(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.lifesciences.v2beta.RunPipelineResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineResponseOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineResponseOrBuilder.java new file mode 100644 index 00000000..e6835681 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/RunPipelineResponseOrBuilder.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/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface RunPipelineResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.RunPipelineResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Secret.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Secret.java new file mode 100644 index 00000000..7a24caa6 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Secret.java @@ -0,0 +1,836 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Holds encrypted information that is only decrypted and stored in RAM
+ * by the worker VM when running the pipeline.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Secret} + */ +public final class Secret extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.Secret) + SecretOrBuilder { + private static final long serialVersionUID = 0L; + // Use Secret.newBuilder() to construct. + private Secret(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Secret() { + keyName_ = ""; + cipherText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Secret(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Secret( + 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(); + + keyName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + cipherText_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Secret_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Secret_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Secret.class, + com.google.cloud.lifesciences.v2beta.Secret.Builder.class); + } + + public static final int KEY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object keyName_; + /** + * + * + *
+   * The name of the Cloud KMS key that will be used to decrypt the secret
+   * value. The VM service account must have the required permissions and
+   * authentication scopes to invoke the `decrypt` method on the specified key.
+   * 
+ * + * string key_name = 1; + * + * @return The keyName. + */ + @java.lang.Override + public java.lang.String getKeyName() { + java.lang.Object ref = keyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyName_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the Cloud KMS key that will be used to decrypt the secret
+   * value. The VM service account must have the required permissions and
+   * authentication scopes to invoke the `decrypt` method on the specified key.
+   * 
+ * + * string key_name = 1; + * + * @return The bytes for keyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyNameBytes() { + java.lang.Object ref = keyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CIPHER_TEXT_FIELD_NUMBER = 2; + private volatile java.lang.Object cipherText_; + /** + * + * + *
+   * The value of the cipherText response from the `encrypt` method. This field
+   * is intentionally unaudited.
+   * 
+ * + * string cipher_text = 2; + * + * @return The cipherText. + */ + @java.lang.Override + public java.lang.String getCipherText() { + java.lang.Object ref = cipherText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cipherText_ = s; + return s; + } + } + /** + * + * + *
+   * The value of the cipherText response from the `encrypt` method. This field
+   * is intentionally unaudited.
+   * 
+ * + * string cipher_text = 2; + * + * @return The bytes for cipherText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCipherTextBytes() { + java.lang.Object ref = cipherText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cipherText_ = 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 (!getKeyNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyName_); + } + if (!getCipherTextBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cipherText_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKeyNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyName_); + } + if (!getCipherTextBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cipherText_); + } + 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.lifesciences.v2beta.Secret)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.Secret other = + (com.google.cloud.lifesciences.v2beta.Secret) obj; + + if (!getKeyName().equals(other.getKeyName())) return false; + if (!getCipherText().equals(other.getCipherText())) 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) + KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKeyName().hashCode(); + hash = (37 * hash) + CIPHER_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getCipherText().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.Secret parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Secret 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.lifesciences.v2beta.Secret parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Secret parseFrom( + 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.lifesciences.v2beta.Secret parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Secret parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.Secret parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Secret parseFrom( + java.io.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.lifesciences.v2beta.Secret parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Secret parseDelimitedFrom( + java.io.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.lifesciences.v2beta.Secret parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Secret parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.Secret prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Holds encrypted information that is only decrypted and stored in RAM
+   * by the worker VM when running the pipeline.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Secret} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.Secret) + com.google.cloud.lifesciences.v2beta.SecretOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Secret_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Secret_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Secret.class, + com.google.cloud.lifesciences.v2beta.Secret.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.Secret.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(); + keyName_ = ""; + + cipherText_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Secret_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Secret getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.Secret.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Secret build() { + com.google.cloud.lifesciences.v2beta.Secret result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Secret buildPartial() { + com.google.cloud.lifesciences.v2beta.Secret result = + new com.google.cloud.lifesciences.v2beta.Secret(this); + result.keyName_ = keyName_; + result.cipherText_ = cipherText_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.Secret) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.Secret) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.Secret other) { + if (other == com.google.cloud.lifesciences.v2beta.Secret.getDefaultInstance()) return this; + if (!other.getKeyName().isEmpty()) { + keyName_ = other.keyName_; + onChanged(); + } + if (!other.getCipherText().isEmpty()) { + cipherText_ = other.cipherText_; + 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.lifesciences.v2beta.Secret parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.Secret) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object keyName_ = ""; + /** + * + * + *
+     * The name of the Cloud KMS key that will be used to decrypt the secret
+     * value. The VM service account must have the required permissions and
+     * authentication scopes to invoke the `decrypt` method on the specified key.
+     * 
+ * + * string key_name = 1; + * + * @return The keyName. + */ + public java.lang.String getKeyName() { + java.lang.Object ref = keyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the Cloud KMS key that will be used to decrypt the secret
+     * value. The VM service account must have the required permissions and
+     * authentication scopes to invoke the `decrypt` method on the specified key.
+     * 
+ * + * string key_name = 1; + * + * @return The bytes for keyName. + */ + public com.google.protobuf.ByteString getKeyNameBytes() { + java.lang.Object ref = keyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the Cloud KMS key that will be used to decrypt the secret
+     * value. The VM service account must have the required permissions and
+     * authentication scopes to invoke the `decrypt` method on the specified key.
+     * 
+ * + * string key_name = 1; + * + * @param value The keyName to set. + * @return This builder for chaining. + */ + public Builder setKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + keyName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the Cloud KMS key that will be used to decrypt the secret
+     * value. The VM service account must have the required permissions and
+     * authentication scopes to invoke the `decrypt` method on the specified key.
+     * 
+ * + * string key_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearKeyName() { + + keyName_ = getDefaultInstance().getKeyName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the Cloud KMS key that will be used to decrypt the secret
+     * value. The VM service account must have the required permissions and
+     * authentication scopes to invoke the `decrypt` method on the specified key.
+     * 
+ * + * string key_name = 1; + * + * @param value The bytes for keyName to set. + * @return This builder for chaining. + */ + public Builder setKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + keyName_ = value; + onChanged(); + return this; + } + + private java.lang.Object cipherText_ = ""; + /** + * + * + *
+     * The value of the cipherText response from the `encrypt` method. This field
+     * is intentionally unaudited.
+     * 
+ * + * string cipher_text = 2; + * + * @return The cipherText. + */ + public java.lang.String getCipherText() { + java.lang.Object ref = cipherText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cipherText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The value of the cipherText response from the `encrypt` method. This field
+     * is intentionally unaudited.
+     * 
+ * + * string cipher_text = 2; + * + * @return The bytes for cipherText. + */ + public com.google.protobuf.ByteString getCipherTextBytes() { + java.lang.Object ref = cipherText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cipherText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The value of the cipherText response from the `encrypt` method. This field
+     * is intentionally unaudited.
+     * 
+ * + * string cipher_text = 2; + * + * @param value The cipherText to set. + * @return This builder for chaining. + */ + public Builder setCipherText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cipherText_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The value of the cipherText response from the `encrypt` method. This field
+     * is intentionally unaudited.
+     * 
+ * + * string cipher_text = 2; + * + * @return This builder for chaining. + */ + public Builder clearCipherText() { + + cipherText_ = getDefaultInstance().getCipherText(); + onChanged(); + return this; + } + /** + * + * + *
+     * The value of the cipherText response from the `encrypt` method. This field
+     * is intentionally unaudited.
+     * 
+ * + * string cipher_text = 2; + * + * @param value The bytes for cipherText to set. + * @return This builder for chaining. + */ + public Builder setCipherTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cipherText_ = 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.lifesciences.v2beta.Secret) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.Secret) + private static final com.google.cloud.lifesciences.v2beta.Secret DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.Secret(); + } + + public static com.google.cloud.lifesciences.v2beta.Secret getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Secret parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Secret(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.lifesciences.v2beta.Secret getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/SecretOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/SecretOrBuilder.java new file mode 100644 index 00000000..15e1f946 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/SecretOrBuilder.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/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface SecretOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.Secret) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the Cloud KMS key that will be used to decrypt the secret
+   * value. The VM service account must have the required permissions and
+   * authentication scopes to invoke the `decrypt` method on the specified key.
+   * 
+ * + * string key_name = 1; + * + * @return The keyName. + */ + java.lang.String getKeyName(); + /** + * + * + *
+   * The name of the Cloud KMS key that will be used to decrypt the secret
+   * value. The VM service account must have the required permissions and
+   * authentication scopes to invoke the `decrypt` method on the specified key.
+   * 
+ * + * string key_name = 1; + * + * @return The bytes for keyName. + */ + com.google.protobuf.ByteString getKeyNameBytes(); + + /** + * + * + *
+   * The value of the cipherText response from the `encrypt` method. This field
+   * is intentionally unaudited.
+   * 
+ * + * string cipher_text = 2; + * + * @return The cipherText. + */ + java.lang.String getCipherText(); + /** + * + * + *
+   * The value of the cipherText response from the `encrypt` method. This field
+   * is intentionally unaudited.
+   * 
+ * + * string cipher_text = 2; + * + * @return The bytes for cipherText. + */ + com.google.protobuf.ByteString getCipherTextBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ServiceAccount.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ServiceAccount.java new file mode 100644 index 00000000..052b8917 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ServiceAccount.java @@ -0,0 +1,936 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Carries information about a Google Cloud service account.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.ServiceAccount} + */ +public final class ServiceAccount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.ServiceAccount) + ServiceAccountOrBuilder { + private static final long serialVersionUID = 0L; + // Use ServiceAccount.newBuilder() to construct. + private ServiceAccount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceAccount() { + email_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ServiceAccount(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ServiceAccount( + 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(); + + email_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + scopes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + scopes_.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)) { + scopes_ = scopes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ServiceAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ServiceAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.ServiceAccount.class, + com.google.cloud.lifesciences.v2beta.ServiceAccount.Builder.class); + } + + public static final int EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object email_; + /** + * + * + *
+   * Email address of the service account. If not specified, the default
+   * Compute Engine service account for the project will be used.
+   * 
+ * + * string email = 1; + * + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } + } + /** + * + * + *
+   * Email address of the service account. If not specified, the default
+   * Compute Engine service account for the project will be used.
+   * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList scopes_; + /** + * + * + *
+   * List of scopes to be enabled for this service account on the VM, in
+   * addition to the cloud-platform API scope that will be added by default.
+   * 
+ * + * repeated string scopes = 2; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + return scopes_; + } + /** + * + * + *
+   * List of scopes to be enabled for this service account on the VM, in
+   * addition to the cloud-platform API scope that will be added by default.
+   * 
+ * + * repeated string scopes = 2; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + /** + * + * + *
+   * List of scopes to be enabled for this service account on the VM, in
+   * addition to the cloud-platform API scope that will be added by default.
+   * 
+ * + * repeated string scopes = 2; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + /** + * + * + *
+   * List of scopes to be enabled for this service account on the VM, in
+   * addition to the cloud-platform API scope that will be added by default.
+   * 
+ * + * repeated string scopes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.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 (!getEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, email_); + } + for (int i = 0; i < scopes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, scopes_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEmailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, email_); + } + { + int dataSize = 0; + for (int i = 0; i < scopes_.size(); i++) { + dataSize += computeStringSizeNoTag(scopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopesList().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.lifesciences.v2beta.ServiceAccount)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.ServiceAccount other = + (com.google.cloud.lifesciences.v2beta.ServiceAccount) obj; + + if (!getEmail().equals(other.getEmail())) return false; + if (!getScopesList().equals(other.getScopesList())) 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) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + if (getScopesCount() > 0) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getScopesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.ServiceAccount parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ServiceAccount 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.lifesciences.v2beta.ServiceAccount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ServiceAccount parseFrom( + 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.lifesciences.v2beta.ServiceAccount parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.ServiceAccount parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.ServiceAccount parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ServiceAccount parseFrom( + java.io.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.lifesciences.v2beta.ServiceAccount parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ServiceAccount parseDelimitedFrom( + java.io.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.lifesciences.v2beta.ServiceAccount parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.ServiceAccount parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.ServiceAccount prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Carries information about a Google Cloud service account.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.ServiceAccount} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.ServiceAccount) + com.google.cloud.lifesciences.v2beta.ServiceAccountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ServiceAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ServiceAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.ServiceAccount.class, + com.google.cloud.lifesciences.v2beta.ServiceAccount.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.ServiceAccount.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(); + email_ = ""; + + scopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_ServiceAccount_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ServiceAccount getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.ServiceAccount.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ServiceAccount build() { + com.google.cloud.lifesciences.v2beta.ServiceAccount result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ServiceAccount buildPartial() { + com.google.cloud.lifesciences.v2beta.ServiceAccount result = + new com.google.cloud.lifesciences.v2beta.ServiceAccount(this); + int from_bitField0_ = bitField0_; + result.email_ = email_; + if (((bitField0_ & 0x00000001) != 0)) { + scopes_ = scopes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.scopes_ = scopes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.ServiceAccount) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.ServiceAccount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.ServiceAccount other) { + if (other == com.google.cloud.lifesciences.v2beta.ServiceAccount.getDefaultInstance()) + return this; + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + onChanged(); + } + if (!other.scopes_.isEmpty()) { + if (scopes_.isEmpty()) { + scopes_ = other.scopes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureScopesIsMutable(); + scopes_.addAll(other.scopes_); + } + 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.lifesciences.v2beta.ServiceAccount parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.ServiceAccount) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object email_ = ""; + /** + * + * + *
+     * Email address of the service account. If not specified, the default
+     * Compute Engine service account for the project will be used.
+     * 
+ * + * string email = 1; + * + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Email address of the service account. If not specified, the default
+     * Compute Engine service account for the project will be used.
+     * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Email address of the service account. If not specified, the default
+     * Compute Engine service account for the project will be used.
+     * 
+ * + * string email = 1; + * + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + email_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Email address of the service account. If not specified, the default
+     * Compute Engine service account for the project will be used.
+     * 
+ * + * string email = 1; + * + * @return This builder for chaining. + */ + public Builder clearEmail() { + + email_ = getDefaultInstance().getEmail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Email address of the service account. If not specified, the default
+     * Compute Engine service account for the project will be used.
+     * 
+ * + * string email = 1; + * + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + email_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList scopes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureScopesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * List of scopes to be enabled for this service account on the VM, in
+     * addition to the cloud-platform API scope that will be added by default.
+     * 
+ * + * repeated string scopes = 2; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + return scopes_.getUnmodifiableView(); + } + /** + * + * + *
+     * List of scopes to be enabled for this service account on the VM, in
+     * addition to the cloud-platform API scope that will be added by default.
+     * 
+ * + * repeated string scopes = 2; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + /** + * + * + *
+     * List of scopes to be enabled for this service account on the VM, in
+     * addition to the cloud-platform API scope that will be added by default.
+     * 
+ * + * repeated string scopes = 2; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + /** + * + * + *
+     * List of scopes to be enabled for this service account on the VM, in
+     * addition to the cloud-platform API scope that will be added by default.
+     * 
+ * + * repeated string scopes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + /** + * + * + *
+     * List of scopes to be enabled for this service account on the VM, in
+     * addition to the cloud-platform API scope that will be added by default.
+     * 
+ * + * repeated string scopes = 2; + * + * @param index The index to set the value at. + * @param value The scopes to set. + * @return This builder for chaining. + */ + public Builder setScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * List of scopes to be enabled for this service account on the VM, in
+     * addition to the cloud-platform API scope that will be added by default.
+     * 
+ * + * repeated string scopes = 2; + * + * @param value The scopes to add. + * @return This builder for chaining. + */ + public Builder addScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * List of scopes to be enabled for this service account on the VM, in
+     * addition to the cloud-platform API scope that will be added by default.
+     * 
+ * + * repeated string scopes = 2; + * + * @param values The scopes to add. + * @return This builder for chaining. + */ + public Builder addAllScopes(java.lang.Iterable values) { + ensureScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_); + onChanged(); + return this; + } + /** + * + * + *
+     * List of scopes to be enabled for this service account on the VM, in
+     * addition to the cloud-platform API scope that will be added by default.
+     * 
+ * + * repeated string scopes = 2; + * + * @return This builder for chaining. + */ + public Builder clearScopes() { + scopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * List of scopes to be enabled for this service account on the VM, in
+     * addition to the cloud-platform API scope that will be added by default.
+     * 
+ * + * repeated string scopes = 2; + * + * @param value The bytes of the scopes to add. + * @return This builder for chaining. + */ + public Builder addScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureScopesIsMutable(); + scopes_.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.lifesciences.v2beta.ServiceAccount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.ServiceAccount) + private static final com.google.cloud.lifesciences.v2beta.ServiceAccount DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.ServiceAccount(); + } + + public static com.google.cloud.lifesciences.v2beta.ServiceAccount getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceAccount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ServiceAccount(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.lifesciences.v2beta.ServiceAccount getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ServiceAccountOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ServiceAccountOrBuilder.java new file mode 100644 index 00000000..1ed9cba6 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/ServiceAccountOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface ServiceAccountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.ServiceAccount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Email address of the service account. If not specified, the default
+   * Compute Engine service account for the project will be used.
+   * 
+ * + * string email = 1; + * + * @return The email. + */ + java.lang.String getEmail(); + /** + * + * + *
+   * Email address of the service account. If not specified, the default
+   * Compute Engine service account for the project will be used.
+   * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + com.google.protobuf.ByteString getEmailBytes(); + + /** + * + * + *
+   * List of scopes to be enabled for this service account on the VM, in
+   * addition to the cloud-platform API scope that will be added by default.
+   * 
+ * + * repeated string scopes = 2; + * + * @return A list containing the scopes. + */ + java.util.List getScopesList(); + /** + * + * + *
+   * List of scopes to be enabled for this service account on the VM, in
+   * addition to the cloud-platform API scope that will be added by default.
+   * 
+ * + * repeated string scopes = 2; + * + * @return The count of scopes. + */ + int getScopesCount(); + /** + * + * + *
+   * List of scopes to be enabled for this service account on the VM, in
+   * addition to the cloud-platform API scope that will be added by default.
+   * 
+ * + * repeated string scopes = 2; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + java.lang.String getScopes(int index); + /** + * + * + *
+   * List of scopes to be enabled for this service account on the VM, in
+   * addition to the cloud-platform API scope that will be added by default.
+   * 
+ * + * repeated string scopes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + com.google.protobuf.ByteString getScopesBytes(int index); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/UnexpectedExitStatusEvent.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/UnexpectedExitStatusEvent.java new file mode 100644 index 00000000..df1d3ab5 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/UnexpectedExitStatusEvent.java @@ -0,0 +1,649 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * An event generated when the execution of a container results in a
+ * non-zero exit status that was not otherwise ignored. Execution will
+ * continue, but only actions that are flagged as `ALWAYS_RUN` will be
+ * executed. Other actions will be skipped.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent} + */ +public final class UnexpectedExitStatusEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) + UnexpectedExitStatusEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use UnexpectedExitStatusEvent.newBuilder() to construct. + private UnexpectedExitStatusEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UnexpectedExitStatusEvent() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UnexpectedExitStatusEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UnexpectedExitStatusEvent( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + actionId_ = input.readInt32(); + break; + } + case 16: + { + exitStatus_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_UnexpectedExitStatusEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_UnexpectedExitStatusEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.class, + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.Builder.class); + } + + public static final int ACTION_ID_FIELD_NUMBER = 1; + private int actionId_; + /** + * + * + *
+   * The numeric ID of the action that started the container.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + + public static final int EXIT_STATUS_FIELD_NUMBER = 2; + private int exitStatus_; + /** + * + * + *
+   * The exit status of the container.
+   * 
+ * + * int32 exit_status = 2; + * + * @return The exitStatus. + */ + @java.lang.Override + public int getExitStatus() { + return exitStatus_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (actionId_ != 0) { + output.writeInt32(1, actionId_); + } + if (exitStatus_ != 0) { + output.writeInt32(2, exitStatus_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, actionId_); + } + if (exitStatus_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, exitStatus_); + } + 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.lifesciences.v2beta.UnexpectedExitStatusEvent)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent other = + (com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) obj; + + if (getActionId() != other.getActionId()) return false; + if (getExitStatus() != other.getExitStatus()) 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) + ACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getActionId(); + hash = (37 * hash) + EXIT_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getExitStatus(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent 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.lifesciences.v2beta.UnexpectedExitStatusEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent parseFrom( + 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.lifesciences.v2beta.UnexpectedExitStatusEvent parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent parseFrom( + java.io.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.lifesciences.v2beta.UnexpectedExitStatusEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent parseDelimitedFrom( + java.io.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.lifesciences.v2beta.UnexpectedExitStatusEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.UnexpectedExitStatusEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event generated when the execution of a container results in a
+   * non-zero exit status that was not otherwise ignored. Execution will
+   * continue, but only actions that are flagged as `ALWAYS_RUN` will be
+   * executed. Other actions will be skipped.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_UnexpectedExitStatusEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_UnexpectedExitStatusEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.class, + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.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(); + actionId_ = 0; + + exitStatus_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_UnexpectedExitStatusEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent + getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent build() { + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent buildPartial() { + com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent result = + new com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent(this); + result.actionId_ = actionId_; + result.exitStatus_ = exitStatus_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.UnexpectedExitStatusEvent) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent other) { + if (other + == com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.getDefaultInstance()) + return this; + if (other.getActionId() != 0) { + setActionId(other.getActionId()); + } + if (other.getExitStatus() != 0) { + setExitStatus(other.getExitStatus()); + } + 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.lifesciences.v2beta.UnexpectedExitStatusEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int actionId_; + /** + * + * + *
+     * The numeric ID of the action that started the container.
+     * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + /** + * + * + *
+     * The numeric ID of the action that started the container.
+     * 
+ * + * int32 action_id = 1; + * + * @param value The actionId to set. + * @return This builder for chaining. + */ + public Builder setActionId(int value) { + + actionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The numeric ID of the action that started the container.
+     * 
+ * + * int32 action_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearActionId() { + + actionId_ = 0; + onChanged(); + return this; + } + + private int exitStatus_; + /** + * + * + *
+     * The exit status of the container.
+     * 
+ * + * int32 exit_status = 2; + * + * @return The exitStatus. + */ + @java.lang.Override + public int getExitStatus() { + return exitStatus_; + } + /** + * + * + *
+     * The exit status of the container.
+     * 
+ * + * int32 exit_status = 2; + * + * @param value The exitStatus to set. + * @return This builder for chaining. + */ + public Builder setExitStatus(int value) { + + exitStatus_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The exit status of the container.
+     * 
+ * + * int32 exit_status = 2; + * + * @return This builder for chaining. + */ + public Builder clearExitStatus() { + + exitStatus_ = 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.lifesciences.v2beta.UnexpectedExitStatusEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) + private static final com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent(); + } + + public static com.google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UnexpectedExitStatusEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UnexpectedExitStatusEvent(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.lifesciences.v2beta.UnexpectedExitStatusEvent + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/UnexpectedExitStatusEventOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/UnexpectedExitStatusEventOrBuilder.java new file mode 100644 index 00000000..7b635608 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/UnexpectedExitStatusEventOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface UnexpectedExitStatusEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The numeric ID of the action that started the container.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + int getActionId(); + + /** + * + * + *
+   * The exit status of the container.
+   * 
+ * + * int32 exit_status = 2; + * + * @return The exitStatus. + */ + int getExitStatus(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VirtualMachine.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VirtualMachine.java new file mode 100644 index 00000000..6778f63e --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VirtualMachine.java @@ -0,0 +1,4482 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Carries information about a Compute Engine VM resource.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.VirtualMachine} + */ +public final class VirtualMachine extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.VirtualMachine) + VirtualMachineOrBuilder { + private static final long serialVersionUID = 0L; + // Use VirtualMachine.newBuilder() to construct. + private VirtualMachine(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VirtualMachine() { + machineType_ = ""; + disks_ = java.util.Collections.emptyList(); + accelerators_ = java.util.Collections.emptyList(); + cpuPlatform_ = ""; + bootImage_ = ""; + nvidiaDriverVersion_ = ""; + dockerCacheImages_ = com.google.protobuf.LazyStringArrayList.EMPTY; + volumes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VirtualMachine(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VirtualMachine( + 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(); + + machineType_ = s; + break; + } + case 16: + { + preemptible_ = input.readBool(); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + disks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + disks_.add( + input.readMessage( + com.google.cloud.lifesciences.v2beta.Disk.parser(), extensionRegistry)); + break; + } + case 42: + { + com.google.cloud.lifesciences.v2beta.Network.Builder subBuilder = null; + if (network_ != null) { + subBuilder = network_.toBuilder(); + } + network_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.Network.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(network_); + network_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + accelerators_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + accelerators_.add( + input.readMessage( + com.google.cloud.lifesciences.v2beta.Accelerator.parser(), + extensionRegistry)); + break; + } + case 58: + { + com.google.cloud.lifesciences.v2beta.ServiceAccount.Builder subBuilder = null; + if (serviceAccount_ != null) { + subBuilder = serviceAccount_.toBuilder(); + } + serviceAccount_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.ServiceAccount.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(serviceAccount_); + serviceAccount_ = subBuilder.buildPartial(); + } + + break; + } + case 64: + { + bootDiskSizeGb_ = input.readInt32(); + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + cpuPlatform_ = s; + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + bootImage_ = s; + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + nvidiaDriverVersion_ = s; + break; + } + case 96: + { + enableStackdriverMonitoring_ = input.readBool(); + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + dockerCacheImages_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + dockerCacheImages_.add(s); + break; + } + case 114: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + volumes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + volumes_.add( + input.readMessage( + com.google.cloud.lifesciences.v2beta.Volume.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_ & 0x00000002) != 0)) { + disks_ = java.util.Collections.unmodifiableList(disks_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + accelerators_ = java.util.Collections.unmodifiableList(accelerators_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + dockerCacheImages_ = dockerCacheImages_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + volumes_ = java.util.Collections.unmodifiableList(volumes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.VirtualMachine.class, + com.google.cloud.lifesciences.v2beta.VirtualMachine.Builder.class); + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * Required. The machine type of the virtual machine to create. Must be the short name
+   * of a standard machine type (such as "n1-standard-1") or a custom machine
+   * type (such as "custom-1-4096", where "1" indicates the number of vCPUs and
+   * "4096" indicates the memory in MB). See
+   * [Creating an instance with a custom machine
+   * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create)
+   * for more specifications on creating a custom machine type.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The machine type of the virtual machine to create. Must be the short name
+   * of a standard machine type (such as "n1-standard-1") or a custom machine
+   * type (such as "custom-1-4096", where "1" indicates the number of vCPUs and
+   * "4096" indicates the memory in MB). See
+   * [Creating an instance with a custom machine
+   * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create)
+   * for more specifications on creating a custom machine type.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREEMPTIBLE_FIELD_NUMBER = 2; + private boolean preemptible_; + /** + * + * + *
+   * If true, allocate a preemptible VM.
+   * 
+ * + * bool preemptible = 2; + * + * @return The preemptible. + */ + @java.lang.Override + public boolean getPreemptible() { + return preemptible_; + } + + public static final int LABELS_FIELD_NUMBER = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_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 set of labels to apply to the VM and any attached disk resources.
+   * These labels must adhere to the [name and value
+   * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+   * VM labels imposed by Compute Engine.
+   * Labels keys with the prefix 'google-' are reserved for use by Google.
+   * Labels applied at creation time to the VM. Applied on a best-effort basis
+   * to attached disk resources shortly after VM creation.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional set of labels to apply to the VM and any attached disk resources.
+   * These labels must adhere to the [name and value
+   * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+   * VM labels imposed by Compute Engine.
+   * Labels keys with the prefix 'google-' are reserved for use by Google.
+   * Labels applied at creation time to the VM. Applied on a best-effort basis
+   * to attached disk resources shortly after VM creation.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional set of labels to apply to the VM and any attached disk resources.
+   * These labels must adhere to the [name and value
+   * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+   * VM labels imposed by Compute Engine.
+   * Labels keys with the prefix 'google-' are reserved for use by Google.
+   * Labels applied at creation time to the VM. Applied on a best-effort basis
+   * to attached disk resources shortly after VM creation.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional set of labels to apply to the VM and any attached disk resources.
+   * These labels must adhere to the [name and value
+   * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+   * VM labels imposed by Compute Engine.
+   * Labels keys with the prefix 'google-' are reserved for use by Google.
+   * Labels applied at creation time to the VM. Applied on a best-effort basis
+   * to attached disk resources shortly after VM creation.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DISKS_FIELD_NUMBER = 4; + private java.util.List disks_; + /** + * + * + *
+   * The list of disks to create and attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + @java.lang.Override + public java.util.List getDisksList() { + return disks_; + } + /** + * + * + *
+   * The list of disks to create and attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + @java.lang.Override + public java.util.List + getDisksOrBuilderList() { + return disks_; + } + /** + * + * + *
+   * The list of disks to create and attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + @java.lang.Override + public int getDisksCount() { + return disks_.size(); + } + /** + * + * + *
+   * The list of disks to create and attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Disk getDisks(int index) { + return disks_.get(index); + } + /** + * + * + *
+   * The list of disks to create and attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.DiskOrBuilder getDisksOrBuilder(int index) { + return disks_.get(index); + } + + public static final int NETWORK_FIELD_NUMBER = 5; + private com.google.cloud.lifesciences.v2beta.Network network_; + /** + * + * + *
+   * The VM network configuration.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return network_ != null; + } + /** + * + * + *
+   * The VM network configuration.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + * + * @return The network. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Network getNetwork() { + return network_ == null + ? com.google.cloud.lifesciences.v2beta.Network.getDefaultInstance() + : network_; + } + /** + * + * + *
+   * The VM network configuration.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.NetworkOrBuilder getNetworkOrBuilder() { + return getNetwork(); + } + + public static final int ACCELERATORS_FIELD_NUMBER = 6; + private java.util.List accelerators_; + /** + * + * + *
+   * The list of accelerators to attach to the VM.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + @java.lang.Override + public java.util.List getAcceleratorsList() { + return accelerators_; + } + /** + * + * + *
+   * The list of accelerators to attach to the VM.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + @java.lang.Override + public java.util.List + getAcceleratorsOrBuilderList() { + return accelerators_; + } + /** + * + * + *
+   * The list of accelerators to attach to the VM.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + @java.lang.Override + public int getAcceleratorsCount() { + return accelerators_.size(); + } + /** + * + * + *
+   * The list of accelerators to attach to the VM.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Accelerator getAccelerators(int index) { + return accelerators_.get(index); + } + /** + * + * + *
+   * The list of accelerators to attach to the VM.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.AcceleratorOrBuilder getAcceleratorsOrBuilder( + int index) { + return accelerators_.get(index); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 7; + private com.google.cloud.lifesciences.v2beta.ServiceAccount serviceAccount_; + /** + * + * + *
+   * The service account to install on the VM. This account does not need
+   * any permissions other than those required by the pipeline.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + * + * @return Whether the serviceAccount field is set. + */ + @java.lang.Override + public boolean hasServiceAccount() { + return serviceAccount_ != null; + } + /** + * + * + *
+   * The service account to install on the VM. This account does not need
+   * any permissions other than those required by the pipeline.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + * + * @return The serviceAccount. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ServiceAccount getServiceAccount() { + return serviceAccount_ == null + ? com.google.cloud.lifesciences.v2beta.ServiceAccount.getDefaultInstance() + : serviceAccount_; + } + /** + * + * + *
+   * The service account to install on the VM. This account does not need
+   * any permissions other than those required by the pipeline.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ServiceAccountOrBuilder getServiceAccountOrBuilder() { + return getServiceAccount(); + } + + public static final int BOOT_DISK_SIZE_GB_FIELD_NUMBER = 8; + private int bootDiskSizeGb_; + /** + * + * + *
+   * The size of the boot disk, in GB. The boot disk must be large
+   * enough to accommodate all of the Docker images from each action in the
+   * pipeline at the same time. If not specified, a small but reasonable
+   * default value is used.
+   * 
+ * + * int32 boot_disk_size_gb = 8; + * + * @return The bootDiskSizeGb. + */ + @java.lang.Override + public int getBootDiskSizeGb() { + return bootDiskSizeGb_; + } + + public static final int CPU_PLATFORM_FIELD_NUMBER = 9; + private volatile java.lang.Object cpuPlatform_; + /** + * + * + *
+   * The CPU platform to request. An instance based on a newer platform can be
+   * allocated, but never one with fewer capabilities. The value of this
+   * parameter must be a valid Compute Engine CPU platform name (such as "Intel
+   * Skylake"). This parameter is only useful for carefully optimized work
+   * loads where the CPU platform has a significant impact.
+   * For more information about the effect of this parameter, see
+   * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+   * 
+ * + * string cpu_platform = 9; + * + * @return The cpuPlatform. + */ + @java.lang.Override + public java.lang.String getCpuPlatform() { + java.lang.Object ref = cpuPlatform_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuPlatform_ = s; + return s; + } + } + /** + * + * + *
+   * The CPU platform to request. An instance based on a newer platform can be
+   * allocated, but never one with fewer capabilities. The value of this
+   * parameter must be a valid Compute Engine CPU platform name (such as "Intel
+   * Skylake"). This parameter is only useful for carefully optimized work
+   * loads where the CPU platform has a significant impact.
+   * For more information about the effect of this parameter, see
+   * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+   * 
+ * + * string cpu_platform = 9; + * + * @return The bytes for cpuPlatform. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCpuPlatformBytes() { + java.lang.Object ref = cpuPlatform_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpuPlatform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOT_IMAGE_FIELD_NUMBER = 10; + private volatile java.lang.Object bootImage_; + /** + * + * + *
+   * The host operating system image to use.
+   * Currently, only Container-Optimized OS images can be used.
+   * The default value is `projects/cos-cloud/global/images/family/cos-stable`,
+   * which selects the latest stable release of Container-Optimized OS.
+   * This option is provided to allow testing against the beta release of the
+   * operating system to ensure that the new version does not interact
+   * negatively with production pipelines.
+   * To test a pipeline against the beta release of Container-Optimized OS,
+   * use the value `projects/cos-cloud/global/images/family/cos-beta`.
+   * 
+ * + * string boot_image = 10; + * + * @return The bootImage. + */ + @java.lang.Override + public java.lang.String getBootImage() { + java.lang.Object ref = bootImage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bootImage_ = s; + return s; + } + } + /** + * + * + *
+   * The host operating system image to use.
+   * Currently, only Container-Optimized OS images can be used.
+   * The default value is `projects/cos-cloud/global/images/family/cos-stable`,
+   * which selects the latest stable release of Container-Optimized OS.
+   * This option is provided to allow testing against the beta release of the
+   * operating system to ensure that the new version does not interact
+   * negatively with production pipelines.
+   * To test a pipeline against the beta release of Container-Optimized OS,
+   * use the value `projects/cos-cloud/global/images/family/cos-beta`.
+   * 
+ * + * string boot_image = 10; + * + * @return The bytes for bootImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBootImageBytes() { + java.lang.Object ref = bootImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bootImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NVIDIA_DRIVER_VERSION_FIELD_NUMBER = 11; + private volatile java.lang.Object nvidiaDriverVersion_; + /** + * + * + *
+   * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator.
+   * The version specified here must be compatible with the GPU libraries
+   * contained in the container being executed, and must be one of the drivers
+   * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage.
+   * 
+ * + * string nvidia_driver_version = 11 [deprecated = true]; + * + * @return The nvidiaDriverVersion. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getNvidiaDriverVersion() { + java.lang.Object ref = nvidiaDriverVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nvidiaDriverVersion_ = s; + return s; + } + } + /** + * + * + *
+   * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator.
+   * The version specified here must be compatible with the GPU libraries
+   * contained in the container being executed, and must be one of the drivers
+   * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage.
+   * 
+ * + * string nvidia_driver_version = 11 [deprecated = true]; + * + * @return The bytes for nvidiaDriverVersion. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getNvidiaDriverVersionBytes() { + java.lang.Object ref = nvidiaDriverVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nvidiaDriverVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_STACKDRIVER_MONITORING_FIELD_NUMBER = 12; + private boolean enableStackdriverMonitoring_; + /** + * + * + *
+   * Whether Stackdriver monitoring should be enabled on the VM.
+   * 
+ * + * bool enable_stackdriver_monitoring = 12; + * + * @return The enableStackdriverMonitoring. + */ + @java.lang.Override + public boolean getEnableStackdriverMonitoring() { + return enableStackdriverMonitoring_; + } + + public static final int DOCKER_CACHE_IMAGES_FIELD_NUMBER = 13; + private com.google.protobuf.LazyStringList dockerCacheImages_; + /** + * + * + *
+   * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+   * mounted into the Docker folder in a way that the images present in the
+   * cache will not need to be pulled. The digests of the cached images must
+   * match those of the tags used or the latest version will still be pulled.
+   * The root directory of the ext4 image must contain `image` and `overlay2`
+   * directories copied from the Docker directory of a VM where the desired
+   * Docker images have already been pulled. Any images pulled that are not
+   * cached will be stored on the first cache disk instead of the boot disk.
+   * Only a single image is supported.
+   * 
+ * + * repeated string docker_cache_images = 13; + * + * @return A list containing the dockerCacheImages. + */ + public com.google.protobuf.ProtocolStringList getDockerCacheImagesList() { + return dockerCacheImages_; + } + /** + * + * + *
+   * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+   * mounted into the Docker folder in a way that the images present in the
+   * cache will not need to be pulled. The digests of the cached images must
+   * match those of the tags used or the latest version will still be pulled.
+   * The root directory of the ext4 image must contain `image` and `overlay2`
+   * directories copied from the Docker directory of a VM where the desired
+   * Docker images have already been pulled. Any images pulled that are not
+   * cached will be stored on the first cache disk instead of the boot disk.
+   * Only a single image is supported.
+   * 
+ * + * repeated string docker_cache_images = 13; + * + * @return The count of dockerCacheImages. + */ + public int getDockerCacheImagesCount() { + return dockerCacheImages_.size(); + } + /** + * + * + *
+   * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+   * mounted into the Docker folder in a way that the images present in the
+   * cache will not need to be pulled. The digests of the cached images must
+   * match those of the tags used or the latest version will still be pulled.
+   * The root directory of the ext4 image must contain `image` and `overlay2`
+   * directories copied from the Docker directory of a VM where the desired
+   * Docker images have already been pulled. Any images pulled that are not
+   * cached will be stored on the first cache disk instead of the boot disk.
+   * Only a single image is supported.
+   * 
+ * + * repeated string docker_cache_images = 13; + * + * @param index The index of the element to return. + * @return The dockerCacheImages at the given index. + */ + public java.lang.String getDockerCacheImages(int index) { + return dockerCacheImages_.get(index); + } + /** + * + * + *
+   * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+   * mounted into the Docker folder in a way that the images present in the
+   * cache will not need to be pulled. The digests of the cached images must
+   * match those of the tags used or the latest version will still be pulled.
+   * The root directory of the ext4 image must contain `image` and `overlay2`
+   * directories copied from the Docker directory of a VM where the desired
+   * Docker images have already been pulled. Any images pulled that are not
+   * cached will be stored on the first cache disk instead of the boot disk.
+   * Only a single image is supported.
+   * 
+ * + * repeated string docker_cache_images = 13; + * + * @param index The index of the value to return. + * @return The bytes of the dockerCacheImages at the given index. + */ + public com.google.protobuf.ByteString getDockerCacheImagesBytes(int index) { + return dockerCacheImages_.getByteString(index); + } + + public static final int VOLUMES_FIELD_NUMBER = 14; + private java.util.List volumes_; + /** + * + * + *
+   * The list of disks and other storage to create or attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + @java.lang.Override + public java.util.List getVolumesList() { + return volumes_; + } + /** + * + * + *
+   * The list of disks and other storage to create or attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + @java.lang.Override + public java.util.List + getVolumesOrBuilderList() { + return volumes_; + } + /** + * + * + *
+   * The list of disks and other storage to create or attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + @java.lang.Override + public int getVolumesCount() { + return volumes_.size(); + } + /** + * + * + *
+   * The list of disks and other storage to create or attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Volume getVolumes(int index) { + return volumes_.get(index); + } + /** + * + * + *
+   * The list of disks and other storage to create or attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.VolumeOrBuilder getVolumesOrBuilder(int index) { + return volumes_.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 (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, machineType_); + } + if (preemptible_ != false) { + output.writeBool(2, preemptible_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + for (int i = 0; i < disks_.size(); i++) { + output.writeMessage(4, disks_.get(i)); + } + if (network_ != null) { + output.writeMessage(5, getNetwork()); + } + for (int i = 0; i < accelerators_.size(); i++) { + output.writeMessage(6, accelerators_.get(i)); + } + if (serviceAccount_ != null) { + output.writeMessage(7, getServiceAccount()); + } + if (bootDiskSizeGb_ != 0) { + output.writeInt32(8, bootDiskSizeGb_); + } + if (!getCpuPlatformBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, cpuPlatform_); + } + if (!getBootImageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, bootImage_); + } + if (!getNvidiaDriverVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, nvidiaDriverVersion_); + } + if (enableStackdriverMonitoring_ != false) { + output.writeBool(12, enableStackdriverMonitoring_); + } + for (int i = 0; i < dockerCacheImages_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, dockerCacheImages_.getRaw(i)); + } + for (int i = 0; i < volumes_.size(); i++) { + output.writeMessage(14, volumes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, machineType_); + } + if (preemptible_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, preemptible_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); + } + for (int i = 0; i < disks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, disks_.get(i)); + } + if (network_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getNetwork()); + } + for (int i = 0; i < accelerators_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, accelerators_.get(i)); + } + if (serviceAccount_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getServiceAccount()); + } + if (bootDiskSizeGb_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, bootDiskSizeGb_); + } + if (!getCpuPlatformBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, cpuPlatform_); + } + if (!getBootImageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, bootImage_); + } + if (!getNvidiaDriverVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, nvidiaDriverVersion_); + } + if (enableStackdriverMonitoring_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(12, enableStackdriverMonitoring_); + } + { + int dataSize = 0; + for (int i = 0; i < dockerCacheImages_.size(); i++) { + dataSize += computeStringSizeNoTag(dockerCacheImages_.getRaw(i)); + } + size += dataSize; + size += 1 * getDockerCacheImagesList().size(); + } + for (int i = 0; i < volumes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, volumes_.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.lifesciences.v2beta.VirtualMachine)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.VirtualMachine other = + (com.google.cloud.lifesciences.v2beta.VirtualMachine) obj; + + if (!getMachineType().equals(other.getMachineType())) return false; + if (getPreemptible() != other.getPreemptible()) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDisksList().equals(other.getDisksList())) return false; + if (hasNetwork() != other.hasNetwork()) return false; + if (hasNetwork()) { + if (!getNetwork().equals(other.getNetwork())) return false; + } + if (!getAcceleratorsList().equals(other.getAcceleratorsList())) return false; + if (hasServiceAccount() != other.hasServiceAccount()) return false; + if (hasServiceAccount()) { + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + } + if (getBootDiskSizeGb() != other.getBootDiskSizeGb()) return false; + if (!getCpuPlatform().equals(other.getCpuPlatform())) return false; + if (!getBootImage().equals(other.getBootImage())) return false; + if (!getNvidiaDriverVersion().equals(other.getNvidiaDriverVersion())) return false; + if (getEnableStackdriverMonitoring() != other.getEnableStackdriverMonitoring()) return false; + if (!getDockerCacheImagesList().equals(other.getDockerCacheImagesList())) return false; + if (!getVolumesList().equals(other.getVolumesList())) 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) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (37 * hash) + PREEMPTIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPreemptible()); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (getDisksCount() > 0) { + hash = (37 * hash) + DISKS_FIELD_NUMBER; + hash = (53 * hash) + getDisksList().hashCode(); + } + if (hasNetwork()) { + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + } + if (getAcceleratorsCount() > 0) { + hash = (37 * hash) + ACCELERATORS_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorsList().hashCode(); + } + if (hasServiceAccount()) { + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + } + hash = (37 * hash) + BOOT_DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + getBootDiskSizeGb(); + hash = (37 * hash) + CPU_PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getCpuPlatform().hashCode(); + hash = (37 * hash) + BOOT_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getBootImage().hashCode(); + hash = (37 * hash) + NVIDIA_DRIVER_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getNvidiaDriverVersion().hashCode(); + hash = (37 * hash) + ENABLE_STACKDRIVER_MONITORING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableStackdriverMonitoring()); + if (getDockerCacheImagesCount() > 0) { + hash = (37 * hash) + DOCKER_CACHE_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getDockerCacheImagesList().hashCode(); + } + if (getVolumesCount() > 0) { + hash = (37 * hash) + VOLUMES_FIELD_NUMBER; + hash = (53 * hash) + getVolumesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.VirtualMachine parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.VirtualMachine 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.lifesciences.v2beta.VirtualMachine parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.VirtualMachine parseFrom( + 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.lifesciences.v2beta.VirtualMachine parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.VirtualMachine parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.VirtualMachine parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.VirtualMachine parseFrom( + java.io.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.lifesciences.v2beta.VirtualMachine parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.VirtualMachine parseDelimitedFrom( + java.io.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.lifesciences.v2beta.VirtualMachine parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.VirtualMachine parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.VirtualMachine prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Carries information about a Compute Engine VM resource.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.VirtualMachine} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.VirtualMachine) + com.google.cloud.lifesciences.v2beta.VirtualMachineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.VirtualMachine.class, + com.google.cloud.lifesciences.v2beta.VirtualMachine.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.VirtualMachine.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDisksFieldBuilder(); + getAcceleratorsFieldBuilder(); + getVolumesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + machineType_ = ""; + + preemptible_ = false; + + internalGetMutableLabels().clear(); + if (disksBuilder_ == null) { + disks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + disksBuilder_.clear(); + } + if (networkBuilder_ == null) { + network_ = null; + } else { + network_ = null; + networkBuilder_ = null; + } + if (acceleratorsBuilder_ == null) { + accelerators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + acceleratorsBuilder_.clear(); + } + if (serviceAccountBuilder_ == null) { + serviceAccount_ = null; + } else { + serviceAccount_ = null; + serviceAccountBuilder_ = null; + } + bootDiskSizeGb_ = 0; + + cpuPlatform_ = ""; + + bootImage_ = ""; + + nvidiaDriverVersion_ = ""; + + enableStackdriverMonitoring_ = false; + + dockerCacheImages_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (volumesBuilder_ == null) { + volumes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + volumesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.VirtualMachine getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.VirtualMachine.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.VirtualMachine build() { + com.google.cloud.lifesciences.v2beta.VirtualMachine result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.VirtualMachine buildPartial() { + com.google.cloud.lifesciences.v2beta.VirtualMachine result = + new com.google.cloud.lifesciences.v2beta.VirtualMachine(this); + int from_bitField0_ = bitField0_; + result.machineType_ = machineType_; + result.preemptible_ = preemptible_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (disksBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + disks_ = java.util.Collections.unmodifiableList(disks_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.disks_ = disks_; + } else { + result.disks_ = disksBuilder_.build(); + } + if (networkBuilder_ == null) { + result.network_ = network_; + } else { + result.network_ = networkBuilder_.build(); + } + if (acceleratorsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + accelerators_ = java.util.Collections.unmodifiableList(accelerators_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.accelerators_ = accelerators_; + } else { + result.accelerators_ = acceleratorsBuilder_.build(); + } + if (serviceAccountBuilder_ == null) { + result.serviceAccount_ = serviceAccount_; + } else { + result.serviceAccount_ = serviceAccountBuilder_.build(); + } + result.bootDiskSizeGb_ = bootDiskSizeGb_; + result.cpuPlatform_ = cpuPlatform_; + result.bootImage_ = bootImage_; + result.nvidiaDriverVersion_ = nvidiaDriverVersion_; + result.enableStackdriverMonitoring_ = enableStackdriverMonitoring_; + if (((bitField0_ & 0x00000008) != 0)) { + dockerCacheImages_ = dockerCacheImages_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.dockerCacheImages_ = dockerCacheImages_; + if (volumesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + volumes_ = java.util.Collections.unmodifiableList(volumes_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.volumes_ = volumes_; + } else { + result.volumes_ = volumesBuilder_.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.lifesciences.v2beta.VirtualMachine) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.VirtualMachine) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.VirtualMachine other) { + if (other == com.google.cloud.lifesciences.v2beta.VirtualMachine.getDefaultInstance()) + return this; + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + onChanged(); + } + if (other.getPreemptible() != false) { + setPreemptible(other.getPreemptible()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (disksBuilder_ == null) { + if (!other.disks_.isEmpty()) { + if (disks_.isEmpty()) { + disks_ = other.disks_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDisksIsMutable(); + disks_.addAll(other.disks_); + } + onChanged(); + } + } else { + if (!other.disks_.isEmpty()) { + if (disksBuilder_.isEmpty()) { + disksBuilder_.dispose(); + disksBuilder_ = null; + disks_ = other.disks_; + bitField0_ = (bitField0_ & ~0x00000002); + disksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDisksFieldBuilder() + : null; + } else { + disksBuilder_.addAllMessages(other.disks_); + } + } + } + if (other.hasNetwork()) { + mergeNetwork(other.getNetwork()); + } + if (acceleratorsBuilder_ == null) { + if (!other.accelerators_.isEmpty()) { + if (accelerators_.isEmpty()) { + accelerators_ = other.accelerators_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAcceleratorsIsMutable(); + accelerators_.addAll(other.accelerators_); + } + onChanged(); + } + } else { + if (!other.accelerators_.isEmpty()) { + if (acceleratorsBuilder_.isEmpty()) { + acceleratorsBuilder_.dispose(); + acceleratorsBuilder_ = null; + accelerators_ = other.accelerators_; + bitField0_ = (bitField0_ & ~0x00000004); + acceleratorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAcceleratorsFieldBuilder() + : null; + } else { + acceleratorsBuilder_.addAllMessages(other.accelerators_); + } + } + } + if (other.hasServiceAccount()) { + mergeServiceAccount(other.getServiceAccount()); + } + if (other.getBootDiskSizeGb() != 0) { + setBootDiskSizeGb(other.getBootDiskSizeGb()); + } + if (!other.getCpuPlatform().isEmpty()) { + cpuPlatform_ = other.cpuPlatform_; + onChanged(); + } + if (!other.getBootImage().isEmpty()) { + bootImage_ = other.bootImage_; + onChanged(); + } + if (!other.getNvidiaDriverVersion().isEmpty()) { + nvidiaDriverVersion_ = other.nvidiaDriverVersion_; + onChanged(); + } + if (other.getEnableStackdriverMonitoring() != false) { + setEnableStackdriverMonitoring(other.getEnableStackdriverMonitoring()); + } + if (!other.dockerCacheImages_.isEmpty()) { + if (dockerCacheImages_.isEmpty()) { + dockerCacheImages_ = other.dockerCacheImages_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDockerCacheImagesIsMutable(); + dockerCacheImages_.addAll(other.dockerCacheImages_); + } + onChanged(); + } + if (volumesBuilder_ == null) { + if (!other.volumes_.isEmpty()) { + if (volumes_.isEmpty()) { + volumes_ = other.volumes_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureVolumesIsMutable(); + volumes_.addAll(other.volumes_); + } + onChanged(); + } + } else { + if (!other.volumes_.isEmpty()) { + if (volumesBuilder_.isEmpty()) { + volumesBuilder_.dispose(); + volumesBuilder_ = null; + volumes_ = other.volumes_; + bitField0_ = (bitField0_ & ~0x00000010); + volumesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVolumesFieldBuilder() + : null; + } else { + volumesBuilder_.addAllMessages(other.volumes_); + } + } + } + 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.lifesciences.v2beta.VirtualMachine parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.VirtualMachine) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Required. The machine type of the virtual machine to create. Must be the short name
+     * of a standard machine type (such as "n1-standard-1") or a custom machine
+     * type (such as "custom-1-4096", where "1" indicates the number of vCPUs and
+     * "4096" indicates the memory in MB). See
+     * [Creating an instance with a custom machine
+     * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create)
+     * for more specifications on creating a custom machine type.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The machine type of the virtual machine to create. Must be the short name
+     * of a standard machine type (such as "n1-standard-1") or a custom machine
+     * type (such as "custom-1-4096", where "1" indicates the number of vCPUs and
+     * "4096" indicates the memory in MB). See
+     * [Creating an instance with a custom machine
+     * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create)
+     * for more specifications on creating a custom machine type.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The machine type of the virtual machine to create. Must be the short name
+     * of a standard machine type (such as "n1-standard-1") or a custom machine
+     * type (such as "custom-1-4096", where "1" indicates the number of vCPUs and
+     * "4096" indicates the memory in MB). See
+     * [Creating an instance with a custom machine
+     * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create)
+     * for more specifications on creating a custom machine type.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The machine type of the virtual machine to create. Must be the short name
+     * of a standard machine type (such as "n1-standard-1") or a custom machine
+     * type (such as "custom-1-4096", where "1" indicates the number of vCPUs and
+     * "4096" indicates the memory in MB). See
+     * [Creating an instance with a custom machine
+     * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create)
+     * for more specifications on creating a custom machine type.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The machine type of the virtual machine to create. Must be the short name
+     * of a standard machine type (such as "n1-standard-1") or a custom machine
+     * type (such as "custom-1-4096", where "1" indicates the number of vCPUs and
+     * "4096" indicates the memory in MB). See
+     * [Creating an instance with a custom machine
+     * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create)
+     * for more specifications on creating a custom machine type.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + private boolean preemptible_; + /** + * + * + *
+     * If true, allocate a preemptible VM.
+     * 
+ * + * bool preemptible = 2; + * + * @return The preemptible. + */ + @java.lang.Override + public boolean getPreemptible() { + return preemptible_; + } + /** + * + * + *
+     * If true, allocate a preemptible VM.
+     * 
+ * + * bool preemptible = 2; + * + * @param value The preemptible to set. + * @return This builder for chaining. + */ + public Builder setPreemptible(boolean value) { + + preemptible_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, allocate a preemptible VM.
+     * 
+ * + * bool preemptible = 2; + * + * @return This builder for chaining. + */ + public Builder clearPreemptible() { + + preemptible_ = false; + onChanged(); + 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 set of labels to apply to the VM and any attached disk resources.
+     * These labels must adhere to the [name and value
+     * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+     * VM labels imposed by Compute Engine.
+     * Labels keys with the prefix 'google-' are reserved for use by Google.
+     * Labels applied at creation time to the VM. Applied on a best-effort basis
+     * to attached disk resources shortly after VM creation.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional set of labels to apply to the VM and any attached disk resources.
+     * These labels must adhere to the [name and value
+     * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+     * VM labels imposed by Compute Engine.
+     * Labels keys with the prefix 'google-' are reserved for use by Google.
+     * Labels applied at creation time to the VM. Applied on a best-effort basis
+     * to attached disk resources shortly after VM creation.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional set of labels to apply to the VM and any attached disk resources.
+     * These labels must adhere to the [name and value
+     * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+     * VM labels imposed by Compute Engine.
+     * Labels keys with the prefix 'google-' are reserved for use by Google.
+     * Labels applied at creation time to the VM. Applied on a best-effort basis
+     * to attached disk resources shortly after VM creation.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional set of labels to apply to the VM and any attached disk resources.
+     * These labels must adhere to the [name and value
+     * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+     * VM labels imposed by Compute Engine.
+     * Labels keys with the prefix 'google-' are reserved for use by Google.
+     * Labels applied at creation time to the VM. Applied on a best-effort basis
+     * to attached disk resources shortly after VM creation.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional set of labels to apply to the VM and any attached disk resources.
+     * These labels must adhere to the [name and value
+     * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+     * VM labels imposed by Compute Engine.
+     * Labels keys with the prefix 'google-' are reserved for use by Google.
+     * Labels applied at creation time to the VM. Applied on a best-effort basis
+     * to attached disk resources shortly after VM creation.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional set of labels to apply to the VM and any attached disk resources.
+     * These labels must adhere to the [name and value
+     * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+     * VM labels imposed by Compute Engine.
+     * Labels keys with the prefix 'google-' are reserved for use by Google.
+     * Labels applied at creation time to the VM. Applied on a best-effort basis
+     * to attached disk resources shortly after VM creation.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional set of labels to apply to the VM and any attached disk resources.
+     * These labels must adhere to the [name and value
+     * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+     * VM labels imposed by Compute Engine.
+     * Labels keys with the prefix 'google-' are reserved for use by Google.
+     * Labels applied at creation time to the VM. Applied on a best-effort basis
+     * to attached disk resources shortly after VM creation.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private java.util.List disks_ = + java.util.Collections.emptyList(); + + private void ensureDisksIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + disks_ = new java.util.ArrayList(disks_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Disk, + com.google.cloud.lifesciences.v2beta.Disk.Builder, + com.google.cloud.lifesciences.v2beta.DiskOrBuilder> + disksBuilder_; + + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public java.util.List getDisksList() { + if (disksBuilder_ == null) { + return java.util.Collections.unmodifiableList(disks_); + } else { + return disksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public int getDisksCount() { + if (disksBuilder_ == null) { + return disks_.size(); + } else { + return disksBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public com.google.cloud.lifesciences.v2beta.Disk getDisks(int index) { + if (disksBuilder_ == null) { + return disks_.get(index); + } else { + return disksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public Builder setDisks(int index, com.google.cloud.lifesciences.v2beta.Disk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.set(index, value); + onChanged(); + } else { + disksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public Builder setDisks( + int index, com.google.cloud.lifesciences.v2beta.Disk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.set(index, builderForValue.build()); + onChanged(); + } else { + disksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public Builder addDisks(com.google.cloud.lifesciences.v2beta.Disk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.add(value); + onChanged(); + } else { + disksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public Builder addDisks(int index, com.google.cloud.lifesciences.v2beta.Disk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.add(index, value); + onChanged(); + } else { + disksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public Builder addDisks(com.google.cloud.lifesciences.v2beta.Disk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(builderForValue.build()); + onChanged(); + } else { + disksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public Builder addDisks( + int index, com.google.cloud.lifesciences.v2beta.Disk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(index, builderForValue.build()); + onChanged(); + } else { + disksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public Builder addAllDisks( + java.lang.Iterable values) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, disks_); + onChanged(); + } else { + disksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public Builder clearDisks() { + if (disksBuilder_ == null) { + disks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + disksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public Builder removeDisks(int index) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.remove(index); + onChanged(); + } else { + disksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public com.google.cloud.lifesciences.v2beta.Disk.Builder getDisksBuilder(int index) { + return getDisksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public com.google.cloud.lifesciences.v2beta.DiskOrBuilder getDisksOrBuilder(int index) { + if (disksBuilder_ == null) { + return disks_.get(index); + } else { + return disksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public java.util.List + getDisksOrBuilderList() { + if (disksBuilder_ != null) { + return disksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(disks_); + } + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public com.google.cloud.lifesciences.v2beta.Disk.Builder addDisksBuilder() { + return getDisksFieldBuilder() + .addBuilder(com.google.cloud.lifesciences.v2beta.Disk.getDefaultInstance()); + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public com.google.cloud.lifesciences.v2beta.Disk.Builder addDisksBuilder(int index) { + return getDisksFieldBuilder() + .addBuilder(index, com.google.cloud.lifesciences.v2beta.Disk.getDefaultInstance()); + } + /** + * + * + *
+     * The list of disks to create and attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + public java.util.List getDisksBuilderList() { + return getDisksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Disk, + com.google.cloud.lifesciences.v2beta.Disk.Builder, + com.google.cloud.lifesciences.v2beta.DiskOrBuilder> + getDisksFieldBuilder() { + if (disksBuilder_ == null) { + disksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Disk, + com.google.cloud.lifesciences.v2beta.Disk.Builder, + com.google.cloud.lifesciences.v2beta.DiskOrBuilder>( + disks_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + disks_ = null; + } + return disksBuilder_; + } + + private com.google.cloud.lifesciences.v2beta.Network network_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Network, + com.google.cloud.lifesciences.v2beta.Network.Builder, + com.google.cloud.lifesciences.v2beta.NetworkOrBuilder> + networkBuilder_; + /** + * + * + *
+     * The VM network configuration.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + * + * @return Whether the network field is set. + */ + public boolean hasNetwork() { + return networkBuilder_ != null || network_ != null; + } + /** + * + * + *
+     * The VM network configuration.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + * + * @return The network. + */ + public com.google.cloud.lifesciences.v2beta.Network getNetwork() { + if (networkBuilder_ == null) { + return network_ == null + ? com.google.cloud.lifesciences.v2beta.Network.getDefaultInstance() + : network_; + } else { + return networkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The VM network configuration.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + */ + public Builder setNetwork(com.google.cloud.lifesciences.v2beta.Network value) { + if (networkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + onChanged(); + } else { + networkBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The VM network configuration.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + */ + public Builder setNetwork( + com.google.cloud.lifesciences.v2beta.Network.Builder builderForValue) { + if (networkBuilder_ == null) { + network_ = builderForValue.build(); + onChanged(); + } else { + networkBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The VM network configuration.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + */ + public Builder mergeNetwork(com.google.cloud.lifesciences.v2beta.Network value) { + if (networkBuilder_ == null) { + if (network_ != null) { + network_ = + com.google.cloud.lifesciences.v2beta.Network.newBuilder(network_) + .mergeFrom(value) + .buildPartial(); + } else { + network_ = value; + } + onChanged(); + } else { + networkBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The VM network configuration.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + */ + public Builder clearNetwork() { + if (networkBuilder_ == null) { + network_ = null; + onChanged(); + } else { + network_ = null; + networkBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The VM network configuration.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + */ + public com.google.cloud.lifesciences.v2beta.Network.Builder getNetworkBuilder() { + + onChanged(); + return getNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The VM network configuration.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + */ + public com.google.cloud.lifesciences.v2beta.NetworkOrBuilder getNetworkOrBuilder() { + if (networkBuilder_ != null) { + return networkBuilder_.getMessageOrBuilder(); + } else { + return network_ == null + ? com.google.cloud.lifesciences.v2beta.Network.getDefaultInstance() + : network_; + } + } + /** + * + * + *
+     * The VM network configuration.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Network, + com.google.cloud.lifesciences.v2beta.Network.Builder, + com.google.cloud.lifesciences.v2beta.NetworkOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + networkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Network, + com.google.cloud.lifesciences.v2beta.Network.Builder, + com.google.cloud.lifesciences.v2beta.NetworkOrBuilder>( + getNetwork(), getParentForChildren(), isClean()); + network_ = null; + } + return networkBuilder_; + } + + private java.util.List accelerators_ = + java.util.Collections.emptyList(); + + private void ensureAcceleratorsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + accelerators_ = + new java.util.ArrayList( + accelerators_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Accelerator, + com.google.cloud.lifesciences.v2beta.Accelerator.Builder, + com.google.cloud.lifesciences.v2beta.AcceleratorOrBuilder> + acceleratorsBuilder_; + + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public java.util.List getAcceleratorsList() { + if (acceleratorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accelerators_); + } else { + return acceleratorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public int getAcceleratorsCount() { + if (acceleratorsBuilder_ == null) { + return accelerators_.size(); + } else { + return acceleratorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public com.google.cloud.lifesciences.v2beta.Accelerator getAccelerators(int index) { + if (acceleratorsBuilder_ == null) { + return accelerators_.get(index); + } else { + return acceleratorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public Builder setAccelerators( + int index, com.google.cloud.lifesciences.v2beta.Accelerator value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.set(index, value); + onChanged(); + } else { + acceleratorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public Builder setAccelerators( + int index, com.google.cloud.lifesciences.v2beta.Accelerator.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.set(index, builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public Builder addAccelerators(com.google.cloud.lifesciences.v2beta.Accelerator value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.add(value); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public Builder addAccelerators( + int index, com.google.cloud.lifesciences.v2beta.Accelerator value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.add(index, value); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public Builder addAccelerators( + com.google.cloud.lifesciences.v2beta.Accelerator.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public Builder addAccelerators( + int index, com.google.cloud.lifesciences.v2beta.Accelerator.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(index, builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public Builder addAllAccelerators( + java.lang.Iterable values) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accelerators_); + onChanged(); + } else { + acceleratorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public Builder clearAccelerators() { + if (acceleratorsBuilder_ == null) { + accelerators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + acceleratorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public Builder removeAccelerators(int index) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.remove(index); + onChanged(); + } else { + acceleratorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public com.google.cloud.lifesciences.v2beta.Accelerator.Builder getAcceleratorsBuilder( + int index) { + return getAcceleratorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public com.google.cloud.lifesciences.v2beta.AcceleratorOrBuilder getAcceleratorsOrBuilder( + int index) { + if (acceleratorsBuilder_ == null) { + return accelerators_.get(index); + } else { + return acceleratorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public java.util.List + getAcceleratorsOrBuilderList() { + if (acceleratorsBuilder_ != null) { + return acceleratorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accelerators_); + } + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public com.google.cloud.lifesciences.v2beta.Accelerator.Builder addAcceleratorsBuilder() { + return getAcceleratorsFieldBuilder() + .addBuilder(com.google.cloud.lifesciences.v2beta.Accelerator.getDefaultInstance()); + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public com.google.cloud.lifesciences.v2beta.Accelerator.Builder addAcceleratorsBuilder( + int index) { + return getAcceleratorsFieldBuilder() + .addBuilder(index, com.google.cloud.lifesciences.v2beta.Accelerator.getDefaultInstance()); + } + /** + * + * + *
+     * The list of accelerators to attach to the VM.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + public java.util.List + getAcceleratorsBuilderList() { + return getAcceleratorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Accelerator, + com.google.cloud.lifesciences.v2beta.Accelerator.Builder, + com.google.cloud.lifesciences.v2beta.AcceleratorOrBuilder> + getAcceleratorsFieldBuilder() { + if (acceleratorsBuilder_ == null) { + acceleratorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Accelerator, + com.google.cloud.lifesciences.v2beta.Accelerator.Builder, + com.google.cloud.lifesciences.v2beta.AcceleratorOrBuilder>( + accelerators_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + accelerators_ = null; + } + return acceleratorsBuilder_; + } + + private com.google.cloud.lifesciences.v2beta.ServiceAccount serviceAccount_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ServiceAccount, + com.google.cloud.lifesciences.v2beta.ServiceAccount.Builder, + com.google.cloud.lifesciences.v2beta.ServiceAccountOrBuilder> + serviceAccountBuilder_; + /** + * + * + *
+     * The service account to install on the VM. This account does not need
+     * any permissions other than those required by the pipeline.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + * + * @return Whether the serviceAccount field is set. + */ + public boolean hasServiceAccount() { + return serviceAccountBuilder_ != null || serviceAccount_ != null; + } + /** + * + * + *
+     * The service account to install on the VM. This account does not need
+     * any permissions other than those required by the pipeline.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + * + * @return The serviceAccount. + */ + public com.google.cloud.lifesciences.v2beta.ServiceAccount getServiceAccount() { + if (serviceAccountBuilder_ == null) { + return serviceAccount_ == null + ? com.google.cloud.lifesciences.v2beta.ServiceAccount.getDefaultInstance() + : serviceAccount_; + } else { + return serviceAccountBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The service account to install on the VM. This account does not need
+     * any permissions other than those required by the pipeline.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + */ + public Builder setServiceAccount(com.google.cloud.lifesciences.v2beta.ServiceAccount value) { + if (serviceAccountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + onChanged(); + } else { + serviceAccountBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The service account to install on the VM. This account does not need
+     * any permissions other than those required by the pipeline.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + */ + public Builder setServiceAccount( + com.google.cloud.lifesciences.v2beta.ServiceAccount.Builder builderForValue) { + if (serviceAccountBuilder_ == null) { + serviceAccount_ = builderForValue.build(); + onChanged(); + } else { + serviceAccountBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The service account to install on the VM. This account does not need
+     * any permissions other than those required by the pipeline.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + */ + public Builder mergeServiceAccount(com.google.cloud.lifesciences.v2beta.ServiceAccount value) { + if (serviceAccountBuilder_ == null) { + if (serviceAccount_ != null) { + serviceAccount_ = + com.google.cloud.lifesciences.v2beta.ServiceAccount.newBuilder(serviceAccount_) + .mergeFrom(value) + .buildPartial(); + } else { + serviceAccount_ = value; + } + onChanged(); + } else { + serviceAccountBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The service account to install on the VM. This account does not need
+     * any permissions other than those required by the pipeline.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + */ + public Builder clearServiceAccount() { + if (serviceAccountBuilder_ == null) { + serviceAccount_ = null; + onChanged(); + } else { + serviceAccount_ = null; + serviceAccountBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The service account to install on the VM. This account does not need
+     * any permissions other than those required by the pipeline.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + */ + public com.google.cloud.lifesciences.v2beta.ServiceAccount.Builder getServiceAccountBuilder() { + + onChanged(); + return getServiceAccountFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The service account to install on the VM. This account does not need
+     * any permissions other than those required by the pipeline.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + */ + public com.google.cloud.lifesciences.v2beta.ServiceAccountOrBuilder + getServiceAccountOrBuilder() { + if (serviceAccountBuilder_ != null) { + return serviceAccountBuilder_.getMessageOrBuilder(); + } else { + return serviceAccount_ == null + ? com.google.cloud.lifesciences.v2beta.ServiceAccount.getDefaultInstance() + : serviceAccount_; + } + } + /** + * + * + *
+     * The service account to install on the VM. This account does not need
+     * any permissions other than those required by the pipeline.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ServiceAccount, + com.google.cloud.lifesciences.v2beta.ServiceAccount.Builder, + com.google.cloud.lifesciences.v2beta.ServiceAccountOrBuilder> + getServiceAccountFieldBuilder() { + if (serviceAccountBuilder_ == null) { + serviceAccountBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ServiceAccount, + com.google.cloud.lifesciences.v2beta.ServiceAccount.Builder, + com.google.cloud.lifesciences.v2beta.ServiceAccountOrBuilder>( + getServiceAccount(), getParentForChildren(), isClean()); + serviceAccount_ = null; + } + return serviceAccountBuilder_; + } + + private int bootDiskSizeGb_; + /** + * + * + *
+     * The size of the boot disk, in GB. The boot disk must be large
+     * enough to accommodate all of the Docker images from each action in the
+     * pipeline at the same time. If not specified, a small but reasonable
+     * default value is used.
+     * 
+ * + * int32 boot_disk_size_gb = 8; + * + * @return The bootDiskSizeGb. + */ + @java.lang.Override + public int getBootDiskSizeGb() { + return bootDiskSizeGb_; + } + /** + * + * + *
+     * The size of the boot disk, in GB. The boot disk must be large
+     * enough to accommodate all of the Docker images from each action in the
+     * pipeline at the same time. If not specified, a small but reasonable
+     * default value is used.
+     * 
+ * + * int32 boot_disk_size_gb = 8; + * + * @param value The bootDiskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setBootDiskSizeGb(int value) { + + bootDiskSizeGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The size of the boot disk, in GB. The boot disk must be large
+     * enough to accommodate all of the Docker images from each action in the
+     * pipeline at the same time. If not specified, a small but reasonable
+     * default value is used.
+     * 
+ * + * int32 boot_disk_size_gb = 8; + * + * @return This builder for chaining. + */ + public Builder clearBootDiskSizeGb() { + + bootDiskSizeGb_ = 0; + onChanged(); + return this; + } + + private java.lang.Object cpuPlatform_ = ""; + /** + * + * + *
+     * The CPU platform to request. An instance based on a newer platform can be
+     * allocated, but never one with fewer capabilities. The value of this
+     * parameter must be a valid Compute Engine CPU platform name (such as "Intel
+     * Skylake"). This parameter is only useful for carefully optimized work
+     * loads where the CPU platform has a significant impact.
+     * For more information about the effect of this parameter, see
+     * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+     * 
+ * + * string cpu_platform = 9; + * + * @return The cpuPlatform. + */ + public java.lang.String getCpuPlatform() { + java.lang.Object ref = cpuPlatform_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuPlatform_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The CPU platform to request. An instance based on a newer platform can be
+     * allocated, but never one with fewer capabilities. The value of this
+     * parameter must be a valid Compute Engine CPU platform name (such as "Intel
+     * Skylake"). This parameter is only useful for carefully optimized work
+     * loads where the CPU platform has a significant impact.
+     * For more information about the effect of this parameter, see
+     * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+     * 
+ * + * string cpu_platform = 9; + * + * @return The bytes for cpuPlatform. + */ + public com.google.protobuf.ByteString getCpuPlatformBytes() { + java.lang.Object ref = cpuPlatform_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpuPlatform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The CPU platform to request. An instance based on a newer platform can be
+     * allocated, but never one with fewer capabilities. The value of this
+     * parameter must be a valid Compute Engine CPU platform name (such as "Intel
+     * Skylake"). This parameter is only useful for carefully optimized work
+     * loads where the CPU platform has a significant impact.
+     * For more information about the effect of this parameter, see
+     * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+     * 
+ * + * string cpu_platform = 9; + * + * @param value The cpuPlatform to set. + * @return This builder for chaining. + */ + public Builder setCpuPlatform(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cpuPlatform_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The CPU platform to request. An instance based on a newer platform can be
+     * allocated, but never one with fewer capabilities. The value of this
+     * parameter must be a valid Compute Engine CPU platform name (such as "Intel
+     * Skylake"). This parameter is only useful for carefully optimized work
+     * loads where the CPU platform has a significant impact.
+     * For more information about the effect of this parameter, see
+     * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+     * 
+ * + * string cpu_platform = 9; + * + * @return This builder for chaining. + */ + public Builder clearCpuPlatform() { + + cpuPlatform_ = getDefaultInstance().getCpuPlatform(); + onChanged(); + return this; + } + /** + * + * + *
+     * The CPU platform to request. An instance based on a newer platform can be
+     * allocated, but never one with fewer capabilities. The value of this
+     * parameter must be a valid Compute Engine CPU platform name (such as "Intel
+     * Skylake"). This parameter is only useful for carefully optimized work
+     * loads where the CPU platform has a significant impact.
+     * For more information about the effect of this parameter, see
+     * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+     * 
+ * + * string cpu_platform = 9; + * + * @param value The bytes for cpuPlatform to set. + * @return This builder for chaining. + */ + public Builder setCpuPlatformBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cpuPlatform_ = value; + onChanged(); + return this; + } + + private java.lang.Object bootImage_ = ""; + /** + * + * + *
+     * The host operating system image to use.
+     * Currently, only Container-Optimized OS images can be used.
+     * The default value is `projects/cos-cloud/global/images/family/cos-stable`,
+     * which selects the latest stable release of Container-Optimized OS.
+     * This option is provided to allow testing against the beta release of the
+     * operating system to ensure that the new version does not interact
+     * negatively with production pipelines.
+     * To test a pipeline against the beta release of Container-Optimized OS,
+     * use the value `projects/cos-cloud/global/images/family/cos-beta`.
+     * 
+ * + * string boot_image = 10; + * + * @return The bootImage. + */ + public java.lang.String getBootImage() { + java.lang.Object ref = bootImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bootImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The host operating system image to use.
+     * Currently, only Container-Optimized OS images can be used.
+     * The default value is `projects/cos-cloud/global/images/family/cos-stable`,
+     * which selects the latest stable release of Container-Optimized OS.
+     * This option is provided to allow testing against the beta release of the
+     * operating system to ensure that the new version does not interact
+     * negatively with production pipelines.
+     * To test a pipeline against the beta release of Container-Optimized OS,
+     * use the value `projects/cos-cloud/global/images/family/cos-beta`.
+     * 
+ * + * string boot_image = 10; + * + * @return The bytes for bootImage. + */ + public com.google.protobuf.ByteString getBootImageBytes() { + java.lang.Object ref = bootImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bootImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The host operating system image to use.
+     * Currently, only Container-Optimized OS images can be used.
+     * The default value is `projects/cos-cloud/global/images/family/cos-stable`,
+     * which selects the latest stable release of Container-Optimized OS.
+     * This option is provided to allow testing against the beta release of the
+     * operating system to ensure that the new version does not interact
+     * negatively with production pipelines.
+     * To test a pipeline against the beta release of Container-Optimized OS,
+     * use the value `projects/cos-cloud/global/images/family/cos-beta`.
+     * 
+ * + * string boot_image = 10; + * + * @param value The bootImage to set. + * @return This builder for chaining. + */ + public Builder setBootImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + bootImage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The host operating system image to use.
+     * Currently, only Container-Optimized OS images can be used.
+     * The default value is `projects/cos-cloud/global/images/family/cos-stable`,
+     * which selects the latest stable release of Container-Optimized OS.
+     * This option is provided to allow testing against the beta release of the
+     * operating system to ensure that the new version does not interact
+     * negatively with production pipelines.
+     * To test a pipeline against the beta release of Container-Optimized OS,
+     * use the value `projects/cos-cloud/global/images/family/cos-beta`.
+     * 
+ * + * string boot_image = 10; + * + * @return This builder for chaining. + */ + public Builder clearBootImage() { + + bootImage_ = getDefaultInstance().getBootImage(); + onChanged(); + return this; + } + /** + * + * + *
+     * The host operating system image to use.
+     * Currently, only Container-Optimized OS images can be used.
+     * The default value is `projects/cos-cloud/global/images/family/cos-stable`,
+     * which selects the latest stable release of Container-Optimized OS.
+     * This option is provided to allow testing against the beta release of the
+     * operating system to ensure that the new version does not interact
+     * negatively with production pipelines.
+     * To test a pipeline against the beta release of Container-Optimized OS,
+     * use the value `projects/cos-cloud/global/images/family/cos-beta`.
+     * 
+ * + * string boot_image = 10; + * + * @param value The bytes for bootImage to set. + * @return This builder for chaining. + */ + public Builder setBootImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + bootImage_ = value; + onChanged(); + return this; + } + + private java.lang.Object nvidiaDriverVersion_ = ""; + /** + * + * + *
+     * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator.
+     * The version specified here must be compatible with the GPU libraries
+     * contained in the container being executed, and must be one of the drivers
+     * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage.
+     * 
+ * + * string nvidia_driver_version = 11 [deprecated = true]; + * + * @return The nvidiaDriverVersion. + */ + @java.lang.Deprecated + public java.lang.String getNvidiaDriverVersion() { + java.lang.Object ref = nvidiaDriverVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nvidiaDriverVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator.
+     * The version specified here must be compatible with the GPU libraries
+     * contained in the container being executed, and must be one of the drivers
+     * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage.
+     * 
+ * + * string nvidia_driver_version = 11 [deprecated = true]; + * + * @return The bytes for nvidiaDriverVersion. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getNvidiaDriverVersionBytes() { + java.lang.Object ref = nvidiaDriverVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nvidiaDriverVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator.
+     * The version specified here must be compatible with the GPU libraries
+     * contained in the container being executed, and must be one of the drivers
+     * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage.
+     * 
+ * + * string nvidia_driver_version = 11 [deprecated = true]; + * + * @param value The nvidiaDriverVersion to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setNvidiaDriverVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nvidiaDriverVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator.
+     * The version specified here must be compatible with the GPU libraries
+     * contained in the container being executed, and must be one of the drivers
+     * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage.
+     * 
+ * + * string nvidia_driver_version = 11 [deprecated = true]; + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearNvidiaDriverVersion() { + + nvidiaDriverVersion_ = getDefaultInstance().getNvidiaDriverVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator.
+     * The version specified here must be compatible with the GPU libraries
+     * contained in the container being executed, and must be one of the drivers
+     * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage.
+     * 
+ * + * string nvidia_driver_version = 11 [deprecated = true]; + * + * @param value The bytes for nvidiaDriverVersion to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setNvidiaDriverVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nvidiaDriverVersion_ = value; + onChanged(); + return this; + } + + private boolean enableStackdriverMonitoring_; + /** + * + * + *
+     * Whether Stackdriver monitoring should be enabled on the VM.
+     * 
+ * + * bool enable_stackdriver_monitoring = 12; + * + * @return The enableStackdriverMonitoring. + */ + @java.lang.Override + public boolean getEnableStackdriverMonitoring() { + return enableStackdriverMonitoring_; + } + /** + * + * + *
+     * Whether Stackdriver monitoring should be enabled on the VM.
+     * 
+ * + * bool enable_stackdriver_monitoring = 12; + * + * @param value The enableStackdriverMonitoring to set. + * @return This builder for chaining. + */ + public Builder setEnableStackdriverMonitoring(boolean value) { + + enableStackdriverMonitoring_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether Stackdriver monitoring should be enabled on the VM.
+     * 
+ * + * bool enable_stackdriver_monitoring = 12; + * + * @return This builder for chaining. + */ + public Builder clearEnableStackdriverMonitoring() { + + enableStackdriverMonitoring_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList dockerCacheImages_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDockerCacheImagesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + dockerCacheImages_ = new com.google.protobuf.LazyStringArrayList(dockerCacheImages_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+     * mounted into the Docker folder in a way that the images present in the
+     * cache will not need to be pulled. The digests of the cached images must
+     * match those of the tags used or the latest version will still be pulled.
+     * The root directory of the ext4 image must contain `image` and `overlay2`
+     * directories copied from the Docker directory of a VM where the desired
+     * Docker images have already been pulled. Any images pulled that are not
+     * cached will be stored on the first cache disk instead of the boot disk.
+     * Only a single image is supported.
+     * 
+ * + * repeated string docker_cache_images = 13; + * + * @return A list containing the dockerCacheImages. + */ + public com.google.protobuf.ProtocolStringList getDockerCacheImagesList() { + return dockerCacheImages_.getUnmodifiableView(); + } + /** + * + * + *
+     * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+     * mounted into the Docker folder in a way that the images present in the
+     * cache will not need to be pulled. The digests of the cached images must
+     * match those of the tags used or the latest version will still be pulled.
+     * The root directory of the ext4 image must contain `image` and `overlay2`
+     * directories copied from the Docker directory of a VM where the desired
+     * Docker images have already been pulled. Any images pulled that are not
+     * cached will be stored on the first cache disk instead of the boot disk.
+     * Only a single image is supported.
+     * 
+ * + * repeated string docker_cache_images = 13; + * + * @return The count of dockerCacheImages. + */ + public int getDockerCacheImagesCount() { + return dockerCacheImages_.size(); + } + /** + * + * + *
+     * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+     * mounted into the Docker folder in a way that the images present in the
+     * cache will not need to be pulled. The digests of the cached images must
+     * match those of the tags used or the latest version will still be pulled.
+     * The root directory of the ext4 image must contain `image` and `overlay2`
+     * directories copied from the Docker directory of a VM where the desired
+     * Docker images have already been pulled. Any images pulled that are not
+     * cached will be stored on the first cache disk instead of the boot disk.
+     * Only a single image is supported.
+     * 
+ * + * repeated string docker_cache_images = 13; + * + * @param index The index of the element to return. + * @return The dockerCacheImages at the given index. + */ + public java.lang.String getDockerCacheImages(int index) { + return dockerCacheImages_.get(index); + } + /** + * + * + *
+     * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+     * mounted into the Docker folder in a way that the images present in the
+     * cache will not need to be pulled. The digests of the cached images must
+     * match those of the tags used or the latest version will still be pulled.
+     * The root directory of the ext4 image must contain `image` and `overlay2`
+     * directories copied from the Docker directory of a VM where the desired
+     * Docker images have already been pulled. Any images pulled that are not
+     * cached will be stored on the first cache disk instead of the boot disk.
+     * Only a single image is supported.
+     * 
+ * + * repeated string docker_cache_images = 13; + * + * @param index The index of the value to return. + * @return The bytes of the dockerCacheImages at the given index. + */ + public com.google.protobuf.ByteString getDockerCacheImagesBytes(int index) { + return dockerCacheImages_.getByteString(index); + } + /** + * + * + *
+     * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+     * mounted into the Docker folder in a way that the images present in the
+     * cache will not need to be pulled. The digests of the cached images must
+     * match those of the tags used or the latest version will still be pulled.
+     * The root directory of the ext4 image must contain `image` and `overlay2`
+     * directories copied from the Docker directory of a VM where the desired
+     * Docker images have already been pulled. Any images pulled that are not
+     * cached will be stored on the first cache disk instead of the boot disk.
+     * Only a single image is supported.
+     * 
+ * + * repeated string docker_cache_images = 13; + * + * @param index The index to set the value at. + * @param value The dockerCacheImages to set. + * @return This builder for chaining. + */ + public Builder setDockerCacheImages(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDockerCacheImagesIsMutable(); + dockerCacheImages_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+     * mounted into the Docker folder in a way that the images present in the
+     * cache will not need to be pulled. The digests of the cached images must
+     * match those of the tags used or the latest version will still be pulled.
+     * The root directory of the ext4 image must contain `image` and `overlay2`
+     * directories copied from the Docker directory of a VM where the desired
+     * Docker images have already been pulled. Any images pulled that are not
+     * cached will be stored on the first cache disk instead of the boot disk.
+     * Only a single image is supported.
+     * 
+ * + * repeated string docker_cache_images = 13; + * + * @param value The dockerCacheImages to add. + * @return This builder for chaining. + */ + public Builder addDockerCacheImages(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDockerCacheImagesIsMutable(); + dockerCacheImages_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+     * mounted into the Docker folder in a way that the images present in the
+     * cache will not need to be pulled. The digests of the cached images must
+     * match those of the tags used or the latest version will still be pulled.
+     * The root directory of the ext4 image must contain `image` and `overlay2`
+     * directories copied from the Docker directory of a VM where the desired
+     * Docker images have already been pulled. Any images pulled that are not
+     * cached will be stored on the first cache disk instead of the boot disk.
+     * Only a single image is supported.
+     * 
+ * + * repeated string docker_cache_images = 13; + * + * @param values The dockerCacheImages to add. + * @return This builder for chaining. + */ + public Builder addAllDockerCacheImages(java.lang.Iterable values) { + ensureDockerCacheImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dockerCacheImages_); + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+     * mounted into the Docker folder in a way that the images present in the
+     * cache will not need to be pulled. The digests of the cached images must
+     * match those of the tags used or the latest version will still be pulled.
+     * The root directory of the ext4 image must contain `image` and `overlay2`
+     * directories copied from the Docker directory of a VM where the desired
+     * Docker images have already been pulled. Any images pulled that are not
+     * cached will be stored on the first cache disk instead of the boot disk.
+     * Only a single image is supported.
+     * 
+ * + * repeated string docker_cache_images = 13; + * + * @return This builder for chaining. + */ + public Builder clearDockerCacheImages() { + dockerCacheImages_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+     * mounted into the Docker folder in a way that the images present in the
+     * cache will not need to be pulled. The digests of the cached images must
+     * match those of the tags used or the latest version will still be pulled.
+     * The root directory of the ext4 image must contain `image` and `overlay2`
+     * directories copied from the Docker directory of a VM where the desired
+     * Docker images have already been pulled. Any images pulled that are not
+     * cached will be stored on the first cache disk instead of the boot disk.
+     * Only a single image is supported.
+     * 
+ * + * repeated string docker_cache_images = 13; + * + * @param value The bytes of the dockerCacheImages to add. + * @return This builder for chaining. + */ + public Builder addDockerCacheImagesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDockerCacheImagesIsMutable(); + dockerCacheImages_.add(value); + onChanged(); + return this; + } + + private java.util.List volumes_ = + java.util.Collections.emptyList(); + + private void ensureVolumesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + volumes_ = new java.util.ArrayList(volumes_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Volume, + com.google.cloud.lifesciences.v2beta.Volume.Builder, + com.google.cloud.lifesciences.v2beta.VolumeOrBuilder> + volumesBuilder_; + + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public java.util.List getVolumesList() { + if (volumesBuilder_ == null) { + return java.util.Collections.unmodifiableList(volumes_); + } else { + return volumesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public int getVolumesCount() { + if (volumesBuilder_ == null) { + return volumes_.size(); + } else { + return volumesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public com.google.cloud.lifesciences.v2beta.Volume getVolumes(int index) { + if (volumesBuilder_ == null) { + return volumes_.get(index); + } else { + return volumesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public Builder setVolumes(int index, com.google.cloud.lifesciences.v2beta.Volume value) { + if (volumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVolumesIsMutable(); + volumes_.set(index, value); + onChanged(); + } else { + volumesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public Builder setVolumes( + int index, com.google.cloud.lifesciences.v2beta.Volume.Builder builderForValue) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.set(index, builderForValue.build()); + onChanged(); + } else { + volumesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public Builder addVolumes(com.google.cloud.lifesciences.v2beta.Volume value) { + if (volumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVolumesIsMutable(); + volumes_.add(value); + onChanged(); + } else { + volumesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public Builder addVolumes(int index, com.google.cloud.lifesciences.v2beta.Volume value) { + if (volumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVolumesIsMutable(); + volumes_.add(index, value); + onChanged(); + } else { + volumesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public Builder addVolumes(com.google.cloud.lifesciences.v2beta.Volume.Builder builderForValue) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.add(builderForValue.build()); + onChanged(); + } else { + volumesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public Builder addVolumes( + int index, com.google.cloud.lifesciences.v2beta.Volume.Builder builderForValue) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.add(index, builderForValue.build()); + onChanged(); + } else { + volumesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public Builder addAllVolumes( + java.lang.Iterable values) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, volumes_); + onChanged(); + } else { + volumesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public Builder clearVolumes() { + if (volumesBuilder_ == null) { + volumes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + volumesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public Builder removeVolumes(int index) { + if (volumesBuilder_ == null) { + ensureVolumesIsMutable(); + volumes_.remove(index); + onChanged(); + } else { + volumesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public com.google.cloud.lifesciences.v2beta.Volume.Builder getVolumesBuilder(int index) { + return getVolumesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public com.google.cloud.lifesciences.v2beta.VolumeOrBuilder getVolumesOrBuilder(int index) { + if (volumesBuilder_ == null) { + return volumes_.get(index); + } else { + return volumesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public java.util.List + getVolumesOrBuilderList() { + if (volumesBuilder_ != null) { + return volumesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(volumes_); + } + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public com.google.cloud.lifesciences.v2beta.Volume.Builder addVolumesBuilder() { + return getVolumesFieldBuilder() + .addBuilder(com.google.cloud.lifesciences.v2beta.Volume.getDefaultInstance()); + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public com.google.cloud.lifesciences.v2beta.Volume.Builder addVolumesBuilder(int index) { + return getVolumesFieldBuilder() + .addBuilder(index, com.google.cloud.lifesciences.v2beta.Volume.getDefaultInstance()); + } + /** + * + * + *
+     * The list of disks and other storage to create or attach to the VM.
+     * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+     * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + public java.util.List + getVolumesBuilderList() { + return getVolumesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Volume, + com.google.cloud.lifesciences.v2beta.Volume.Builder, + com.google.cloud.lifesciences.v2beta.VolumeOrBuilder> + getVolumesFieldBuilder() { + if (volumesBuilder_ == null) { + volumesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.Volume, + com.google.cloud.lifesciences.v2beta.Volume.Builder, + com.google.cloud.lifesciences.v2beta.VolumeOrBuilder>( + volumes_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + volumes_ = null; + } + return volumesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.lifesciences.v2beta.VirtualMachine) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.VirtualMachine) + private static final com.google.cloud.lifesciences.v2beta.VirtualMachine DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.VirtualMachine(); + } + + public static com.google.cloud.lifesciences.v2beta.VirtualMachine getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualMachine parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VirtualMachine(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.lifesciences.v2beta.VirtualMachine getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VirtualMachineOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VirtualMachineOrBuilder.java new file mode 100644 index 00000000..c34c6f95 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VirtualMachineOrBuilder.java @@ -0,0 +1,621 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface VirtualMachineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.VirtualMachine) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The machine type of the virtual machine to create. Must be the short name
+   * of a standard machine type (such as "n1-standard-1") or a custom machine
+   * type (such as "custom-1-4096", where "1" indicates the number of vCPUs and
+   * "4096" indicates the memory in MB). See
+   * [Creating an instance with a custom machine
+   * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create)
+   * for more specifications on creating a custom machine type.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Required. The machine type of the virtual machine to create. Must be the short name
+   * of a standard machine type (such as "n1-standard-1") or a custom machine
+   * type (such as "custom-1-4096", where "1" indicates the number of vCPUs and
+   * "4096" indicates the memory in MB). See
+   * [Creating an instance with a custom machine
+   * type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create)
+   * for more specifications on creating a custom machine type.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * If true, allocate a preemptible VM.
+   * 
+ * + * bool preemptible = 2; + * + * @return The preemptible. + */ + boolean getPreemptible(); + + /** + * + * + *
+   * Optional set of labels to apply to the VM and any attached disk resources.
+   * These labels must adhere to the [name and value
+   * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+   * VM labels imposed by Compute Engine.
+   * Labels keys with the prefix 'google-' are reserved for use by Google.
+   * Labels applied at creation time to the VM. Applied on a best-effort basis
+   * to attached disk resources shortly after VM creation.
+   * 
+ * + * map<string, string> labels = 3; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional set of labels to apply to the VM and any attached disk resources.
+   * These labels must adhere to the [name and value
+   * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+   * VM labels imposed by Compute Engine.
+   * Labels keys with the prefix 'google-' are reserved for use by Google.
+   * Labels applied at creation time to the VM. Applied on a best-effort basis
+   * to attached disk resources shortly after VM creation.
+   * 
+ * + * map<string, string> labels = 3; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional set of labels to apply to the VM and any attached disk resources.
+   * These labels must adhere to the [name and value
+   * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+   * VM labels imposed by Compute Engine.
+   * Labels keys with the prefix 'google-' are reserved for use by Google.
+   * Labels applied at creation time to the VM. Applied on a best-effort basis
+   * to attached disk resources shortly after VM creation.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional set of labels to apply to the VM and any attached disk resources.
+   * These labels must adhere to the [name and value
+   * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+   * VM labels imposed by Compute Engine.
+   * Labels keys with the prefix 'google-' are reserved for use by Google.
+   * Labels applied at creation time to the VM. Applied on a best-effort basis
+   * to attached disk resources shortly after VM creation.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional set of labels to apply to the VM and any attached disk resources.
+   * These labels must adhere to the [name and value
+   * restrictions](https://cloud.google.com/compute/docs/labeling-resources) on
+   * VM labels imposed by Compute Engine.
+   * Labels keys with the prefix 'google-' are reserved for use by Google.
+   * Labels applied at creation time to the VM. Applied on a best-effort basis
+   * to attached disk resources shortly after VM creation.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The list of disks to create and attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + java.util.List getDisksList(); + /** + * + * + *
+   * The list of disks to create and attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + com.google.cloud.lifesciences.v2beta.Disk getDisks(int index); + /** + * + * + *
+   * The list of disks to create and attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + int getDisksCount(); + /** + * + * + *
+   * The list of disks to create and attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + java.util.List + getDisksOrBuilderList(); + /** + * + * + *
+   * The list of disks to create and attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Disk disks = 4; + */ + com.google.cloud.lifesciences.v2beta.DiskOrBuilder getDisksOrBuilder(int index); + + /** + * + * + *
+   * The VM network configuration.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * The VM network configuration.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + * + * @return The network. + */ + com.google.cloud.lifesciences.v2beta.Network getNetwork(); + /** + * + * + *
+   * The VM network configuration.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.Network network = 5; + */ + com.google.cloud.lifesciences.v2beta.NetworkOrBuilder getNetworkOrBuilder(); + + /** + * + * + *
+   * The list of accelerators to attach to the VM.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + java.util.List getAcceleratorsList(); + /** + * + * + *
+   * The list of accelerators to attach to the VM.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + com.google.cloud.lifesciences.v2beta.Accelerator getAccelerators(int index); + /** + * + * + *
+   * The list of accelerators to attach to the VM.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + int getAcceleratorsCount(); + /** + * + * + *
+   * The list of accelerators to attach to the VM.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + java.util.List + getAcceleratorsOrBuilderList(); + /** + * + * + *
+   * The list of accelerators to attach to the VM.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Accelerator accelerators = 6; + */ + com.google.cloud.lifesciences.v2beta.AcceleratorOrBuilder getAcceleratorsOrBuilder(int index); + + /** + * + * + *
+   * The service account to install on the VM. This account does not need
+   * any permissions other than those required by the pipeline.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + * + * @return Whether the serviceAccount field is set. + */ + boolean hasServiceAccount(); + /** + * + * + *
+   * The service account to install on the VM. This account does not need
+   * any permissions other than those required by the pipeline.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + * + * @return The serviceAccount. + */ + com.google.cloud.lifesciences.v2beta.ServiceAccount getServiceAccount(); + /** + * + * + *
+   * The service account to install on the VM. This account does not need
+   * any permissions other than those required by the pipeline.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ServiceAccount service_account = 7; + */ + com.google.cloud.lifesciences.v2beta.ServiceAccountOrBuilder getServiceAccountOrBuilder(); + + /** + * + * + *
+   * The size of the boot disk, in GB. The boot disk must be large
+   * enough to accommodate all of the Docker images from each action in the
+   * pipeline at the same time. If not specified, a small but reasonable
+   * default value is used.
+   * 
+ * + * int32 boot_disk_size_gb = 8; + * + * @return The bootDiskSizeGb. + */ + int getBootDiskSizeGb(); + + /** + * + * + *
+   * The CPU platform to request. An instance based on a newer platform can be
+   * allocated, but never one with fewer capabilities. The value of this
+   * parameter must be a valid Compute Engine CPU platform name (such as "Intel
+   * Skylake"). This parameter is only useful for carefully optimized work
+   * loads where the CPU platform has a significant impact.
+   * For more information about the effect of this parameter, see
+   * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+   * 
+ * + * string cpu_platform = 9; + * + * @return The cpuPlatform. + */ + java.lang.String getCpuPlatform(); + /** + * + * + *
+   * The CPU platform to request. An instance based on a newer platform can be
+   * allocated, but never one with fewer capabilities. The value of this
+   * parameter must be a valid Compute Engine CPU platform name (such as "Intel
+   * Skylake"). This parameter is only useful for carefully optimized work
+   * loads where the CPU platform has a significant impact.
+   * For more information about the effect of this parameter, see
+   * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+   * 
+ * + * string cpu_platform = 9; + * + * @return The bytes for cpuPlatform. + */ + com.google.protobuf.ByteString getCpuPlatformBytes(); + + /** + * + * + *
+   * The host operating system image to use.
+   * Currently, only Container-Optimized OS images can be used.
+   * The default value is `projects/cos-cloud/global/images/family/cos-stable`,
+   * which selects the latest stable release of Container-Optimized OS.
+   * This option is provided to allow testing against the beta release of the
+   * operating system to ensure that the new version does not interact
+   * negatively with production pipelines.
+   * To test a pipeline against the beta release of Container-Optimized OS,
+   * use the value `projects/cos-cloud/global/images/family/cos-beta`.
+   * 
+ * + * string boot_image = 10; + * + * @return The bootImage. + */ + java.lang.String getBootImage(); + /** + * + * + *
+   * The host operating system image to use.
+   * Currently, only Container-Optimized OS images can be used.
+   * The default value is `projects/cos-cloud/global/images/family/cos-stable`,
+   * which selects the latest stable release of Container-Optimized OS.
+   * This option is provided to allow testing against the beta release of the
+   * operating system to ensure that the new version does not interact
+   * negatively with production pipelines.
+   * To test a pipeline against the beta release of Container-Optimized OS,
+   * use the value `projects/cos-cloud/global/images/family/cos-beta`.
+   * 
+ * + * string boot_image = 10; + * + * @return The bytes for bootImage. + */ + com.google.protobuf.ByteString getBootImageBytes(); + + /** + * + * + *
+   * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator.
+   * The version specified here must be compatible with the GPU libraries
+   * contained in the container being executed, and must be one of the drivers
+   * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage.
+   * 
+ * + * string nvidia_driver_version = 11 [deprecated = true]; + * + * @return The nvidiaDriverVersion. + */ + @java.lang.Deprecated + java.lang.String getNvidiaDriverVersion(); + /** + * + * + *
+   * The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator.
+   * The version specified here must be compatible with the GPU libraries
+   * contained in the container being executed, and must be one of the drivers
+   * hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage.
+   * 
+ * + * string nvidia_driver_version = 11 [deprecated = true]; + * + * @return The bytes for nvidiaDriverVersion. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getNvidiaDriverVersionBytes(); + + /** + * + * + *
+   * Whether Stackdriver monitoring should be enabled on the VM.
+   * 
+ * + * bool enable_stackdriver_monitoring = 12; + * + * @return The enableStackdriverMonitoring. + */ + boolean getEnableStackdriverMonitoring(); + + /** + * + * + *
+   * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+   * mounted into the Docker folder in a way that the images present in the
+   * cache will not need to be pulled. The digests of the cached images must
+   * match those of the tags used or the latest version will still be pulled.
+   * The root directory of the ext4 image must contain `image` and `overlay2`
+   * directories copied from the Docker directory of a VM where the desired
+   * Docker images have already been pulled. Any images pulled that are not
+   * cached will be stored on the first cache disk instead of the boot disk.
+   * Only a single image is supported.
+   * 
+ * + * repeated string docker_cache_images = 13; + * + * @return A list containing the dockerCacheImages. + */ + java.util.List getDockerCacheImagesList(); + /** + * + * + *
+   * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+   * mounted into the Docker folder in a way that the images present in the
+   * cache will not need to be pulled. The digests of the cached images must
+   * match those of the tags used or the latest version will still be pulled.
+   * The root directory of the ext4 image must contain `image` and `overlay2`
+   * directories copied from the Docker directory of a VM where the desired
+   * Docker images have already been pulled. Any images pulled that are not
+   * cached will be stored on the first cache disk instead of the boot disk.
+   * Only a single image is supported.
+   * 
+ * + * repeated string docker_cache_images = 13; + * + * @return The count of dockerCacheImages. + */ + int getDockerCacheImagesCount(); + /** + * + * + *
+   * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+   * mounted into the Docker folder in a way that the images present in the
+   * cache will not need to be pulled. The digests of the cached images must
+   * match those of the tags used or the latest version will still be pulled.
+   * The root directory of the ext4 image must contain `image` and `overlay2`
+   * directories copied from the Docker directory of a VM where the desired
+   * Docker images have already been pulled. Any images pulled that are not
+   * cached will be stored on the first cache disk instead of the boot disk.
+   * Only a single image is supported.
+   * 
+ * + * repeated string docker_cache_images = 13; + * + * @param index The index of the element to return. + * @return The dockerCacheImages at the given index. + */ + java.lang.String getDockerCacheImages(int index); + /** + * + * + *
+   * The Compute Engine Disk Images to use as a Docker cache. The disks will be
+   * mounted into the Docker folder in a way that the images present in the
+   * cache will not need to be pulled. The digests of the cached images must
+   * match those of the tags used or the latest version will still be pulled.
+   * The root directory of the ext4 image must contain `image` and `overlay2`
+   * directories copied from the Docker directory of a VM where the desired
+   * Docker images have already been pulled. Any images pulled that are not
+   * cached will be stored on the first cache disk instead of the boot disk.
+   * Only a single image is supported.
+   * 
+ * + * repeated string docker_cache_images = 13; + * + * @param index The index of the value to return. + * @return The bytes of the dockerCacheImages at the given index. + */ + com.google.protobuf.ByteString getDockerCacheImagesBytes(int index); + + /** + * + * + *
+   * The list of disks and other storage to create or attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + java.util.List getVolumesList(); + /** + * + * + *
+   * The list of disks and other storage to create or attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + com.google.cloud.lifesciences.v2beta.Volume getVolumes(int index); + /** + * + * + *
+   * The list of disks and other storage to create or attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + int getVolumesCount(); + /** + * + * + *
+   * The list of disks and other storage to create or attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + java.util.List + getVolumesOrBuilderList(); + /** + * + * + *
+   * The list of disks and other storage to create or attach to the VM.
+   * Specify either the `volumes[]` field or the `disks[]` field, but not both.
+   * 
+ * + * repeated .google.cloud.lifesciences.v2beta.Volume volumes = 14; + */ + com.google.cloud.lifesciences.v2beta.VolumeOrBuilder getVolumesOrBuilder(int index); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Volume.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Volume.java new file mode 100644 index 00000000..335ea6f5 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/Volume.java @@ -0,0 +1,1657 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * Carries information about storage that can be attached to a VM.
+ * Specify either [`Volume`][google.cloud.lifesciences.v2beta.Volume] or
+ * [`Disk`][google.cloud.lifesciences.v2beta.Disk], but not both.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Volume} + */ +public final class Volume extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.Volume) + VolumeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Volume.newBuilder() to construct. + private Volume(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Volume() { + volume_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Volume(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Volume( + 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(); + + volume_ = s; + break; + } + case 18: + { + com.google.cloud.lifesciences.v2beta.PersistentDisk.Builder subBuilder = null; + if (storageCase_ == 2) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.PersistentDisk) storage_).toBuilder(); + } + storage_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.PersistentDisk.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.lifesciences.v2beta.PersistentDisk) storage_); + storage_ = subBuilder.buildPartial(); + } + storageCase_ = 2; + break; + } + case 26: + { + com.google.cloud.lifesciences.v2beta.ExistingDisk.Builder subBuilder = null; + if (storageCase_ == 3) { + subBuilder = + ((com.google.cloud.lifesciences.v2beta.ExistingDisk) storage_).toBuilder(); + } + storage_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.ExistingDisk.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.lifesciences.v2beta.ExistingDisk) storage_); + storage_ = subBuilder.buildPartial(); + } + storageCase_ = 3; + break; + } + case 34: + { + com.google.cloud.lifesciences.v2beta.NFSMount.Builder subBuilder = null; + if (storageCase_ == 4) { + subBuilder = ((com.google.cloud.lifesciences.v2beta.NFSMount) storage_).toBuilder(); + } + storage_ = + input.readMessage( + com.google.cloud.lifesciences.v2beta.NFSMount.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.lifesciences.v2beta.NFSMount) storage_); + storage_ = subBuilder.buildPartial(); + } + storageCase_ = 4; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Volume_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Volume_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Volume.class, + com.google.cloud.lifesciences.v2beta.Volume.Builder.class); + } + + private int storageCase_ = 0; + private java.lang.Object storage_; + + public enum StorageCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PERSISTENT_DISK(2), + EXISTING_DISK(3), + NFS_MOUNT(4), + STORAGE_NOT_SET(0); + private final int value; + + private StorageCase(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 StorageCase valueOf(int value) { + return forNumber(value); + } + + public static StorageCase forNumber(int value) { + switch (value) { + case 2: + return PERSISTENT_DISK; + case 3: + return EXISTING_DISK; + case 4: + return NFS_MOUNT; + case 0: + return STORAGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StorageCase getStorageCase() { + return StorageCase.forNumber(storageCase_); + } + + public static final int VOLUME_FIELD_NUMBER = 1; + private volatile java.lang.Object volume_; + /** + * + * + *
+   * A user-supplied name for the volume. Used when mounting the volume into
+   * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain
+   * only upper and lowercase alphanumeric characters and hyphens and cannot
+   * start with a hyphen.
+   * 
+ * + * string volume = 1; + * + * @return The volume. + */ + @java.lang.Override + public java.lang.String getVolume() { + java.lang.Object ref = volume_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + volume_ = s; + return s; + } + } + /** + * + * + *
+   * A user-supplied name for the volume. Used when mounting the volume into
+   * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain
+   * only upper and lowercase alphanumeric characters and hyphens and cannot
+   * start with a hyphen.
+   * 
+ * + * string volume = 1; + * + * @return The bytes for volume. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVolumeBytes() { + java.lang.Object ref = volume_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + volume_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERSISTENT_DISK_FIELD_NUMBER = 2; + /** + * + * + *
+   * Configuration for a persistent disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + * + * @return Whether the persistentDisk field is set. + */ + @java.lang.Override + public boolean hasPersistentDisk() { + return storageCase_ == 2; + } + /** + * + * + *
+   * Configuration for a persistent disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + * + * @return The persistentDisk. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PersistentDisk getPersistentDisk() { + if (storageCase_ == 2) { + return (com.google.cloud.lifesciences.v2beta.PersistentDisk) storage_; + } + return com.google.cloud.lifesciences.v2beta.PersistentDisk.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for a persistent disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PersistentDiskOrBuilder getPersistentDiskOrBuilder() { + if (storageCase_ == 2) { + return (com.google.cloud.lifesciences.v2beta.PersistentDisk) storage_; + } + return com.google.cloud.lifesciences.v2beta.PersistentDisk.getDefaultInstance(); + } + + public static final int EXISTING_DISK_FIELD_NUMBER = 3; + /** + * + * + *
+   * Configuration for a existing disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + * + * @return Whether the existingDisk field is set. + */ + @java.lang.Override + public boolean hasExistingDisk() { + return storageCase_ == 3; + } + /** + * + * + *
+   * Configuration for a existing disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + * + * @return The existingDisk. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ExistingDisk getExistingDisk() { + if (storageCase_ == 3) { + return (com.google.cloud.lifesciences.v2beta.ExistingDisk) storage_; + } + return com.google.cloud.lifesciences.v2beta.ExistingDisk.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for a existing disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ExistingDiskOrBuilder getExistingDiskOrBuilder() { + if (storageCase_ == 3) { + return (com.google.cloud.lifesciences.v2beta.ExistingDisk) storage_; + } + return com.google.cloud.lifesciences.v2beta.ExistingDisk.getDefaultInstance(); + } + + public static final int NFS_MOUNT_FIELD_NUMBER = 4; + /** + * + * + *
+   * Configuration for an NFS mount.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + * + * @return Whether the nfsMount field is set. + */ + @java.lang.Override + public boolean hasNfsMount() { + return storageCase_ == 4; + } + /** + * + * + *
+   * Configuration for an NFS mount.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + * + * @return The nfsMount. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.NFSMount getNfsMount() { + if (storageCase_ == 4) { + return (com.google.cloud.lifesciences.v2beta.NFSMount) storage_; + } + return com.google.cloud.lifesciences.v2beta.NFSMount.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for an NFS mount.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.NFSMountOrBuilder getNfsMountOrBuilder() { + if (storageCase_ == 4) { + return (com.google.cloud.lifesciences.v2beta.NFSMount) storage_; + } + return com.google.cloud.lifesciences.v2beta.NFSMount.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getVolumeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, volume_); + } + if (storageCase_ == 2) { + output.writeMessage(2, (com.google.cloud.lifesciences.v2beta.PersistentDisk) storage_); + } + if (storageCase_ == 3) { + output.writeMessage(3, (com.google.cloud.lifesciences.v2beta.ExistingDisk) storage_); + } + if (storageCase_ == 4) { + output.writeMessage(4, (com.google.cloud.lifesciences.v2beta.NFSMount) storage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVolumeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, volume_); + } + if (storageCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.lifesciences.v2beta.PersistentDisk) storage_); + } + if (storageCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.lifesciences.v2beta.ExistingDisk) storage_); + } + if (storageCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.lifesciences.v2beta.NFSMount) storage_); + } + 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.lifesciences.v2beta.Volume)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.Volume other = + (com.google.cloud.lifesciences.v2beta.Volume) obj; + + if (!getVolume().equals(other.getVolume())) return false; + if (!getStorageCase().equals(other.getStorageCase())) return false; + switch (storageCase_) { + case 2: + if (!getPersistentDisk().equals(other.getPersistentDisk())) return false; + break; + case 3: + if (!getExistingDisk().equals(other.getExistingDisk())) return false; + break; + case 4: + if (!getNfsMount().equals(other.getNfsMount())) 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) + VOLUME_FIELD_NUMBER; + hash = (53 * hash) + getVolume().hashCode(); + switch (storageCase_) { + case 2: + hash = (37 * hash) + PERSISTENT_DISK_FIELD_NUMBER; + hash = (53 * hash) + getPersistentDisk().hashCode(); + break; + case 3: + hash = (37 * hash) + EXISTING_DISK_FIELD_NUMBER; + hash = (53 * hash) + getExistingDisk().hashCode(); + break; + case 4: + hash = (37 * hash) + NFS_MOUNT_FIELD_NUMBER; + hash = (53 * hash) + getNfsMount().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.Volume parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Volume 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.lifesciences.v2beta.Volume parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Volume parseFrom( + 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.lifesciences.v2beta.Volume parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.Volume parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.Volume parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Volume parseFrom( + java.io.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.lifesciences.v2beta.Volume parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Volume parseDelimitedFrom( + java.io.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.lifesciences.v2beta.Volume parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.Volume parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.Volume prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Carries information about storage that can be attached to a VM.
+   * Specify either [`Volume`][google.cloud.lifesciences.v2beta.Volume] or
+   * [`Disk`][google.cloud.lifesciences.v2beta.Disk], but not both.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.Volume} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.Volume) + com.google.cloud.lifesciences.v2beta.VolumeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Volume_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Volume_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.Volume.class, + com.google.cloud.lifesciences.v2beta.Volume.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.Volume.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(); + volume_ = ""; + + storageCase_ = 0; + storage_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_Volume_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Volume getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.Volume.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Volume build() { + com.google.cloud.lifesciences.v2beta.Volume result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.Volume buildPartial() { + com.google.cloud.lifesciences.v2beta.Volume result = + new com.google.cloud.lifesciences.v2beta.Volume(this); + result.volume_ = volume_; + if (storageCase_ == 2) { + if (persistentDiskBuilder_ == null) { + result.storage_ = storage_; + } else { + result.storage_ = persistentDiskBuilder_.build(); + } + } + if (storageCase_ == 3) { + if (existingDiskBuilder_ == null) { + result.storage_ = storage_; + } else { + result.storage_ = existingDiskBuilder_.build(); + } + } + if (storageCase_ == 4) { + if (nfsMountBuilder_ == null) { + result.storage_ = storage_; + } else { + result.storage_ = nfsMountBuilder_.build(); + } + } + result.storageCase_ = storageCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.Volume) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.Volume) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.Volume other) { + if (other == com.google.cloud.lifesciences.v2beta.Volume.getDefaultInstance()) return this; + if (!other.getVolume().isEmpty()) { + volume_ = other.volume_; + onChanged(); + } + switch (other.getStorageCase()) { + case PERSISTENT_DISK: + { + mergePersistentDisk(other.getPersistentDisk()); + break; + } + case EXISTING_DISK: + { + mergeExistingDisk(other.getExistingDisk()); + break; + } + case NFS_MOUNT: + { + mergeNfsMount(other.getNfsMount()); + break; + } + case STORAGE_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.lifesciences.v2beta.Volume parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.lifesciences.v2beta.Volume) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int storageCase_ = 0; + private java.lang.Object storage_; + + public StorageCase getStorageCase() { + return StorageCase.forNumber(storageCase_); + } + + public Builder clearStorage() { + storageCase_ = 0; + storage_ = null; + onChanged(); + return this; + } + + private java.lang.Object volume_ = ""; + /** + * + * + *
+     * A user-supplied name for the volume. Used when mounting the volume into
+     * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain
+     * only upper and lowercase alphanumeric characters and hyphens and cannot
+     * start with a hyphen.
+     * 
+ * + * string volume = 1; + * + * @return The volume. + */ + public java.lang.String getVolume() { + java.lang.Object ref = volume_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + volume_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A user-supplied name for the volume. Used when mounting the volume into
+     * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain
+     * only upper and lowercase alphanumeric characters and hyphens and cannot
+     * start with a hyphen.
+     * 
+ * + * string volume = 1; + * + * @return The bytes for volume. + */ + public com.google.protobuf.ByteString getVolumeBytes() { + java.lang.Object ref = volume_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + volume_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A user-supplied name for the volume. Used when mounting the volume into
+     * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain
+     * only upper and lowercase alphanumeric characters and hyphens and cannot
+     * start with a hyphen.
+     * 
+ * + * string volume = 1; + * + * @param value The volume to set. + * @return This builder for chaining. + */ + public Builder setVolume(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + volume_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A user-supplied name for the volume. Used when mounting the volume into
+     * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain
+     * only upper and lowercase alphanumeric characters and hyphens and cannot
+     * start with a hyphen.
+     * 
+ * + * string volume = 1; + * + * @return This builder for chaining. + */ + public Builder clearVolume() { + + volume_ = getDefaultInstance().getVolume(); + onChanged(); + return this; + } + /** + * + * + *
+     * A user-supplied name for the volume. Used when mounting the volume into
+     * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain
+     * only upper and lowercase alphanumeric characters and hyphens and cannot
+     * start with a hyphen.
+     * 
+ * + * string volume = 1; + * + * @param value The bytes for volume to set. + * @return This builder for chaining. + */ + public Builder setVolumeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + volume_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.PersistentDisk, + com.google.cloud.lifesciences.v2beta.PersistentDisk.Builder, + com.google.cloud.lifesciences.v2beta.PersistentDiskOrBuilder> + persistentDiskBuilder_; + /** + * + * + *
+     * Configuration for a persistent disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + * + * @return Whether the persistentDisk field is set. + */ + @java.lang.Override + public boolean hasPersistentDisk() { + return storageCase_ == 2; + } + /** + * + * + *
+     * Configuration for a persistent disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + * + * @return The persistentDisk. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PersistentDisk getPersistentDisk() { + if (persistentDiskBuilder_ == null) { + if (storageCase_ == 2) { + return (com.google.cloud.lifesciences.v2beta.PersistentDisk) storage_; + } + return com.google.cloud.lifesciences.v2beta.PersistentDisk.getDefaultInstance(); + } else { + if (storageCase_ == 2) { + return persistentDiskBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.PersistentDisk.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for a persistent disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + */ + public Builder setPersistentDisk(com.google.cloud.lifesciences.v2beta.PersistentDisk value) { + if (persistentDiskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storage_ = value; + onChanged(); + } else { + persistentDiskBuilder_.setMessage(value); + } + storageCase_ = 2; + return this; + } + /** + * + * + *
+     * Configuration for a persistent disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + */ + public Builder setPersistentDisk( + com.google.cloud.lifesciences.v2beta.PersistentDisk.Builder builderForValue) { + if (persistentDiskBuilder_ == null) { + storage_ = builderForValue.build(); + onChanged(); + } else { + persistentDiskBuilder_.setMessage(builderForValue.build()); + } + storageCase_ = 2; + return this; + } + /** + * + * + *
+     * Configuration for a persistent disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + */ + public Builder mergePersistentDisk(com.google.cloud.lifesciences.v2beta.PersistentDisk value) { + if (persistentDiskBuilder_ == null) { + if (storageCase_ == 2 + && storage_ + != com.google.cloud.lifesciences.v2beta.PersistentDisk.getDefaultInstance()) { + storage_ = + com.google.cloud.lifesciences.v2beta.PersistentDisk.newBuilder( + (com.google.cloud.lifesciences.v2beta.PersistentDisk) storage_) + .mergeFrom(value) + .buildPartial(); + } else { + storage_ = value; + } + onChanged(); + } else { + if (storageCase_ == 2) { + persistentDiskBuilder_.mergeFrom(value); + } + persistentDiskBuilder_.setMessage(value); + } + storageCase_ = 2; + return this; + } + /** + * + * + *
+     * Configuration for a persistent disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + */ + public Builder clearPersistentDisk() { + if (persistentDiskBuilder_ == null) { + if (storageCase_ == 2) { + storageCase_ = 0; + storage_ = null; + onChanged(); + } + } else { + if (storageCase_ == 2) { + storageCase_ = 0; + storage_ = null; + } + persistentDiskBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for a persistent disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + */ + public com.google.cloud.lifesciences.v2beta.PersistentDisk.Builder getPersistentDiskBuilder() { + return getPersistentDiskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for a persistent disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.PersistentDiskOrBuilder + getPersistentDiskOrBuilder() { + if ((storageCase_ == 2) && (persistentDiskBuilder_ != null)) { + return persistentDiskBuilder_.getMessageOrBuilder(); + } else { + if (storageCase_ == 2) { + return (com.google.cloud.lifesciences.v2beta.PersistentDisk) storage_; + } + return com.google.cloud.lifesciences.v2beta.PersistentDisk.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for a persistent disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.PersistentDisk, + com.google.cloud.lifesciences.v2beta.PersistentDisk.Builder, + com.google.cloud.lifesciences.v2beta.PersistentDiskOrBuilder> + getPersistentDiskFieldBuilder() { + if (persistentDiskBuilder_ == null) { + if (!(storageCase_ == 2)) { + storage_ = com.google.cloud.lifesciences.v2beta.PersistentDisk.getDefaultInstance(); + } + persistentDiskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.PersistentDisk, + com.google.cloud.lifesciences.v2beta.PersistentDisk.Builder, + com.google.cloud.lifesciences.v2beta.PersistentDiskOrBuilder>( + (com.google.cloud.lifesciences.v2beta.PersistentDisk) storage_, + getParentForChildren(), + isClean()); + storage_ = null; + } + storageCase_ = 2; + onChanged(); + ; + return persistentDiskBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ExistingDisk, + com.google.cloud.lifesciences.v2beta.ExistingDisk.Builder, + com.google.cloud.lifesciences.v2beta.ExistingDiskOrBuilder> + existingDiskBuilder_; + /** + * + * + *
+     * Configuration for a existing disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + * + * @return Whether the existingDisk field is set. + */ + @java.lang.Override + public boolean hasExistingDisk() { + return storageCase_ == 3; + } + /** + * + * + *
+     * Configuration for a existing disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + * + * @return The existingDisk. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ExistingDisk getExistingDisk() { + if (existingDiskBuilder_ == null) { + if (storageCase_ == 3) { + return (com.google.cloud.lifesciences.v2beta.ExistingDisk) storage_; + } + return com.google.cloud.lifesciences.v2beta.ExistingDisk.getDefaultInstance(); + } else { + if (storageCase_ == 3) { + return existingDiskBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.ExistingDisk.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for a existing disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + */ + public Builder setExistingDisk(com.google.cloud.lifesciences.v2beta.ExistingDisk value) { + if (existingDiskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storage_ = value; + onChanged(); + } else { + existingDiskBuilder_.setMessage(value); + } + storageCase_ = 3; + return this; + } + /** + * + * + *
+     * Configuration for a existing disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + */ + public Builder setExistingDisk( + com.google.cloud.lifesciences.v2beta.ExistingDisk.Builder builderForValue) { + if (existingDiskBuilder_ == null) { + storage_ = builderForValue.build(); + onChanged(); + } else { + existingDiskBuilder_.setMessage(builderForValue.build()); + } + storageCase_ = 3; + return this; + } + /** + * + * + *
+     * Configuration for a existing disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + */ + public Builder mergeExistingDisk(com.google.cloud.lifesciences.v2beta.ExistingDisk value) { + if (existingDiskBuilder_ == null) { + if (storageCase_ == 3 + && storage_ != com.google.cloud.lifesciences.v2beta.ExistingDisk.getDefaultInstance()) { + storage_ = + com.google.cloud.lifesciences.v2beta.ExistingDisk.newBuilder( + (com.google.cloud.lifesciences.v2beta.ExistingDisk) storage_) + .mergeFrom(value) + .buildPartial(); + } else { + storage_ = value; + } + onChanged(); + } else { + if (storageCase_ == 3) { + existingDiskBuilder_.mergeFrom(value); + } + existingDiskBuilder_.setMessage(value); + } + storageCase_ = 3; + return this; + } + /** + * + * + *
+     * Configuration for a existing disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + */ + public Builder clearExistingDisk() { + if (existingDiskBuilder_ == null) { + if (storageCase_ == 3) { + storageCase_ = 0; + storage_ = null; + onChanged(); + } + } else { + if (storageCase_ == 3) { + storageCase_ = 0; + storage_ = null; + } + existingDiskBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for a existing disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + */ + public com.google.cloud.lifesciences.v2beta.ExistingDisk.Builder getExistingDiskBuilder() { + return getExistingDiskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for a existing disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.ExistingDiskOrBuilder getExistingDiskOrBuilder() { + if ((storageCase_ == 3) && (existingDiskBuilder_ != null)) { + return existingDiskBuilder_.getMessageOrBuilder(); + } else { + if (storageCase_ == 3) { + return (com.google.cloud.lifesciences.v2beta.ExistingDisk) storage_; + } + return com.google.cloud.lifesciences.v2beta.ExistingDisk.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for a existing disk.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ExistingDisk, + com.google.cloud.lifesciences.v2beta.ExistingDisk.Builder, + com.google.cloud.lifesciences.v2beta.ExistingDiskOrBuilder> + getExistingDiskFieldBuilder() { + if (existingDiskBuilder_ == null) { + if (!(storageCase_ == 3)) { + storage_ = com.google.cloud.lifesciences.v2beta.ExistingDisk.getDefaultInstance(); + } + existingDiskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.ExistingDisk, + com.google.cloud.lifesciences.v2beta.ExistingDisk.Builder, + com.google.cloud.lifesciences.v2beta.ExistingDiskOrBuilder>( + (com.google.cloud.lifesciences.v2beta.ExistingDisk) storage_, + getParentForChildren(), + isClean()); + storage_ = null; + } + storageCase_ = 3; + onChanged(); + ; + return existingDiskBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.NFSMount, + com.google.cloud.lifesciences.v2beta.NFSMount.Builder, + com.google.cloud.lifesciences.v2beta.NFSMountOrBuilder> + nfsMountBuilder_; + /** + * + * + *
+     * Configuration for an NFS mount.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + * + * @return Whether the nfsMount field is set. + */ + @java.lang.Override + public boolean hasNfsMount() { + return storageCase_ == 4; + } + /** + * + * + *
+     * Configuration for an NFS mount.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + * + * @return The nfsMount. + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.NFSMount getNfsMount() { + if (nfsMountBuilder_ == null) { + if (storageCase_ == 4) { + return (com.google.cloud.lifesciences.v2beta.NFSMount) storage_; + } + return com.google.cloud.lifesciences.v2beta.NFSMount.getDefaultInstance(); + } else { + if (storageCase_ == 4) { + return nfsMountBuilder_.getMessage(); + } + return com.google.cloud.lifesciences.v2beta.NFSMount.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for an NFS mount.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + */ + public Builder setNfsMount(com.google.cloud.lifesciences.v2beta.NFSMount value) { + if (nfsMountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storage_ = value; + onChanged(); + } else { + nfsMountBuilder_.setMessage(value); + } + storageCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for an NFS mount.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + */ + public Builder setNfsMount( + com.google.cloud.lifesciences.v2beta.NFSMount.Builder builderForValue) { + if (nfsMountBuilder_ == null) { + storage_ = builderForValue.build(); + onChanged(); + } else { + nfsMountBuilder_.setMessage(builderForValue.build()); + } + storageCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for an NFS mount.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + */ + public Builder mergeNfsMount(com.google.cloud.lifesciences.v2beta.NFSMount value) { + if (nfsMountBuilder_ == null) { + if (storageCase_ == 4 + && storage_ != com.google.cloud.lifesciences.v2beta.NFSMount.getDefaultInstance()) { + storage_ = + com.google.cloud.lifesciences.v2beta.NFSMount.newBuilder( + (com.google.cloud.lifesciences.v2beta.NFSMount) storage_) + .mergeFrom(value) + .buildPartial(); + } else { + storage_ = value; + } + onChanged(); + } else { + if (storageCase_ == 4) { + nfsMountBuilder_.mergeFrom(value); + } + nfsMountBuilder_.setMessage(value); + } + storageCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for an NFS mount.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + */ + public Builder clearNfsMount() { + if (nfsMountBuilder_ == null) { + if (storageCase_ == 4) { + storageCase_ = 0; + storage_ = null; + onChanged(); + } + } else { + if (storageCase_ == 4) { + storageCase_ = 0; + storage_ = null; + } + nfsMountBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for an NFS mount.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + */ + public com.google.cloud.lifesciences.v2beta.NFSMount.Builder getNfsMountBuilder() { + return getNfsMountFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for an NFS mount.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + */ + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.NFSMountOrBuilder getNfsMountOrBuilder() { + if ((storageCase_ == 4) && (nfsMountBuilder_ != null)) { + return nfsMountBuilder_.getMessageOrBuilder(); + } else { + if (storageCase_ == 4) { + return (com.google.cloud.lifesciences.v2beta.NFSMount) storage_; + } + return com.google.cloud.lifesciences.v2beta.NFSMount.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for an NFS mount.
+     * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.NFSMount, + com.google.cloud.lifesciences.v2beta.NFSMount.Builder, + com.google.cloud.lifesciences.v2beta.NFSMountOrBuilder> + getNfsMountFieldBuilder() { + if (nfsMountBuilder_ == null) { + if (!(storageCase_ == 4)) { + storage_ = com.google.cloud.lifesciences.v2beta.NFSMount.getDefaultInstance(); + } + nfsMountBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.lifesciences.v2beta.NFSMount, + com.google.cloud.lifesciences.v2beta.NFSMount.Builder, + com.google.cloud.lifesciences.v2beta.NFSMountOrBuilder>( + (com.google.cloud.lifesciences.v2beta.NFSMount) storage_, + getParentForChildren(), + isClean()); + storage_ = null; + } + storageCase_ = 4; + onChanged(); + ; + return nfsMountBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.lifesciences.v2beta.Volume) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.Volume) + private static final com.google.cloud.lifesciences.v2beta.Volume DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.Volume(); + } + + public static com.google.cloud.lifesciences.v2beta.Volume getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Volume parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Volume(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.lifesciences.v2beta.Volume getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VolumeOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VolumeOrBuilder.java new file mode 100644 index 00000000..706b05d8 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/VolumeOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface VolumeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.Volume) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A user-supplied name for the volume. Used when mounting the volume into
+   * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain
+   * only upper and lowercase alphanumeric characters and hyphens and cannot
+   * start with a hyphen.
+   * 
+ * + * string volume = 1; + * + * @return The volume. + */ + java.lang.String getVolume(); + /** + * + * + *
+   * A user-supplied name for the volume. Used when mounting the volume into
+   * [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain
+   * only upper and lowercase alphanumeric characters and hyphens and cannot
+   * start with a hyphen.
+   * 
+ * + * string volume = 1; + * + * @return The bytes for volume. + */ + com.google.protobuf.ByteString getVolumeBytes(); + + /** + * + * + *
+   * Configuration for a persistent disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + * + * @return Whether the persistentDisk field is set. + */ + boolean hasPersistentDisk(); + /** + * + * + *
+   * Configuration for a persistent disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + * + * @return The persistentDisk. + */ + com.google.cloud.lifesciences.v2beta.PersistentDisk getPersistentDisk(); + /** + * + * + *
+   * Configuration for a persistent disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.PersistentDisk persistent_disk = 2; + */ + com.google.cloud.lifesciences.v2beta.PersistentDiskOrBuilder getPersistentDiskOrBuilder(); + + /** + * + * + *
+   * Configuration for a existing disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + * + * @return Whether the existingDisk field is set. + */ + boolean hasExistingDisk(); + /** + * + * + *
+   * Configuration for a existing disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + * + * @return The existingDisk. + */ + com.google.cloud.lifesciences.v2beta.ExistingDisk getExistingDisk(); + /** + * + * + *
+   * Configuration for a existing disk.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.ExistingDisk existing_disk = 3; + */ + com.google.cloud.lifesciences.v2beta.ExistingDiskOrBuilder getExistingDiskOrBuilder(); + + /** + * + * + *
+   * Configuration for an NFS mount.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + * + * @return Whether the nfsMount field is set. + */ + boolean hasNfsMount(); + /** + * + * + *
+   * Configuration for an NFS mount.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + * + * @return The nfsMount. + */ + com.google.cloud.lifesciences.v2beta.NFSMount getNfsMount(); + /** + * + * + *
+   * Configuration for an NFS mount.
+   * 
+ * + * .google.cloud.lifesciences.v2beta.NFSMount nfs_mount = 4; + */ + com.google.cloud.lifesciences.v2beta.NFSMountOrBuilder getNfsMountOrBuilder(); + + public com.google.cloud.lifesciences.v2beta.Volume.StorageCase getStorageCase(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerAssignedEvent.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerAssignedEvent.java new file mode 100644 index 00000000..de54c925 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerAssignedEvent.java @@ -0,0 +1,997 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * An event generated after a worker VM has been assigned to run the
+ * pipeline.
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.WorkerAssignedEvent} + */ +public final class WorkerAssignedEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.WorkerAssignedEvent) + WorkerAssignedEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use WorkerAssignedEvent.newBuilder() to construct. + private WorkerAssignedEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WorkerAssignedEvent() { + zone_ = ""; + instance_ = ""; + machineType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WorkerAssignedEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WorkerAssignedEvent( + 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(); + + zone_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instance_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + machineType_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_WorkerAssignedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_WorkerAssignedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.class, + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.Builder.class); + } + + public static final int ZONE_FIELD_NUMBER = 1; + private volatile java.lang.Object zone_; + /** + * + * + *
+   * The zone the worker is running in.
+   * 
+ * + * string zone = 1; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * The zone the worker is running in.
+   * 
+ * + * string zone = 1; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 2; + private volatile java.lang.Object instance_; + /** + * + * + *
+   * The worker's instance name.
+   * 
+ * + * string instance = 2; + * + * @return The instance. + */ + @java.lang.Override + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } + } + /** + * + * + *
+   * The worker's instance name.
+   * 
+ * + * string instance = 2; + * + * @return The bytes for instance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 3; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * The machine type that was assigned for the worker.
+   * 
+ * + * string machine_type = 3; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * The machine type that was assigned for the worker.
+   * 
+ * + * string machine_type = 3; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = 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 (!getZoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, zone_); + } + if (!getInstanceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instance_); + } + if (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, machineType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getZoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, zone_); + } + if (!getInstanceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instance_); + } + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, machineType_); + } + 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.lifesciences.v2beta.WorkerAssignedEvent)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent other = + (com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) obj; + + if (!getZone().equals(other.getZone())) return false; + if (!getInstance().equals(other.getInstance())) return false; + if (!getMachineType().equals(other.getMachineType())) 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) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent 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.lifesciences.v2beta.WorkerAssignedEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent parseFrom( + 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.lifesciences.v2beta.WorkerAssignedEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent parseFrom( + java.io.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.lifesciences.v2beta.WorkerAssignedEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent parseDelimitedFrom( + java.io.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.lifesciences.v2beta.WorkerAssignedEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.WorkerAssignedEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event generated after a worker VM has been assigned to run the
+   * pipeline.
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.WorkerAssignedEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.WorkerAssignedEvent) + com.google.cloud.lifesciences.v2beta.WorkerAssignedEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_WorkerAssignedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_WorkerAssignedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.class, + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.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(); + zone_ = ""; + + instance_ = ""; + + machineType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_WorkerAssignedEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent build() { + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent buildPartial() { + com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent result = + new com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent(this); + result.zone_ = zone_; + result.instance_ = instance_; + result.machineType_ = machineType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.WorkerAssignedEvent) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent other) { + if (other == com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent.getDefaultInstance()) + return this; + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + onChanged(); + } + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + onChanged(); + } + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + 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.lifesciences.v2beta.WorkerAssignedEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * The zone the worker is running in.
+     * 
+ * + * string zone = 1; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The zone the worker is running in.
+     * 
+ * + * string zone = 1; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The zone the worker is running in.
+     * 
+ * + * string zone = 1; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + zone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The zone the worker is running in.
+     * 
+ * + * string zone = 1; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + + zone_ = getDefaultInstance().getZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * The zone the worker is running in.
+     * 
+ * + * string zone = 1; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + zone_ = value; + onChanged(); + return this; + } + + private java.lang.Object instance_ = ""; + /** + * + * + *
+     * The worker's instance name.
+     * 
+ * + * string instance = 2; + * + * @return The instance. + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The worker's instance name.
+     * 
+ * + * string instance = 2; + * + * @return The bytes for instance. + */ + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The worker's instance name.
+     * 
+ * + * string instance = 2; + * + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The worker's instance name.
+     * 
+ * + * string instance = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstance() { + + instance_ = getDefaultInstance().getInstance(); + onChanged(); + return this; + } + /** + * + * + *
+     * The worker's instance name.
+     * 
+ * + * string instance = 2; + * + * @param value The bytes for instance to set. + * @return This builder for chaining. + */ + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instance_ = value; + onChanged(); + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * The machine type that was assigned for the worker.
+     * 
+ * + * string machine_type = 3; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The machine type that was assigned for the worker.
+     * 
+ * + * string machine_type = 3; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The machine type that was assigned for the worker.
+     * 
+ * + * string machine_type = 3; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The machine type that was assigned for the worker.
+     * 
+ * + * string machine_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The machine type that was assigned for the worker.
+     * 
+ * + * string machine_type = 3; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = 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.lifesciences.v2beta.WorkerAssignedEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.WorkerAssignedEvent) + private static final com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent(); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerAssignedEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WorkerAssignedEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WorkerAssignedEvent(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.lifesciences.v2beta.WorkerAssignedEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerAssignedEventOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerAssignedEventOrBuilder.java new file mode 100644 index 00000000..39fbd612 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerAssignedEventOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface WorkerAssignedEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.WorkerAssignedEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The zone the worker is running in.
+   * 
+ * + * string zone = 1; + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * The zone the worker is running in.
+   * 
+ * + * string zone = 1; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * The worker's instance name.
+   * 
+ * + * string instance = 2; + * + * @return The instance. + */ + java.lang.String getInstance(); + /** + * + * + *
+   * The worker's instance name.
+   * 
+ * + * string instance = 2; + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); + + /** + * + * + *
+   * The machine type that was assigned for the worker.
+   * 
+ * + * string machine_type = 3; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * The machine type that was assigned for the worker.
+   * 
+ * + * string machine_type = 3; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerReleasedEvent.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerReleasedEvent.java new file mode 100644 index 00000000..e8dc737a --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerReleasedEvent.java @@ -0,0 +1,818 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +/** + * + * + *
+ * An event generated when the worker VM that was assigned to the pipeline
+ * has been released (deleted).
+ * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.WorkerReleasedEvent} + */ +public final class WorkerReleasedEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.lifesciences.v2beta.WorkerReleasedEvent) + WorkerReleasedEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use WorkerReleasedEvent.newBuilder() to construct. + private WorkerReleasedEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WorkerReleasedEvent() { + zone_ = ""; + instance_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WorkerReleasedEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WorkerReleasedEvent( + 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(); + + zone_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instance_ = 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.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_WorkerReleasedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_WorkerReleasedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.class, + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.Builder.class); + } + + public static final int ZONE_FIELD_NUMBER = 1; + private volatile java.lang.Object zone_; + /** + * + * + *
+   * The zone the worker was running in.
+   * 
+ * + * string zone = 1; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * The zone the worker was running in.
+   * 
+ * + * string zone = 1; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 2; + private volatile java.lang.Object instance_; + /** + * + * + *
+   * The worker's instance name.
+   * 
+ * + * string instance = 2; + * + * @return The instance. + */ + @java.lang.Override + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } + } + /** + * + * + *
+   * The worker's instance name.
+   * 
+ * + * string instance = 2; + * + * @return The bytes for instance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getZoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, zone_); + } + if (!getInstanceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instance_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getZoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, zone_); + } + if (!getInstanceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instance_); + } + 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.lifesciences.v2beta.WorkerReleasedEvent)) { + return super.equals(obj); + } + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent other = + (com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) obj; + + if (!getZone().equals(other.getZone())) return false; + if (!getInstance().equals(other.getInstance())) 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) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent 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.lifesciences.v2beta.WorkerReleasedEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent parseFrom( + 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.lifesciences.v2beta.WorkerReleasedEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent parseFrom( + java.io.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.lifesciences.v2beta.WorkerReleasedEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent parseDelimitedFrom( + java.io.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.lifesciences.v2beta.WorkerReleasedEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.lifesciences.v2beta.WorkerReleasedEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An event generated when the worker VM that was assigned to the pipeline
+   * has been released (deleted).
+   * 
+ * + * Protobuf type {@code google.cloud.lifesciences.v2beta.WorkerReleasedEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.lifesciences.v2beta.WorkerReleasedEvent) + com.google.cloud.lifesciences.v2beta.WorkerReleasedEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_WorkerReleasedEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_WorkerReleasedEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.class, + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.Builder.class); + } + + // Construct using com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.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(); + zone_ = ""; + + instance_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.lifesciences.v2beta.WorkflowsProto + .internal_static_google_cloud_lifesciences_v2beta_WorkerReleasedEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent getDefaultInstanceForType() { + return com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent build() { + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent buildPartial() { + com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent result = + new com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent(this); + result.zone_ = zone_; + result.instance_ = instance_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.lifesciences.v2beta.WorkerReleasedEvent) { + return mergeFrom((com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent other) { + if (other == com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent.getDefaultInstance()) + return this; + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + onChanged(); + } + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + 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.lifesciences.v2beta.WorkerReleasedEvent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * The zone the worker was running in.
+     * 
+ * + * string zone = 1; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The zone the worker was running in.
+     * 
+ * + * string zone = 1; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The zone the worker was running in.
+     * 
+ * + * string zone = 1; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + zone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The zone the worker was running in.
+     * 
+ * + * string zone = 1; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + + zone_ = getDefaultInstance().getZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * The zone the worker was running in.
+     * 
+ * + * string zone = 1; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + zone_ = value; + onChanged(); + return this; + } + + private java.lang.Object instance_ = ""; + /** + * + * + *
+     * The worker's instance name.
+     * 
+ * + * string instance = 2; + * + * @return The instance. + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The worker's instance name.
+     * 
+ * + * string instance = 2; + * + * @return The bytes for instance. + */ + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The worker's instance name.
+     * 
+ * + * string instance = 2; + * + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The worker's instance name.
+     * 
+ * + * string instance = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstance() { + + instance_ = getDefaultInstance().getInstance(); + onChanged(); + return this; + } + /** + * + * + *
+     * The worker's instance name.
+     * 
+ * + * string instance = 2; + * + * @param value The bytes for instance to set. + * @return This builder for chaining. + */ + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instance_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.lifesciences.v2beta.WorkerReleasedEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.lifesciences.v2beta.WorkerReleasedEvent) + private static final com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent(); + } + + public static com.google.cloud.lifesciences.v2beta.WorkerReleasedEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WorkerReleasedEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WorkerReleasedEvent(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.lifesciences.v2beta.WorkerReleasedEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerReleasedEventOrBuilder.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerReleasedEventOrBuilder.java new file mode 100644 index 00000000..4a0be339 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkerReleasedEventOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public interface WorkerReleasedEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.lifesciences.v2beta.WorkerReleasedEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The zone the worker was running in.
+   * 
+ * + * string zone = 1; + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * The zone the worker was running in.
+   * 
+ * + * string zone = 1; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * The worker's instance name.
+   * 
+ * + * string instance = 2; + * + * @return The instance. + */ + java.lang.String getInstance(); + /** + * + * + *
+   * The worker's instance name.
+   * 
+ * + * string instance = 2; + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsProto.java b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsProto.java new file mode 100644 index 00000000..ec36d9f6 --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/java/com/google/cloud/lifesciences/v2beta/WorkflowsProto.java @@ -0,0 +1,700 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/lifesciences/v2beta/workflows.proto + +package com.google.cloud.lifesciences.v2beta; + +public final class WorkflowsProto { + private WorkflowsProto() {} + + 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_lifesciences_v2beta_RunPipelineRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_RunPipelineResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_RunPipelineResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Pipeline_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Pipeline_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Pipeline_EnvironmentEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Pipeline_EnvironmentEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Action_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Action_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Action_EnvironmentEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Action_EnvironmentEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Action_PortMappingsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Action_PortMappingsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Action_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Action_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Secret_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Secret_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Mount_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Mount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Resources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Resources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_ServiceAccount_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_ServiceAccount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Accelerator_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Accelerator_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Network_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Network_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Disk_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Disk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Volume_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Volume_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_PersistentDisk_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_PersistentDisk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_ExistingDisk_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_ExistingDisk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_NFSMount_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_NFSMount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Metadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Metadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Metadata_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Metadata_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_Event_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_Event_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_DelayedEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_DelayedEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_WorkerAssignedEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_WorkerAssignedEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_WorkerReleasedEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_WorkerReleasedEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_PullStartedEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_PullStartedEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_PullStoppedEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_PullStoppedEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_PortMappingsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_PortMappingsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_ContainerStoppedEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_ContainerStoppedEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_UnexpectedExitStatusEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_UnexpectedExitStatusEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_ContainerKilledEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_ContainerKilledEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_lifesciences_v2beta_FailedEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_lifesciences_v2beta_FailedEvent_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/lifesciences/v2beta/workf" + + "lows.proto\022 google.cloud.lifesciences.v2" + + "beta\032\034google/api/annotations.proto\032\037goog" + + "le/api/field_behavior.proto\032#google/long" + + "running/operations.proto\032\036google/protobu" + + "f/duration.proto\032\037google/protobuf/timest" + + "amp.proto\032\025google/rpc/code.proto\032\027google" + + "/api/client.proto\"\377\001\n\022RunPipelineRequest" + + "\022\016\n\006parent\030\004 \001(\t\022A\n\010pipeline\030\001 \001(\0132*.goo" + + "gle.cloud.lifesciences.v2beta.PipelineB\003" + + "\340A\002\022P\n\006labels\030\002 \003(\0132@.google.cloud.lifes" + + "ciences.v2beta.RunPipelineRequest.Labels" + + "Entry\022\025\n\rpub_sub_topic\030\003 \001(\t\032-\n\013LabelsEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\025\n\023R" + + "unPipelineResponse\"\267\002\n\010Pipeline\0229\n\007actio" + + "ns\030\001 \003(\0132(.google.cloud.lifesciences.v2b" + + "eta.Action\022>\n\tresources\030\002 \001(\0132+.google.c" + + "loud.lifesciences.v2beta.Resources\022P\n\013en" + + "vironment\030\003 \003(\0132;.google.cloud.lifescien" + + "ces.v2beta.Pipeline.EnvironmentEntry\022*\n\007" + + "timeout\030\004 \001(\0132\031.google.protobuf.Duration" + + "\0322\n\020EnvironmentEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001\"\201\007\n\006Action\022\026\n\016container_nam" + + "e\030\001 \001(\t\022\026\n\timage_uri\030\002 \001(\tB\003\340A\002\022\020\n\010comma" + + "nds\030\003 \003(\t\022\022\n\nentrypoint\030\004 \001(\t\022N\n\013environ" + + "ment\030\005 \003(\01329.google.cloud.lifesciences.v" + + "2beta.Action.EnvironmentEntry\022\025\n\rpid_nam" + + "espace\030\006 \001(\t\022Q\n\rport_mappings\030\010 \003(\0132:.go" + + "ogle.cloud.lifesciences.v2beta.Action.Po" + + "rtMappingsEntry\0227\n\006mounts\030\t \003(\0132\'.google" + + ".cloud.lifesciences.v2beta.Mount\022D\n\006labe" + + "ls\030\n \003(\01324.google.cloud.lifesciences.v2b" + + "eta.Action.LabelsEntry\022=\n\013credentials\030\013 " + + "\001(\0132(.google.cloud.lifesciences.v2beta.S" + + "ecret\022*\n\007timeout\030\014 \001(\0132\031.google.protobuf" + + ".Duration\022\032\n\022ignore_exit_status\030\r \001(\010\022\031\n" + + "\021run_in_background\030\016 \001(\010\022\022\n\nalways_run\030\017" + + " \001(\010\022\023\n\013enable_fuse\030\020 \001(\010\022\035\n\025publish_exp" + + "osed_ports\030\021 \001(\010\022\036\n\026disable_image_prefet" + + "ch\030\022 \001(\010\022&\n\036disable_standard_error_captu" + + "re\030\023 \001(\010\022\036\n\026block_external_network\030\024 \001(\010" + + "\0322\n\020EnvironmentEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001\0323\n\021PortMappingsEntry\022\013\n\003key" + + "\030\001 \001(\005\022\r\n\005value\030\002 \001(\005:\0028\001\032-\n\013LabelsEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"/\n\006Secr" + + "et\022\020\n\010key_name\030\001 \001(\t\022\023\n\013cipher_text\030\002 \001(" + + "\t\"6\n\005Mount\022\014\n\004disk\030\001 \001(\t\022\014\n\004path\030\002 \001(\t\022\021" + + "\n\tread_only\030\003 \001(\010\"v\n\tResources\022\017\n\007region" + + "s\030\002 \003(\t\022\r\n\005zones\030\003 \003(\t\022I\n\017virtual_machin" + + "e\030\004 \001(\01320.google.cloud.lifesciences.v2be" + + "ta.VirtualMachine\"\247\005\n\016VirtualMachine\022\031\n\014" + + "machine_type\030\001 \001(\tB\003\340A\002\022\023\n\013preemptible\030\002" + + " \001(\010\022L\n\006labels\030\003 \003(\0132<.google.cloud.life" + + "sciences.v2beta.VirtualMachine.LabelsEnt" + + "ry\0225\n\005disks\030\004 \003(\0132&.google.cloud.lifesci" + + "ences.v2beta.Disk\022:\n\007network\030\005 \001(\0132).goo" + + "gle.cloud.lifesciences.v2beta.Network\022C\n" + + "\014accelerators\030\006 \003(\0132-.google.cloud.lifes" + + "ciences.v2beta.Accelerator\022I\n\017service_ac" + + "count\030\007 \001(\01320.google.cloud.lifesciences." + + "v2beta.ServiceAccount\022\031\n\021boot_disk_size_" + + "gb\030\010 \001(\005\022\024\n\014cpu_platform\030\t \001(\t\022\022\n\nboot_i" + + "mage\030\n \001(\t\022!\n\025nvidia_driver_version\030\013 \001(" + + "\tB\002\030\001\022%\n\035enable_stackdriver_monitoring\030\014" + + " \001(\010\022\033\n\023docker_cache_images\030\r \003(\t\0229\n\007vol" + + "umes\030\016 \003(\0132(.google.cloud.lifesciences.v" + + "2beta.Volume\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\t:\0028\001\"/\n\016ServiceAccount\022\r\n" + + "\005email\030\001 \001(\t\022\016\n\006scopes\030\002 \003(\t\"*\n\013Accelera" + + "tor\022\014\n\004type\030\001 \001(\t\022\r\n\005count\030\002 \001(\003\"K\n\007Netw" + + "ork\022\017\n\007network\030\001 \001(\t\022\033\n\023use_private_addr" + + "ess\030\002 \001(\010\022\022\n\nsubnetwork\030\003 \001(\t\"I\n\004Disk\022\014\n" + + "\004name\030\001 \001(\t\022\017\n\007size_gb\030\002 \001(\005\022\014\n\004type\030\003 \001" + + "(\t\022\024\n\014source_image\030\004 \001(\t\"\372\001\n\006Volume\022\016\n\006v" + + "olume\030\001 \001(\t\022K\n\017persistent_disk\030\002 \001(\01320.g" + + "oogle.cloud.lifesciences.v2beta.Persiste" + + "ntDiskH\000\022G\n\rexisting_disk\030\003 \001(\0132..google" + + ".cloud.lifesciences.v2beta.ExistingDiskH" + + "\000\022?\n\tnfs_mount\030\004 \001(\0132*.google.cloud.life" + + "sciences.v2beta.NFSMountH\000B\t\n\007storage\"E\n" + + "\016PersistentDisk\022\017\n\007size_gb\030\001 \001(\005\022\014\n\004type" + + "\030\002 \001(\t\022\024\n\014source_image\030\003 \001(\t\"\034\n\014Existing" + + "Disk\022\014\n\004disk\030\001 \001(\t\"\032\n\010NFSMount\022\016\n\006target" + + "\030\001 \001(\t\"\236\003\n\010Metadata\022<\n\010pipeline\030\001 \001(\0132*." + + "google.cloud.lifesciences.v2beta.Pipelin" + + "e\022F\n\006labels\030\002 \003(\01326.google.cloud.lifesci" + + "ences.v2beta.Metadata.LabelsEntry\0227\n\006eve" + + "nts\030\003 \003(\0132\'.google.cloud.lifesciences.v2" + + "beta.Event\022/\n\013create_time\030\004 \001(\0132\032.google" + + ".protobuf.Timestamp\022.\n\nstart_time\030\005 \001(\0132" + + "\032.google.protobuf.Timestamp\022,\n\010end_time\030" + + "\006 \001(\0132\032.google.protobuf.Timestamp\022\025\n\rpub" + + "_sub_topic\030\007 \001(\t\032-\n\013LabelsEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\365\006\n\005Event\022-\n\ttim" + + "estamp\030\001 \001(\0132\032.google.protobuf.Timestamp" + + "\022\023\n\013description\030\002 \001(\t\022A\n\007delayed\030\021 \001(\0132." + + ".google.cloud.lifesciences.v2beta.Delaye" + + "dEventH\000\022P\n\017worker_assigned\030\022 \001(\01325.goog" + + "le.cloud.lifesciences.v2beta.WorkerAssig" + + "nedEventH\000\022P\n\017worker_released\030\023 \001(\01325.go" + + "ogle.cloud.lifesciences.v2beta.WorkerRel" + + "easedEventH\000\022J\n\014pull_started\030\024 \001(\01322.goo" + + "gle.cloud.lifesciences.v2beta.PullStarte" + + "dEventH\000\022J\n\014pull_stopped\030\025 \001(\01322.google." + + "cloud.lifesciences.v2beta.PullStoppedEve" + + "ntH\000\022T\n\021container_started\030\026 \001(\01327.google" + + ".cloud.lifesciences.v2beta.ContainerStar" + + "tedEventH\000\022T\n\021container_stopped\030\027 \001(\01327." + + "google.cloud.lifesciences.v2beta.Contain" + + "erStoppedEventH\000\022R\n\020container_killed\030\030 \001" + + "(\01326.google.cloud.lifesciences.v2beta.Co" + + "ntainerKilledEventH\000\022]\n\026unexpected_exit_" + + "status\030\031 \001(\0132;.google.cloud.lifesciences" + + ".v2beta.UnexpectedExitStatusEventH\000\022?\n\006f" + + "ailed\030\032 \001(\0132-.google.cloud.lifesciences." + + "v2beta.FailedEventH\000B\t\n\007details\".\n\014Delay" + + "edEvent\022\r\n\005cause\030\001 \001(\t\022\017\n\007metrics\030\002 \003(\t\"" + + "K\n\023WorkerAssignedEvent\022\014\n\004zone\030\001 \001(\t\022\020\n\010" + + "instance\030\002 \001(\t\022\024\n\014machine_type\030\003 \001(\t\"5\n\023" + + "WorkerReleasedEvent\022\014\n\004zone\030\001 \001(\t\022\020\n\010ins" + + "tance\030\002 \001(\t\"%\n\020PullStartedEvent\022\021\n\timage" + + "_uri\030\001 \001(\t\"%\n\020PullStoppedEvent\022\021\n\timage_" + + "uri\030\001 \001(\t\"\325\001\n\025ContainerStartedEvent\022\021\n\ta" + + "ction_id\030\001 \001(\005\022`\n\rport_mappings\030\002 \003(\0132I." + + "google.cloud.lifesciences.v2beta.Contain" + + "erStartedEvent.PortMappingsEntry\022\022\n\nip_a" + + "ddress\030\003 \001(\t\0323\n\021PortMappingsEntry\022\013\n\003key" + + "\030\001 \001(\005\022\r\n\005value\030\002 \001(\005:\0028\001\"O\n\025ContainerSt" + + "oppedEvent\022\021\n\taction_id\030\001 \001(\005\022\023\n\013exit_st" + + "atus\030\002 \001(\005\022\016\n\006stderr\030\003 \001(\t\"C\n\031Unexpected" + + "ExitStatusEvent\022\021\n\taction_id\030\001 \001(\005\022\023\n\013ex" + + "it_status\030\002 \001(\005\")\n\024ContainerKilledEvent\022" + + "\021\n\taction_id\030\001 \001(\005\"<\n\013FailedEvent\022\036\n\004cod" + + "e\030\001 \001(\0162\020.google.rpc.Code\022\r\n\005cause\030\002 \001(\t" + + "2\262\002\n\026WorkflowsServiceV2Beta\022\306\001\n\013RunPipel" + + "ine\0224.google.cloud.lifesciences.v2beta.R" + + "unPipelineRequest\032\035.google.longrunning.O" + + "peration\"b\202\323\344\223\002:\"5/v2beta/{parent=projec" + + "ts/*/locations/*}/pipelines:run:\001*\312A\037\n\023R" + + "unPipelineResponse\022\010Metadata\032O\312A\033lifesci" + + "ences.googleapis.com\322A.https://www.googl" + + "eapis.com/auth/cloud-platformB\215\001\n$com.go" + + "ogle.cloud.lifesciences.v2betaB\016Workflow" + + "sProtoP\001ZLgoogle.golang.org/genproto/goo" + + "gleapis/cloud/lifesciences/v2beta;lifesc" + + "iences\242\002\004CLSWb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.CodeProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + }); + internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_descriptor, + new java.lang.String[] { + "Parent", "Pipeline", "Labels", "PubSubTopic", + }); + internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_LabelsEntry_descriptor = + internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_RunPipelineRequest_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_lifesciences_v2beta_RunPipelineResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_lifesciences_v2beta_RunPipelineResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_RunPipelineResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_lifesciences_v2beta_Pipeline_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_lifesciences_v2beta_Pipeline_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Pipeline_descriptor, + new java.lang.String[] { + "Actions", "Resources", "Environment", "Timeout", + }); + internal_static_google_cloud_lifesciences_v2beta_Pipeline_EnvironmentEntry_descriptor = + internal_static_google_cloud_lifesciences_v2beta_Pipeline_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_lifesciences_v2beta_Pipeline_EnvironmentEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Pipeline_EnvironmentEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_lifesciences_v2beta_Action_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_lifesciences_v2beta_Action_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Action_descriptor, + new java.lang.String[] { + "ContainerName", + "ImageUri", + "Commands", + "Entrypoint", + "Environment", + "PidNamespace", + "PortMappings", + "Mounts", + "Labels", + "Credentials", + "Timeout", + "IgnoreExitStatus", + "RunInBackground", + "AlwaysRun", + "EnableFuse", + "PublishExposedPorts", + "DisableImagePrefetch", + "DisableStandardErrorCapture", + "BlockExternalNetwork", + }); + internal_static_google_cloud_lifesciences_v2beta_Action_EnvironmentEntry_descriptor = + internal_static_google_cloud_lifesciences_v2beta_Action_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_lifesciences_v2beta_Action_EnvironmentEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Action_EnvironmentEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_lifesciences_v2beta_Action_PortMappingsEntry_descriptor = + internal_static_google_cloud_lifesciences_v2beta_Action_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_lifesciences_v2beta_Action_PortMappingsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Action_PortMappingsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_lifesciences_v2beta_Action_LabelsEntry_descriptor = + internal_static_google_cloud_lifesciences_v2beta_Action_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_lifesciences_v2beta_Action_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Action_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_lifesciences_v2beta_Secret_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_lifesciences_v2beta_Secret_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Secret_descriptor, + new java.lang.String[] { + "KeyName", "CipherText", + }); + internal_static_google_cloud_lifesciences_v2beta_Mount_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_lifesciences_v2beta_Mount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Mount_descriptor, + new java.lang.String[] { + "Disk", "Path", "ReadOnly", + }); + internal_static_google_cloud_lifesciences_v2beta_Resources_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_lifesciences_v2beta_Resources_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Resources_descriptor, + new java.lang.String[] { + "Regions", "Zones", "VirtualMachine", + }); + internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_descriptor, + new java.lang.String[] { + "MachineType", + "Preemptible", + "Labels", + "Disks", + "Network", + "Accelerators", + "ServiceAccount", + "BootDiskSizeGb", + "CpuPlatform", + "BootImage", + "NvidiaDriverVersion", + "EnableStackdriverMonitoring", + "DockerCacheImages", + "Volumes", + }); + internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_LabelsEntry_descriptor = + internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_VirtualMachine_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_lifesciences_v2beta_ServiceAccount_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_lifesciences_v2beta_ServiceAccount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_ServiceAccount_descriptor, + new java.lang.String[] { + "Email", "Scopes", + }); + internal_static_google_cloud_lifesciences_v2beta_Accelerator_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_lifesciences_v2beta_Accelerator_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Accelerator_descriptor, + new java.lang.String[] { + "Type", "Count", + }); + internal_static_google_cloud_lifesciences_v2beta_Network_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_lifesciences_v2beta_Network_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Network_descriptor, + new java.lang.String[] { + "Network", "UsePrivateAddress", "Subnetwork", + }); + internal_static_google_cloud_lifesciences_v2beta_Disk_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_lifesciences_v2beta_Disk_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Disk_descriptor, + new java.lang.String[] { + "Name", "SizeGb", "Type", "SourceImage", + }); + internal_static_google_cloud_lifesciences_v2beta_Volume_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_lifesciences_v2beta_Volume_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Volume_descriptor, + new java.lang.String[] { + "Volume", "PersistentDisk", "ExistingDisk", "NfsMount", "Storage", + }); + internal_static_google_cloud_lifesciences_v2beta_PersistentDisk_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_lifesciences_v2beta_PersistentDisk_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_PersistentDisk_descriptor, + new java.lang.String[] { + "SizeGb", "Type", "SourceImage", + }); + internal_static_google_cloud_lifesciences_v2beta_ExistingDisk_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_lifesciences_v2beta_ExistingDisk_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_ExistingDisk_descriptor, + new java.lang.String[] { + "Disk", + }); + internal_static_google_cloud_lifesciences_v2beta_NFSMount_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_lifesciences_v2beta_NFSMount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_NFSMount_descriptor, + new java.lang.String[] { + "Target", + }); + internal_static_google_cloud_lifesciences_v2beta_Metadata_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_lifesciences_v2beta_Metadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Metadata_descriptor, + new java.lang.String[] { + "Pipeline", "Labels", "Events", "CreateTime", "StartTime", "EndTime", "PubSubTopic", + }); + internal_static_google_cloud_lifesciences_v2beta_Metadata_LabelsEntry_descriptor = + internal_static_google_cloud_lifesciences_v2beta_Metadata_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_lifesciences_v2beta_Metadata_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Metadata_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_lifesciences_v2beta_Event_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_lifesciences_v2beta_Event_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_Event_descriptor, + new java.lang.String[] { + "Timestamp", + "Description", + "Delayed", + "WorkerAssigned", + "WorkerReleased", + "PullStarted", + "PullStopped", + "ContainerStarted", + "ContainerStopped", + "ContainerKilled", + "UnexpectedExitStatus", + "Failed", + "Details", + }); + internal_static_google_cloud_lifesciences_v2beta_DelayedEvent_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_lifesciences_v2beta_DelayedEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_DelayedEvent_descriptor, + new java.lang.String[] { + "Cause", "Metrics", + }); + internal_static_google_cloud_lifesciences_v2beta_WorkerAssignedEvent_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_lifesciences_v2beta_WorkerAssignedEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_WorkerAssignedEvent_descriptor, + new java.lang.String[] { + "Zone", "Instance", "MachineType", + }); + internal_static_google_cloud_lifesciences_v2beta_WorkerReleasedEvent_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_lifesciences_v2beta_WorkerReleasedEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_WorkerReleasedEvent_descriptor, + new java.lang.String[] { + "Zone", "Instance", + }); + internal_static_google_cloud_lifesciences_v2beta_PullStartedEvent_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_lifesciences_v2beta_PullStartedEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_PullStartedEvent_descriptor, + new java.lang.String[] { + "ImageUri", + }); + internal_static_google_cloud_lifesciences_v2beta_PullStoppedEvent_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_lifesciences_v2beta_PullStoppedEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_PullStoppedEvent_descriptor, + new java.lang.String[] { + "ImageUri", + }); + internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_descriptor, + new java.lang.String[] { + "ActionId", "PortMappings", "IpAddress", + }); + internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_PortMappingsEntry_descriptor = + internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_PortMappingsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_ContainerStartedEvent_PortMappingsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_lifesciences_v2beta_ContainerStoppedEvent_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_lifesciences_v2beta_ContainerStoppedEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_ContainerStoppedEvent_descriptor, + new java.lang.String[] { + "ActionId", "ExitStatus", "Stderr", + }); + internal_static_google_cloud_lifesciences_v2beta_UnexpectedExitStatusEvent_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_lifesciences_v2beta_UnexpectedExitStatusEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_UnexpectedExitStatusEvent_descriptor, + new java.lang.String[] { + "ActionId", "ExitStatus", + }); + internal_static_google_cloud_lifesciences_v2beta_ContainerKilledEvent_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_lifesciences_v2beta_ContainerKilledEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_ContainerKilledEvent_descriptor, + new java.lang.String[] { + "ActionId", + }); + internal_static_google_cloud_lifesciences_v2beta_FailedEvent_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_lifesciences_v2beta_FailedEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_lifesciences_v2beta_FailedEvent_descriptor, + new java.lang.String[] { + "Code", "Cause", + }); + 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.oauthScopes); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.CodeProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-life-sciences-v2beta/src/main/proto/google/cloud/lifesciences/v2beta/workflows.proto b/proto-google-cloud-life-sciences-v2beta/src/main/proto/google/cloud/lifesciences/v2beta/workflows.proto new file mode 100644 index 00000000..9094345e --- /dev/null +++ b/proto-google-cloud-life-sciences-v2beta/src/main/proto/google/cloud/lifesciences/v2beta/workflows.proto @@ -0,0 +1,745 @@ +// 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.lifesciences.v2beta; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/code.proto"; +import "google/api/client.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/lifesciences/v2beta;lifesciences"; +option java_multiple_files = true; +option java_outer_classname = "WorkflowsProto"; +option java_package = "com.google.cloud.lifesciences.v2beta"; +option objc_class_prefix = "CLSW"; + +// A service for running workflows, such as pipelines consisting of Docker +// containers. +service WorkflowsServiceV2Beta { + option (google.api.default_host) = "lifesciences.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Runs a pipeline. The returned Operation's [metadata] + // [google.longrunning.Operation.metadata] field will contain a + // [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] object describing the status + // of the pipeline execution. The + // [response][google.longrunning.Operation.response] field will contain a + // [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] object if the + // pipeline completes successfully. + // + // **Note:** Before you can use this method, the *Life Sciences Service Agent* + // must have access to your project. This is done automatically when the + // Cloud Life Sciences API is first enabled, but if you delete this permission + // you must disable and re-enable the API to grant the Life Sciences + // Service Agent the required permissions. + // Authorization requires the following [Google + // IAM](https://cloud.google.com/iam/) permission: + // + // * `lifesciences.workflows.run` + rpc RunPipeline(RunPipelineRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta/{parent=projects/*/locations/*}/pipelines:run" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "RunPipelineResponse" + metadata_type: "Metadata" + }; + } +} + +// The arguments to the `RunPipeline` method. The requesting user must have +// the `iam.serviceAccounts.actAs` permission for the Cloud Life Sciences +// service account or the request will fail. +message RunPipelineRequest { + // The project and location that this request should be executed against. + string parent = 4; + + // Required. The description of the pipeline to run. + Pipeline pipeline = 1 [(google.api.field_behavior) = REQUIRED]; + + // User-defined labels to associate with the returned operation. These + // labels are not propagated to any Google Cloud Platform resources used by + // the operation, and can be modified at any time. + // + // To associate labels with resources created while executing the operation, + // see the appropriate resource message (for example, `VirtualMachine`). + map labels = 2; + + // The name of an existing Pub/Sub topic. The server will publish + // messages to this topic whenever the status of the operation changes. + // The Life Sciences Service Agent account must have publisher permissions to + // the specified topic or notifications will not be sent. + string pub_sub_topic = 3; +} + +// The response to the RunPipeline method, returned in the operation's result +// field on success. +message RunPipelineResponse { + +} + +// Specifies a series of actions to execute, expressed as Docker containers. +message Pipeline { + // The list of actions to execute, in the order they are specified. + repeated Action actions = 1; + + // The resources required for execution. + Resources resources = 2; + + // The environment to pass into every action. Each action can also specify + // additional environment variables but cannot delete an entry from this map + // (though they can overwrite it with a different value). + map environment = 3; + + // The maximum amount of time to give the pipeline to complete. This includes + // the time spent waiting for a worker to be allocated. If the pipeline fails + // to complete before the timeout, it will be cancelled and the error code + // will be set to DEADLINE_EXCEEDED. + // + // If unspecified, it will default to 7 days. + google.protobuf.Duration timeout = 4; +} + +// Specifies a single action that runs a Docker container. +message Action { + // An optional name for the container. The container hostname will be set to + // this name, making it useful for inter-container communication. The name + // must contain only upper and lowercase alphanumeric characters and hyphens + // and cannot start with a hyphen. + string container_name = 1; + + // Required. The URI to pull the container image from. Note that all images referenced + // by actions in the pipeline are pulled before the first action runs. If + // multiple actions reference the same image, it is only pulled once, + // ensuring that the same image is used for all actions in a single pipeline. + // + // The image URI can be either a complete host and image specification (e.g., + // quay.io/biocontainers/samtools), a library and image name (e.g., + // google/cloud-sdk) or a bare image name ('bash') to pull from the default + // library. No schema is required in any of these cases. + // + // If the specified image is not public, the service account specified for + // the Virtual Machine must have access to pull the images from GCR, or + // appropriate credentials must be specified in the + // [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] field. + string image_uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // If specified, overrides the `CMD` specified in the container. If the + // container also has an `ENTRYPOINT` the values are used as entrypoint + // arguments. Otherwise, they are used as a command and arguments to run + // inside the container. + repeated string commands = 3; + + // If specified, overrides the `ENTRYPOINT` specified in the container. + string entrypoint = 4; + + // The environment to pass into the container. This environment is merged + // with values specified in the [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline] + // message, overwriting any duplicate values. + // + // In addition to the values passed here, a few other values are + // automatically injected into the environment. These cannot be hidden or + // overwritten. + // + // `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed + // because an action has exited with a non-zero status (and did not have the + // `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional + // debug or logging actions should execute. + // + // `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last + // non-background action that executed. This can be used by workflow engine + // authors to determine whether an individual action has succeeded or failed. + map environment = 5; + + // An optional identifier for a PID namespace to run the action inside. + // Multiple actions should use the same string to share a namespace. If + // unspecified, a separate isolated namespace is used. + string pid_namespace = 6; + + // A map of containers to host port mappings for this container. If the + // container already specifies exposed ports, use the + // `PUBLISH_EXPOSED_PORTS` flag instead. + // + // The host port number must be less than 65536. If it is zero, an unused + // random port is assigned. To determine the resulting port number, consult + // the `ContainerStartedEvent` in the operation metadata. + map port_mappings = 8; + + // A list of mounts to make available to the action. + // + // In addition to the values specified here, every action has a special + // virtual disk mounted under `/google` that contains log files and other + // operational components. + // + //
    + //
  • /google/logs All logs written during the pipeline + // execution.
  • + //
  • /google/logs/output The combined standard output and + // standard error of all actions run as part of the pipeline + // execution.
  • + //
  • /google/logs/action/*/stdout The complete contents of + // each individual action's standard output.
  • + //
  • /google/logs/action/*/stderr The complete contents of + // each individual action's standard error output.
  • + //
+ repeated Mount mounts = 9; + + // Labels to associate with the action. This field is provided to assist + // workflow engine authors in identifying actions (for example, to indicate + // what sort of action they perform, such as localization or debugging). + // They are returned in the operation metadata, but are otherwise ignored. + map labels = 10; + + // If the specified image is hosted on a private registry other than Google + // Container Registry, the credentials required to pull the image must be + // specified here as an encrypted secret. + // + // The secret must decrypt to a JSON-encoded dictionary containing both + // `username` and `password` keys. + Secret credentials = 11; + + // The maximum amount of time to give the action to complete. If the action + // fails to complete before the timeout, it will be terminated and the exit + // status will be non-zero. The pipeline will continue or terminate based + // on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags. + google.protobuf.Duration timeout = 12; + + // Normally, a non-zero exit status causes the pipeline to fail. This flag + // allows execution of other actions to continue instead. + bool ignore_exit_status = 13; + + // This flag allows an action to continue running in the background while + // executing subsequent actions. This is useful to provide services to + // other actions (or to provide debugging support tools like SSH servers). + bool run_in_background = 14; + + // By default, after an action fails, no further actions are run. This flag + // indicates that this action must be run even if the pipeline has already + // failed. This is useful for actions that copy output files off of the VM + // or for debugging. Note that no actions will be run if image prefetching + // fails. + bool always_run = 15; + + // Enable access to the FUSE device for this action. Filesystems can then + // be mounted into disks shared with other actions. The other actions do + // not need the `enable_fuse` flag to access the mounted filesystem. + // + // This has the effect of causing the container to be executed with + // `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it only + // for containers you trust. + bool enable_fuse = 16; + + // Exposes all ports specified by `EXPOSE` statements in the container. To + // discover the host side port numbers, consult the `ACTION_STARTED` event + // in the operation metadata. + bool publish_exposed_ports = 17; + + // All container images are typically downloaded before any actions are + // executed. This helps prevent typos in URIs or issues like lack of disk + // space from wasting large amounts of compute resources. + // + // If set, this flag prevents the worker from downloading the image until + // just before the action is executed. + bool disable_image_prefetch = 18; + + // A small portion of the container's standard error stream is typically + // captured and returned inside the `ContainerStoppedEvent`. Setting this + // flag disables this functionality. + bool disable_standard_error_capture = 19; + + // Prevents the container from accessing the external network. + bool block_external_network = 20; +} + +// Holds encrypted information that is only decrypted and stored in RAM +// by the worker VM when running the pipeline. +message Secret { + // The name of the Cloud KMS key that will be used to decrypt the secret + // value. The VM service account must have the required permissions and + // authentication scopes to invoke the `decrypt` method on the specified key. + string key_name = 1; + + // The value of the cipherText response from the `encrypt` method. This field + // is intentionally unaudited. + string cipher_text = 2; +} + +// Carries information about a particular disk mount inside a container. +message Mount { + // The name of the disk to mount, as specified in the resources section. + string disk = 1; + + // The path to mount the disk inside the container. + string path = 2; + + // If true, the disk is mounted read-only inside the container. + bool read_only = 3; +} + +// The system resources for the pipeline run. +// +// At least one zone or region must be specified or the pipeline run will fail. +message Resources { + // The list of regions allowed for VM allocation. If set, the `zones` field + // must not be set. + repeated string regions = 2; + + // The list of zones allowed for VM allocation. If set, the `regions` field + // must not be set. + repeated string zones = 3; + + // The virtual machine specification. + VirtualMachine virtual_machine = 4; +} + +// Carries information about a Compute Engine VM resource. +message VirtualMachine { + // Required. The machine type of the virtual machine to create. Must be the short name + // of a standard machine type (such as "n1-standard-1") or a custom machine + // type (such as "custom-1-4096", where "1" indicates the number of vCPUs and + // "4096" indicates the memory in MB). See + // [Creating an instance with a custom machine + // type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) + // for more specifications on creating a custom machine type. + string machine_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // If true, allocate a preemptible VM. + bool preemptible = 2; + + // Optional set of labels to apply to the VM and any attached disk resources. + // These labels must adhere to the [name and value + // restrictions](https://cloud.google.com/compute/docs/labeling-resources) on + // VM labels imposed by Compute Engine. + // + // Labels keys with the prefix 'google-' are reserved for use by Google. + // + // Labels applied at creation time to the VM. Applied on a best-effort basis + // to attached disk resources shortly after VM creation. + map labels = 3; + + // The list of disks to create and attach to the VM. + // + // Specify either the `volumes[]` field or the `disks[]` field, but not both. + repeated Disk disks = 4; + + // The VM network configuration. + Network network = 5; + + // The list of accelerators to attach to the VM. + repeated Accelerator accelerators = 6; + + // The service account to install on the VM. This account does not need + // any permissions other than those required by the pipeline. + ServiceAccount service_account = 7; + + // The size of the boot disk, in GB. The boot disk must be large + // enough to accommodate all of the Docker images from each action in the + // pipeline at the same time. If not specified, a small but reasonable + // default value is used. + int32 boot_disk_size_gb = 8; + + // The CPU platform to request. An instance based on a newer platform can be + // allocated, but never one with fewer capabilities. The value of this + // parameter must be a valid Compute Engine CPU platform name (such as "Intel + // Skylake"). This parameter is only useful for carefully optimized work + // loads where the CPU platform has a significant impact. + // + // For more information about the effect of this parameter, see + // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + string cpu_platform = 9; + + // The host operating system image to use. + // + // Currently, only Container-Optimized OS images can be used. + // + // The default value is `projects/cos-cloud/global/images/family/cos-stable`, + // which selects the latest stable release of Container-Optimized OS. + // + // This option is provided to allow testing against the beta release of the + // operating system to ensure that the new version does not interact + // negatively with production pipelines. + // + // To test a pipeline against the beta release of Container-Optimized OS, + // use the value `projects/cos-cloud/global/images/family/cos-beta`. + string boot_image = 10; + + // The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator. + // The version specified here must be compatible with the GPU libraries + // contained in the container being executed, and must be one of the drivers + // hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage. + string nvidia_driver_version = 11 [deprecated = true]; + + // Whether Stackdriver monitoring should be enabled on the VM. + bool enable_stackdriver_monitoring = 12; + + // The Compute Engine Disk Images to use as a Docker cache. The disks will be + // mounted into the Docker folder in a way that the images present in the + // cache will not need to be pulled. The digests of the cached images must + // match those of the tags used or the latest version will still be pulled. + // The root directory of the ext4 image must contain `image` and `overlay2` + // directories copied from the Docker directory of a VM where the desired + // Docker images have already been pulled. Any images pulled that are not + // cached will be stored on the first cache disk instead of the boot disk. + // Only a single image is supported. + repeated string docker_cache_images = 13; + + // The list of disks and other storage to create or attach to the VM. + // + // Specify either the `volumes[]` field or the `disks[]` field, but not both. + repeated Volume volumes = 14; +} + +// Carries information about a Google Cloud service account. +message ServiceAccount { + // Email address of the service account. If not specified, the default + // Compute Engine service account for the project will be used. + string email = 1; + + // List of scopes to be enabled for this service account on the VM, in + // addition to the cloud-platform API scope that will be added by default. + repeated string scopes = 2; +} + +// Carries information about an accelerator that can be attached to a VM. +message Accelerator { + // The accelerator type string (for example, "nvidia-tesla-k80"). + // + // Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is + // attached, the required runtime libraries will be made available to all + // containers under `/usr/local/nvidia`. The driver version to install must + // be specified using the NVIDIA driver version parameter on the virtual + // machine specification. Note that attaching a GPU increases the worker VM + // startup time by a few minutes. + string type = 1; + + // How many accelerators of this type to attach. + int64 count = 2; +} + +// VM networking options. +message Network { + // The network name to attach the VM's network interface to. The value will + // be prefixed with `global/networks/` unless it contains a `/`, in which + // case it is assumed to be a fully specified network resource URL. + // + // If unspecified, the global default network is used. + string network = 1; + + // If set to true, do not attach a public IP address to the VM. Note that + // without a public IP address, additional configuration is required to + // allow the VM to access Google services. + // + // See https://cloud.google.com/vpc/docs/configure-private-google-access + // for more information. + bool use_private_address = 2; + + // If the specified network is configured for custom subnet creation, the + // name of the subnetwork to attach the instance to must be specified here. + // + // The value is prefixed with `regions/*/subnetworks/` unless it contains a + // `/`, in which case it is assumed to be a fully specified subnetwork + // resource URL. + // + // If the `*` character appears in the value, it is replaced with the region + // that the virtual machine has been allocated in. + string subnetwork = 3; +} + +// Carries information about a disk that can be attached to a VM. +// +// See https://cloud.google.com/compute/docs/disks/performance for more +// information about disk type, size, and performance considerations. +// +// Specify either [`Volume`][google.cloud.lifesciences.v2beta.Volume] or +// [`Disk`][google.cloud.lifesciences.v2beta.Disk], but not both. +message Disk { + // A user-supplied name for the disk. Used when mounting the disk into + // actions. The name must contain only upper and lowercase alphanumeric + // characters and hyphens and cannot start with a hyphen. + string name = 1; + + // The size, in GB, of the disk to attach. If the size is not + // specified, a default is chosen to ensure reasonable I/O performance. + // + // If the disk type is specified as `local-ssd`, multiple local drives are + // automatically combined to provide the requested size. Note, however, that + // each physical SSD is 375GB in size, and no more than 8 drives can be + // attached to a single instance. + int32 size_gb = 2; + + // The Compute Engine disk type. If unspecified, `pd-standard` is used. + string type = 3; + + // An optional image to put on the disk before attaching it to the VM. + string source_image = 4; +} + +// Carries information about storage that can be attached to a VM. +// +// Specify either [`Volume`][google.cloud.lifesciences.v2beta.Volume] or +// [`Disk`][google.cloud.lifesciences.v2beta.Disk], but not both. +message Volume { + // A user-supplied name for the volume. Used when mounting the volume into + // [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain + // only upper and lowercase alphanumeric characters and hyphens and cannot + // start with a hyphen. + string volume = 1; + + oneof storage { + // Configuration for a persistent disk. + PersistentDisk persistent_disk = 2; + + // Configuration for a existing disk. + ExistingDisk existing_disk = 3; + + // Configuration for an NFS mount. + NFSMount nfs_mount = 4; + } +} + +// Configuration for a persistent disk to be attached to the VM. +// +// See https://cloud.google.com/compute/docs/disks/performance for more +// information about disk type, size, and performance considerations. +message PersistentDisk { + // The size, in GB, of the disk to attach. If the size is not + // specified, a default is chosen to ensure reasonable I/O performance. + // + // If the disk type is specified as `local-ssd`, multiple local drives are + // automatically combined to provide the requested size. Note, however, that + // each physical SSD is 375GB in size, and no more than 8 drives can be + // attached to a single instance. + int32 size_gb = 1; + + // The Compute Engine disk type. If unspecified, `pd-standard` is used. + string type = 2; + + // An image to put on the disk before attaching it to the VM. + string source_image = 3; +} + +// Configuration for an existing disk to be attached to the VM. +message ExistingDisk { + // If `disk` contains slashes, the Cloud Life Sciences API assumes that it is + // a complete URL for the disk. If `disk` does not contain slashes, the Cloud + // Life Sciences API assumes that the disk is a zonal disk and a URL will be + // generated of the form `zones//disks/`, where `` is the + // zone in which the instance is allocated. The disk must be ext4 formatted. + // + // If all `Mount` references to this disk have the `read_only` flag set to + // true, the disk will be attached in `read-only` mode and can be shared with + // other instances. Otherwise, the disk will be available for writing but + // cannot be shared. + string disk = 1; +} + +// Configuration for an `NFSMount` to be attached to the VM. +message NFSMount { + // A target NFS mount. The target must be specified as `address:/mount". + string target = 1; +} + +// Carries information about the pipeline execution that is returned +// in the long running operation's metadata field. +message Metadata { + // The pipeline this operation represents. + Pipeline pipeline = 1; + + // The user-defined labels associated with this operation. + map labels = 2; + + // The list of events that have happened so far during the execution of this + // operation. + repeated Event events = 3; + + // The time at which the operation was created by the API. + google.protobuf.Timestamp create_time = 4; + + // The first time at which resources were allocated to execute the pipeline. + google.protobuf.Timestamp start_time = 5; + + // The time at which execution was completed and resources were cleaned up. + google.protobuf.Timestamp end_time = 6; + + // The name of the Cloud Pub/Sub topic where notifications of operation status + // changes are sent. + string pub_sub_topic = 7; +} + +// Carries information about events that occur during pipeline execution. +message Event { + // The time at which the event occurred. + google.protobuf.Timestamp timestamp = 1; + + // A human-readable description of the event. Note that these strings can + // change at any time without notice. Any application logic must use the + // information in the `details` field. + string description = 2; + + // Machine-readable details about the event. + oneof details { + // See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent]. + DelayedEvent delayed = 17; + + // See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent]. + WorkerAssignedEvent worker_assigned = 18; + + // See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent]. + WorkerReleasedEvent worker_released = 19; + + // See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent]. + PullStartedEvent pull_started = 20; + + // See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent]. + PullStoppedEvent pull_stopped = 21; + + // See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent]. + ContainerStartedEvent container_started = 22; + + // See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent]. + ContainerStoppedEvent container_stopped = 23; + + // See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent]. + ContainerKilledEvent container_killed = 24; + + // See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent]. + UnexpectedExitStatusEvent unexpected_exit_status = 25; + + // See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent]. + FailedEvent failed = 26; + } +} + +// An event generated whenever a resource limitation or transient error +// delays execution of a pipeline that was otherwise ready to run. +message DelayedEvent { + // A textual description of the cause of the delay. The string can change + // without notice because it is often generated by another service (such as + // Compute Engine). + string cause = 1; + + // If the delay was caused by a resource shortage, this field lists the + // Compute Engine metrics that are preventing this operation from running + // (for example, `CPUS` or `INSTANCES`). If the particular metric is not + // known, a single `UNKNOWN` metric will be present. + repeated string metrics = 2; +} + +// An event generated after a worker VM has been assigned to run the +// pipeline. +message WorkerAssignedEvent { + // The zone the worker is running in. + string zone = 1; + + // The worker's instance name. + string instance = 2; + + // The machine type that was assigned for the worker. + string machine_type = 3; +} + +// An event generated when the worker VM that was assigned to the pipeline +// has been released (deleted). +message WorkerReleasedEvent { + // The zone the worker was running in. + string zone = 1; + + // The worker's instance name. + string instance = 2; +} + +// An event generated when the worker starts pulling an image. +message PullStartedEvent { + // The URI of the image that was pulled. + string image_uri = 1; +} + +// An event generated when the worker stops pulling an image. +message PullStoppedEvent { + // The URI of the image that was pulled. + string image_uri = 1; +} + +// An event generated when a container starts. +message ContainerStartedEvent { + // The numeric ID of the action that started this container. + int32 action_id = 1; + + // The container-to-host port mappings installed for this container. This + // set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag + // as well as any specified in the `Action` definition. + map port_mappings = 2; + + // The public IP address that can be used to connect to the container. This + // field is only populated when at least one port mapping is present. If the + // instance was created with a private address, this field will be empty even + // if port mappings exist. + string ip_address = 3; +} + +// An event generated when a container exits. +message ContainerStoppedEvent { + // The numeric ID of the action that started this container. + int32 action_id = 1; + + // The exit status of the container. + int32 exit_status = 2; + + // The tail end of any content written to standard error by the container. + // If the content emits large amounts of debugging noise or contains + // sensitive information, you can prevent the content from being printed by + // setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag. + // + // Note that only a small amount of the end of the stream is captured here. + // The entire stream is stored in the `/google/logs` directory mounted into + // each action, and can be copied off the machine as described elsewhere. + string stderr = 3; +} + +// An event generated when the execution of a container results in a +// non-zero exit status that was not otherwise ignored. Execution will +// continue, but only actions that are flagged as `ALWAYS_RUN` will be +// executed. Other actions will be skipped. +message UnexpectedExitStatusEvent { + // The numeric ID of the action that started the container. + int32 action_id = 1; + + // The exit status of the container. + int32 exit_status = 2; +} + +// An event generated when a container is forcibly terminated by the +// worker. Currently, this only occurs when the container outlives the +// timeout specified by the user. +message ContainerKilledEvent { + // The numeric ID of the action that started the container. + int32 action_id = 1; +} + +// An event generated when the execution of a pipeline has failed. Note +// that other events can continue to occur after this event. +message FailedEvent { + // The Google standard error code that best describes this failure. + google.rpc.Code code = 1; + + // The human-readable description of the cause of the failure. + string cause = 2; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..0519d3a1 --- /dev/null +++ b/renovate.json @@ -0,0 +1,73 @@ +{ + "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-life-sciences", + "^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" + ], + "semanticCommitType": "test", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-" + ], + "ignoreUnstable": false + }, + { + "packagePatterns": [ + "^com.fasterxml.jackson.core" + ], + "groupName": "jackson dependencies" + } + ], + "semanticCommits": true, + "masterIssue": true +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 00000000..0d601bb9 --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + life-sciences-install-without-bom + jar + Google Cloud Life Sciences Install Without Bom + https://github.com/googleapis/java-life-sciences + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-life-sciences + 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 00000000..c6232513 --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-life-sciences-samples + 0.0.1-SNAPSHOT + pom + Google Cloud Life Sciences Samples Parent + https://github.com/googleapis/java-life-sciences + + 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 00000000..a3f55bfd --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + life-sciences-snapshot + jar + Google Cloud Life Sciences Snapshot Samples + https://github.com/googleapis/java-life-sciences + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-life-sciences + 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 00000000..54219a73 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + life-sciences-snippets + jar + Google Cloud Life Sciences Snippets + https://github.com/googleapis/java-life-sciences + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-life-sciences + 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 00000000..7390d477 --- /dev/null +++ b/versions.txt @@ -0,0 +1,6 @@ +# Format: +# module:released-version:current-version + +google-cloud-life-sciences:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-life-sciences-v2beta:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-life-sciences-v2beta:0.0.0:0.0.1-SNAPSHOT